diff options
author | Damien George <damien.p.george@gmail.com> | 2014-07-03 13:25:24 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-07-03 13:25:24 +0100 |
commit | 40f3c026823f8951a2fa04e9c7fc93c75bc27bec (patch) | |
tree | c9c8210654c7114f00c5234a8481d9b5fbd28ce0 /stmhal/led.c | |
parent | 065aba587571150074ea79483ffa72c0fe6bc8c8 (diff) | |
download | micropython-40f3c026823f8951a2fa04e9c7fc93c75bc27bec.tar.gz micropython-40f3c026823f8951a2fa04e9c7fc93c75bc27bec.zip |
Rename machine_(u)int_t to mp_(u)int_t.
See discussion in issue #50.
Diffstat (limited to 'stmhal/led.c')
-rw-r--r-- | stmhal/led.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stmhal/led.c b/stmhal/led.c index c1b298b179..51eaeb4885 100644 --- a/stmhal/led.c +++ b/stmhal/led.c @@ -45,7 +45,7 @@ typedef struct _pyb_led_obj_t { mp_obj_base_t base; - machine_uint_t led_id; + mp_uint_t led_id; const pin_obj_t *led_pin; } pyb_led_obj_t; @@ -160,7 +160,7 @@ int led_get_intensity(pyb_led_t led) { #if defined(PYBV4) || defined(PYBV10) if (led == 4) { - machine_uint_t i = (TIM3->CCR1 * 255 + (USBD_CDC_POLLING_INTERVAL*1000) - 2) / ((USBD_CDC_POLLING_INTERVAL*1000) - 1); + mp_uint_t i = (TIM3->CCR1 * 255 + (USBD_CDC_POLLING_INTERVAL*1000) - 2) / ((USBD_CDC_POLLING_INTERVAL*1000) - 1); if (i > 255) { i = 255; } @@ -181,7 +181,7 @@ int led_get_intensity(pyb_led_t led) { } } -void led_set_intensity(pyb_led_t led, machine_int_t intensity) { +void led_set_intensity(pyb_led_t led, mp_int_t intensity) { #if defined(PYBV4) || defined(PYBV10) if (led == 4) { // set intensity using PWM pulse width @@ -226,7 +226,7 @@ STATIC mp_obj_t led_obj_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_arg_check_num(n_args, n_kw, 1, 1, false); // get led number - machine_int_t led_id = mp_obj_get_int(args[0]); + mp_int_t led_id = mp_obj_get_int(args[0]); // check led number if (!(1 <= led_id && led_id <= NUM_LEDS)) { |