Skip to content

Commit bacb4a0

Browse files
committed
properly initialise led
1 parent be35e19 commit bacb4a0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pico_w/wifi/access_point/picow_access_point.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,16 @@ int main() {
9292
stdio_init_all();
9393

9494
if (cyw43_arch_init()) {
95-
DEBUG_printf("failed to initialise\n");
95+
DEBUG_printf("failed to initialise WiFi\n");
96+
return 1;
97+
}
98+
99+
// Initialise led
100+
if (!status_led_init_with_context(cyw43_arch_async_context())) {
101+
DEBUG_printf("failed to initialise LED");
96102
return 1;
97103
}
98104

99-
// Initialise led state
100105
led_state = status_led_get_state();
101106

102107
// Get notified if the user presses a key

0 commit comments

Comments
 (0)