diff options
| author | Damien George | 2016-12-22 14:51:07 +1100 |
|---|---|---|
| committer | Damien George | 2016-12-22 14:55:26 +1100 |
| commit | 425150040c7a37cb55da1d22c7b62e0510097d90 (patch) | |
| tree | e6d18a3dc34f6f165b908efb44010332d56b431f | |
| parent | b14abab9cd9e61307cd1101279f23fc77de09185 (diff) | |
stmhal/mphalport.h: Explicitly use HAL's GPIO constants for pull modes.
They are the same as the existing raw constants (namely 0, 1, 2) but we
want to explicitly show that one can use the HAL's constants if necessary
(eg the mpconfigboard.h files do use the HAL's constants to define the
pull state of certain configurable pins).
| -rw-r--r-- | stmhal/mphalport.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stmhal/mphalport.h b/stmhal/mphalport.h index f0c05555d..7204d4bd3 100644 --- a/stmhal/mphalport.h +++ b/stmhal/mphalport.h @@ -55,9 +55,9 @@ static inline mp_uint_t mp_hal_ticks_cpu(void) { #define MP_HAL_PIN_MODE_ANALOG (3) #define MP_HAL_PIN_MODE_OPEN_DRAIN (5) #define MP_HAL_PIN_MODE_ALT_OPEN_DRAIN (6) -#define MP_HAL_PIN_PULL_NONE (0) -#define MP_HAL_PIN_PULL_UP (1) -#define MP_HAL_PIN_PULL_DOWN (2) +#define MP_HAL_PIN_PULL_NONE (GPIO_NOPULL) +#define MP_HAL_PIN_PULL_UP (GPIO_PULLUP) +#define MP_HAL_PIN_PULL_DOWN (GPIO_PULLDOWN) #define mp_hal_pin_obj_t const pin_obj_t* #define mp_hal_get_pin_obj(o) pin_find(o) |
