From 40f3c026823f8951a2fa04e9c7fc93c75bc27bec Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 3 Jul 2014 13:25:24 +0100 Subject: Rename machine_(u)int_t to mp_(u)int_t. See discussion in issue #50. --- stmhal/led.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'stmhal/led.c') diff --git a/stmhal/led.c b/stmhal/led.c index c1b298b17..51eaeb488 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)) { -- cgit v1.2.3