Skip to content

Commit 019494c

Browse files
committed
don't use hard coded led pin number
1 parent 94dd2de commit 019494c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/boards/boards.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,15 @@ uint32_t tusb_hal_millis(void)
121121

122122

123123
static uint32_t primary_cycle_length = 50;
124-
static uint32_t g_led_pin = 7;
124+
static uint32_t g_led_pin = LED_PRIMARY_PIN;
125125
#ifdef LED_SECONDARY_PIN
126126
static uint32_t secondary_cycle_length;
127127
#endif
128128

129129
void led_init(uint32_t led_index, uint32_t led_pin) {
130130
g_led_pin = led_pin;
131131
nrf_gpio_cfg_output(led_pin);
132+
nrf_gpio_pin_write(led_pin, !LED_STATE_ON);
132133
}
133134

134135
void led_tick() {

0 commit comments

Comments
 (0)