aboutsummaryrefslogtreecommitdiff
path: root/stmhal/boards/STM32F7DISC/mpconfigboard.h
diff options
context:
space:
mode:
authorDamien George2016-10-18 14:43:05 +1100
committerDamien George2016-10-18 14:43:05 +1100
commitb4cc68e4a4d656c4b1ae4de8db6a089726f1f572 (patch)
tree934388d4db588d51e6be46ea973999bfcabb7f7c /stmhal/boards/STM32F7DISC/mpconfigboard.h
parentd49d81b1675b39c0c29c95b105edbbb7384f9314 (diff)
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/STM32F7DISC/mpconfigboard.h')
-rw-r--r--stmhal/boards/STM32F7DISC/mpconfigboard.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/stmhal/boards/STM32F7DISC/mpconfigboard.h b/stmhal/boards/STM32F7DISC/mpconfigboard.h
index a1dbc0f46..acdc4d005 100644
--- a/stmhal/boards/STM32F7DISC/mpconfigboard.h
+++ b/stmhal/boards/STM32F7DISC/mpconfigboard.h
@@ -79,9 +79,8 @@ void STM32F7DISC_board_early_init(void);
// LEDs
#define MICROPY_HW_LED1 (pin_I1) // green
-#define MICROPY_HW_LED_OTYPE (GPIO_MODE_OUTPUT_PP)
-#define MICROPY_HW_LED_ON(pin) (pin->gpio->BSRR = pin->pin_mask)
-#define MICROPY_HW_LED_OFF(pin) (pin->gpio->BSRR = (pin->pin_mask << 16))
+#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
+#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
// SD card detect switch
#define MICROPY_HW_SDCARD_DETECT_PIN (pin_C13)