Skip to content

Commit f4c8256

Browse files
committed
atmel-samd: Add TX/RX led support for Metro M4.
1 parent 54f2b69 commit f4c8256

File tree

1 file changed

+8
-0
lines changed
  • ports/atmel-samd/boards/metro_m4_express

1 file changed

+8
-0
lines changed

ports/atmel-samd/boards/metro_m4_express/board.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,16 @@
2626

2727
#include "boards/board.h"
2828
#include "mpconfigboard.h"
29+
#include "hal/include/hal_gpio.h"
2930

3031
void board_init(void) {
32+
gpio_set_pin_function(MICROPY_HW_LED_TX, GPIO_PIN_FUNCTION_OFF);
33+
gpio_set_pin_direction(MICROPY_HW_LED_TX, GPIO_DIRECTION_OUT);
34+
gpio_set_pin_level(MICROPY_HW_LED_TX, true);
35+
36+
gpio_set_pin_function(MICROPY_HW_LED_RX, GPIO_PIN_FUNCTION_OFF);
37+
gpio_set_pin_direction(MICROPY_HW_LED_RX, GPIO_DIRECTION_OUT);
38+
gpio_set_pin_level(MICROPY_HW_LED_RX, true);
3139
}
3240

3341
bool board_requests_safe_mode(void) {

0 commit comments

Comments
 (0)