diff options
| author | Damien George <damien@micropython.org> | 2022-01-27 16:36:08 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-01-27 16:44:13 +1100 |
| commit | 79a3158de6dbd0b8f628fbf8cd5ffdeeea37bb6e (patch) | |
| tree | 49c43129ac1cc01cd210c60575e1d5fdadc4b46b /ports/stm32/pin.c | |
| parent | 30b6ce86be384ac04566d8f7bbf67d5906d6f307 (diff) | |
stm32/pin: Change remaining uses of "af" to "alt".
The keyword "af" has been deprecated for some time and "alt" should be used
instead (but "af" still works).
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/stm32/pin.c')
| -rw-r--r-- | ports/stm32/pin.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ports/stm32/pin.c b/ports/stm32/pin.c index ad153311e..b490a09b7 100644 --- a/ports/stm32/pin.c +++ b/ports/stm32/pin.c @@ -230,9 +230,9 @@ STATIC void pin_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t mp_uint_t af_idx = pin_get_af(self); const pin_af_obj_t *af_obj = pin_find_af_by_index(self, af_idx); if (af_obj == NULL) { - mp_printf(print, ", af=%d)", af_idx); + mp_printf(print, ", alt=%d)", af_idx); } else { - mp_printf(print, ", af=Pin.%q)", af_obj->name); + mp_printf(print, ", alt=Pin.%q)", af_obj->name); } } else { mp_print_str(print, ")"); @@ -328,7 +328,7 @@ STATIC mp_obj_t pin_debug(size_t n_args, const mp_obj_t *args) { STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pin_debug_fun_obj, 1, 2, pin_debug); STATIC MP_DEFINE_CONST_CLASSMETHOD_OBJ(pin_debug_obj, MP_ROM_PTR(&pin_debug_fun_obj)); -// init(mode, pull=None, af=-1, *, value, alt) +// init(mode, pull=None, alt=-1, *, value, alt) STATIC mp_obj_t pin_obj_init_helper(const pin_obj_t *self, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { static const mp_arg_t allowed_args[] = { { MP_QSTR_mode, MP_ARG_REQUIRED | MP_ARG_INT }, @@ -625,9 +625,9 @@ const mp_obj_type_t pin_type = { /// is desired. /// /// To configure X3 to expose TIM2_CH3, you could use: -/// pin = pyb.Pin(pyb.Pin.board.X3, mode=pyb.Pin.AF_PP, af=pyb.Pin.AF1_TIM2) +/// pin = pyb.Pin(pyb.Pin.board.X3, mode=pyb.Pin.AF_PP, alt=pyb.Pin.AF1_TIM2) /// or: -/// pin = pyb.Pin(pyb.Pin.board.X3, mode=pyb.Pin.AF_PP, af=1) +/// pin = pyb.Pin(pyb.Pin.board.X3, mode=pyb.Pin.AF_PP, alt=1) /// \method __str__() /// Return a string describing the alternate function. |
