diff options
Diffstat (limited to 'stmhal/pin.c')
-rw-r--r-- | stmhal/pin.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stmhal/pin.c b/stmhal/pin.c index 02e8356e86..c96da794e6 100644 --- a/stmhal/pin.c +++ b/stmhal/pin.c @@ -245,12 +245,12 @@ STATIC void pin_print(void (*print)(void *env, const char *fmt, ...), void *env, } } -STATIC mp_obj_t pin_obj_init_helper(const pin_obj_t *pin, uint n_args, const mp_obj_t *args, mp_map_t *kw_args); +STATIC mp_obj_t pin_obj_init_helper(const pin_obj_t *pin, mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kw_args); /// \classmethod \constructor(id, ...) /// Create a new Pin object associated with the id. If additional arguments are given, /// they are used to initialise the pin. See `init`. -STATIC mp_obj_t pin_make_new(mp_obj_t self_in, uint n_args, uint n_kw, const mp_obj_t *args) { +STATIC mp_obj_t pin_make_new(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) { mp_arg_check_num(n_args, n_kw, 1, MP_OBJ_FUN_ARGS_MAX, true); // Run an argument through the mapper and return the result. @@ -268,7 +268,7 @@ STATIC mp_obj_t pin_make_new(mp_obj_t self_in, uint n_args, uint n_kw, const mp_ /// \classmethod mapper([fun]) /// Get or set the pin mapper function. -STATIC mp_obj_t pin_mapper(uint n_args, mp_obj_t *args) { +STATIC mp_obj_t pin_mapper(mp_uint_t n_args, const mp_obj_t *args) { if (n_args > 1) { pin_class_mapper = args[1]; return mp_const_none; @@ -280,7 +280,7 @@ STATIC MP_DEFINE_CONST_CLASSMETHOD_OBJ(pin_mapper_obj, (mp_obj_t)&pin_mapper_fun /// \classmethod dict([dict]) /// Get or set the pin mapper dictionary. -STATIC mp_obj_t pin_map_dict(uint n_args, mp_obj_t *args) { +STATIC mp_obj_t pin_map_dict(mp_uint_t n_args, const mp_obj_t *args) { if (n_args > 1) { pin_class_map_dict = args[1]; return mp_const_none; @@ -306,7 +306,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(pin_af_list_obj, pin_af_list); /// \classmethod debug([state]) /// Get or set the debugging state (`True` or `False` for on or off). -STATIC mp_obj_t pin_debug(uint n_args, mp_obj_t *args) { +STATIC mp_obj_t pin_debug(mp_uint_t n_args, const mp_obj_t *args) { if (n_args > 1) { pin_class_debug = mp_obj_is_true(args[1]); return mp_const_none; @@ -341,7 +341,7 @@ STATIC const mp_arg_t pin_init_args[] = { }; #define PIN_INIT_NUM_ARGS MP_ARRAY_SIZE(pin_init_args) -STATIC mp_obj_t pin_obj_init_helper(const pin_obj_t *self, uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +STATIC mp_obj_t pin_obj_init_helper(const pin_obj_t *self, mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { // parse args mp_arg_val_t vals[PIN_INIT_NUM_ARGS]; mp_arg_parse_all(n_args, args, kw_args, PIN_INIT_NUM_ARGS, pin_init_args, vals); @@ -410,7 +410,7 @@ STATIC mp_obj_t pin_obj_init_helper(const pin_obj_t *self, uint n_args, const mp return mp_const_none; } -STATIC mp_obj_t pin_obj_init(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +STATIC mp_obj_t pin_obj_init(mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { return pin_obj_init_helper(args[0], n_args - 1, args + 1, kw_args); } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pin_init_obj, 1, pin_obj_init); @@ -422,7 +422,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pin_init_obj, 1, pin_obj_init); /// - With `value` given, set the logic level of the pin. `value` can be /// anything that converts to a boolean. If it converts to `True`, the pin /// is set high, otherwise it is set low. -STATIC mp_obj_t pin_value(uint n_args, mp_obj_t *args) { +STATIC mp_obj_t pin_value(mp_uint_t n_args, const mp_obj_t *args) { pin_obj_t *self = args[0]; if (n_args == 1) { // get pin |