File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 3131extern "C" {
3232#endif
3333
34- #define LED1 BSP_IO_PORT_01_PIN_11 // D13
35- #define LED_STATE_ON 1
34+ #define LED_SELECT BSP_IO_PORT_00_PIN_14
35+
36+ #define LED1 BSP_IO_PORT_03_PIN_01 // D13
37+ #define LED_STATE_ON 1
3638
3739#define SW1 BSP_IO_PORT_01_PIN_10 // D12
3840#define BUTTON_STATE_ACTIVE 0
3941
4042static const ioport_pin_cfg_t board_pin_cfg [] = {
43+ {.pin = LED_SELECT , .pin_cfg = IOPORT_CFG_PORT_DIRECTION_OUTPUT },
4144 {.pin = LED1 , .pin_cfg = IOPORT_CFG_PORT_DIRECTION_OUTPUT },
4245 {.pin = BSP_IO_PORT_09_PIN_14 , .pin_cfg = IOPORT_CFG_PERIPHERAL_PIN | IOPORT_PERIPHERAL_USB_FS },
4346 {.pin = BSP_IO_PORT_09_PIN_15 , .pin_cfg = IOPORT_CFG_PERIPHERAL_PIN | IOPORT_PERIPHERAL_USB_FS },
Original file line number Diff line number Diff line change @@ -126,6 +126,8 @@ void board_init(void) {
126126 SysTick_Config (SystemCoreClock / 1000 );
127127#endif
128128
129+
130+
129131 board_led_write (false);
130132}
131133
@@ -143,6 +145,11 @@ void board_init_after_tusb(void) {
143145
144146void board_led_write (bool state ) {
145147 R_IOPORT_PinWrite (& port_ctrl , LED1 , state ? LED_STATE_ON : !LED_STATE_ON );
148+
149+ /* Used on "muxto" bootloader to select a particular led colum */
150+ #ifdef LED_SELECT
151+ R_IOPORT_PinWrite (& port_ctrl , LED_SELECT , LED_STATE_ON );
152+ #endif
146153}
147154
148155uint32_t board_button_read (void ) {
You can’t perform that action at this time.
0 commit comments