summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/boards/STM32L476DISC/mpconfigboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/boards/STM32L476DISC/mpconfigboard.h')
-rw-r--r--stmhal/boards/STM32L476DISC/mpconfigboard.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/stmhal/boards/STM32L476DISC/mpconfigboard.h b/stmhal/boards/STM32L476DISC/mpconfigboard.h
index 07e3ec7fdc..55e7c9b563 100644
--- a/stmhal/boards/STM32L476DISC/mpconfigboard.h
+++ b/stmhal/boards/STM32L476DISC/mpconfigboard.h
@@ -61,9 +61,8 @@
// LEDs
#define MICROPY_HW_LED1 (pin_B2) // red
#define MICROPY_HW_LED2 (pin_E8) // 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))
// USB config
// #define MICROPY_HW_USB_OTG_ID_PIN (pin_C12) // This is not the official ID Pin which should be PA10