diff options
Diffstat (limited to 'teensy')
-rw-r--r-- | teensy/led.c | 4 | ||||
-rw-r--r-- | teensy/main.c | 2 | ||||
-rw-r--r-- | teensy/modpyb.c | 4 | ||||
-rw-r--r-- | teensy/mpconfigport.h | 4 | ||||
-rw-r--r-- | teensy/uart.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/teensy/led.c b/teensy/led.c index 5a9d8701d2..999ca98071 100644 --- a/teensy/led.c +++ b/teensy/led.c @@ -15,7 +15,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; @@ -98,7 +98,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)) { diff --git a/teensy/main.c b/teensy/main.c index 97c1db6528..5e7918cdc6 100644 --- a/teensy/main.c +++ b/teensy/main.c @@ -150,7 +150,7 @@ static mp_obj_t pyb_info(void) { #if 0 -void gc_helper_get_regs_and_clean_stack(machine_uint_t *regs, machine_uint_t heap_end); +void gc_helper_get_regs_and_clean_stack(mp_uint_t *regs, mp_uint_t heap_end); mp_obj_t pyb_gc(void) { gc_collect(); diff --git a/teensy/modpyb.c b/teensy/modpyb.c index 0240395dc7..435b198d0b 100644 --- a/teensy/modpyb.c +++ b/teensy/modpyb.c @@ -164,7 +164,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(pyb_millis_obj, pyb_millis); /// \function delay(ms) /// Delay for the given number of milliseconds. STATIC mp_obj_t pyb_delay(mp_obj_t ms_in) { - machine_int_t ms = mp_obj_get_int(ms_in); + mp_int_t ms = mp_obj_get_int(ms_in); if (ms >= 0) { HAL_Delay(ms); } @@ -175,7 +175,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_delay_obj, pyb_delay); /// \function udelay(us) /// Delay for the given number of microseconds. STATIC mp_obj_t pyb_udelay(mp_obj_t usec_in) { - machine_int_t usec = mp_obj_get_int(usec_in); + mp_int_t usec = mp_obj_get_int(usec_in); delayMicroseconds(usec); return mp_const_none; } diff --git a/teensy/mpconfigport.h b/teensy/mpconfigport.h index ff0a31f272..108b230dfd 100644 --- a/teensy/mpconfigport.h +++ b/teensy/mpconfigport.h @@ -46,8 +46,8 @@ extern const struct _mp_obj_module_t time_module; #define UINT_FMT "%u" #define INT_FMT "%d" -typedef int32_t machine_int_t; // must be pointer size -typedef unsigned int machine_uint_t; // must be pointer size +typedef int32_t mp_int_t; // must be pointer size +typedef unsigned int mp_uint_t; // must be pointer size typedef void *machine_ptr_t; // must be of pointer size typedef const void *machine_const_ptr_t; // must be of pointer size diff --git a/teensy/uart.c b/teensy/uart.c index 97a1a058c9..e3a35153bc 100644 --- a/teensy/uart.c +++ b/teensy/uart.c @@ -309,7 +309,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, uint n_args, const mp if (vals[3].u_obj == mp_const_none) { init->Parity = UART_PARITY_NONE; } else { - machine_int_t parity = mp_obj_get_int(vals[3].u_obj); + mp_int_t parity = mp_obj_get_int(vals[3].u_obj); init->Parity = (parity & 1) ? UART_PARITY_ODD : UART_PARITY_EVEN; } init->Mode = UART_MODE_TX_RX; |