Skip to content

Commit a589fa3

Browse files
dhylandsdpgeorge
authored andcommitted
stmhal: Update pin print to print new constants
This updates the print function for machine.Pin to print out the new constants from the Hardware API defintion rather than the legacy definitions.
1 parent d09b6b9 commit a589fa3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

stmhal/pin.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,15 @@ STATIC void pin_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
199199
if (mode == GPIO_MODE_INPUT) {
200200
mode_qst = MP_QSTR_IN;
201201
} else if (mode == GPIO_MODE_OUTPUT_PP) {
202-
mode_qst = MP_QSTR_OUT_PP;
202+
mode_qst = MP_QSTR_OUT;
203203
} else if (mode == GPIO_MODE_OUTPUT_OD) {
204-
mode_qst = MP_QSTR_OUT_OD;
204+
mode_qst = MP_QSTR_OPEN_DRAIN;
205205
} else {
206206
af = true;
207207
if (mode == GPIO_MODE_AF_PP) {
208-
mode_qst = MP_QSTR_AF_PP;
208+
mode_qst = MP_QSTR_ALT;
209209
} else {
210-
mode_qst = MP_QSTR_AF_OD;
210+
mode_qst = MP_QSTR_ALT_OPEN_DRAIN;
211211
}
212212
}
213213
mp_print_str(print, qstr_str(mode_qst));

0 commit comments

Comments
 (0)