diff options
author | Damien George <damien.p.george@gmail.com> | 2016-10-18 14:43:05 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-10-18 14:43:05 +1100 |
commit | b4cc68e4a4d656c4b1ae4de8db6a089726f1f572 (patch) | |
tree | 934388d4db588d51e6be46ea973999bfcabb7f7c /stmhal/boards/STM32F4DISC | |
parent | d49d81b1675b39c0c29c95b105edbbb7384f9314 (diff) | |
download | micropython-b4cc68e4a4d656c4b1ae4de8db6a089726f1f572.tar.gz micropython-b4cc68e4a4d656c4b1ae4de8db6a089726f1f572.zip |
stmhal/led: Refactor LED to use mp_hal_pin_output() init function.
As part of this patch the MICROPY_HW_LED_OTYPE setting is removed because
it is now unused (all boards anyway had this as OUTPUT_PP).
Diffstat (limited to 'stmhal/boards/STM32F4DISC')
-rw-r--r-- | stmhal/boards/STM32F4DISC/mpconfigboard.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/stmhal/boards/STM32F4DISC/mpconfigboard.h b/stmhal/boards/STM32F4DISC/mpconfigboard.h index 01202e0c95..841bf7d15b 100644 --- a/stmhal/boards/STM32F4DISC/mpconfigboard.h +++ b/stmhal/boards/STM32F4DISC/mpconfigboard.h @@ -82,9 +82,8 @@ #define MICROPY_HW_LED2 (pin_D12) // green #define MICROPY_HW_LED3 (pin_D13) // orange #define MICROPY_HW_LED4 (pin_D15) // blue -#define MICROPY_HW_LED_OTYPE (GPIO_MODE_OUTPUT_PP) -#define MICROPY_HW_LED_ON(pin) (pin->gpio->BSRRL = pin->pin_mask) -#define MICROPY_HW_LED_OFF(pin) (pin->gpio->BSRRH = pin->pin_mask) +#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin)) +#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin)) // USB config #define MICROPY_HW_USB_VBUS_DETECT_PIN (pin_A9) |