summaryrefslogtreecommitdiff
path: root/ports/stm32/timer.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-01-27 16:36:08 +1100
committerDamien George <damien@micropython.org>2022-01-27 16:44:13 +1100
commit79a3158de6dbd0b8f628fbf8cd5ffdeeea37bb6e (patch)
tree49c43129ac1cc01cd210c60575e1d5fdadc4b46b /ports/stm32/timer.c
parent30b6ce86be384ac04566d8f7bbf67d5906d6f307 (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/timer.c')
-rw-r--r--ports/stm32/timer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ports/stm32/timer.c b/ports/stm32/timer.c
index c23e7e02d..5a968ec56 100644
--- a/ports/stm32/timer.c
+++ b/ports/stm32/timer.c
@@ -1110,14 +1110,14 @@ STATIC mp_obj_t pyb_timer_channel(size_t n_args, const mp_obj_t *pos_args, mp_ma
const pin_obj_t *pin = MP_OBJ_TO_PTR(pin_obj);
const pin_af_obj_t *af = pin_find_af(pin, AF_FN_TIM, self->tim_id);
if (af == NULL) {
- mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("Pin(%q) doesn't have an af for Timer(%d)"), pin->name, self->tim_id);
+ mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("Pin(%q) doesn't have an alt for Timer(%d)"), pin->name, self->tim_id);
}
- // pin.init(mode=AF_PP, af=idx)
+ // pin.init(mode=AF_PP, alt=idx)
const mp_obj_t args2[6] = {
MP_OBJ_FROM_PTR(&pin_init_obj),
pin_obj,
MP_OBJ_NEW_QSTR(MP_QSTR_mode), MP_OBJ_NEW_SMALL_INT(GPIO_MODE_AF_PP),
- MP_OBJ_NEW_QSTR(MP_QSTR_af), MP_OBJ_NEW_SMALL_INT(af->idx)
+ MP_OBJ_NEW_QSTR(MP_QSTR_alt), MP_OBJ_NEW_SMALL_INT(af->idx)
};
mp_call_method_n_kw(0, 2, args2);
}