diff options
| author | Dave Hylands | 2016-08-22 23:22:04 -0700 |
|---|---|---|
| committer | Damien George | 2016-08-25 16:11:42 +1000 |
| commit | a589fa3e0bdb65f9aa9ad30f720bfc93788689e9 (patch) | |
| tree | 5de6088b46b152fadb4da7ffdbaf7365dfc0f80c /stmhal | |
| parent | d09b6b9aa1c2ed82a4795f5abbc02f50f00927d9 (diff) | |
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.
Diffstat (limited to 'stmhal')
| -rw-r--r-- | stmhal/pin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stmhal/pin.c b/stmhal/pin.c index e3ae0be40..9bd4e7a6d 100644 --- a/stmhal/pin.c +++ b/stmhal/pin.c @@ -199,15 +199,15 @@ STATIC void pin_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t if (mode == GPIO_MODE_INPUT) { mode_qst = MP_QSTR_IN; } else if (mode == GPIO_MODE_OUTPUT_PP) { - mode_qst = MP_QSTR_OUT_PP; + mode_qst = MP_QSTR_OUT; } else if (mode == GPIO_MODE_OUTPUT_OD) { - mode_qst = MP_QSTR_OUT_OD; + mode_qst = MP_QSTR_OPEN_DRAIN; } else { af = true; if (mode == GPIO_MODE_AF_PP) { - mode_qst = MP_QSTR_AF_PP; + mode_qst = MP_QSTR_ALT; } else { - mode_qst = MP_QSTR_AF_OD; + mode_qst = MP_QSTR_ALT_OPEN_DRAIN; } } mp_print_str(print, qstr_str(mode_qst)); |
