From 425150040c7a37cb55da1d22c7b62e0510097d90 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 22 Dec 2016 14:51:07 +1100 Subject: [PATCH] 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). --- stmhal/mphalport.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stmhal/mphalport.h b/stmhal/mphalport.h index f0c05555db..7204d4bd32 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)