Skip to content

Commit 5b04862

Browse files
committed
Improve poll performance
1 parent 897b914 commit 5b04862

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pico_w/wifi/ota_update/picow_ota_update.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ int main() {
347347
tcp_update_server_result(state, -1);
348348
return -1;
349349
}
350+
351+
bool led_state = false;
350352
while(!state->complete) {
351353
// the following #ifdef is only here so this same example can be used in multiple modes;
352354
// you do not need it in your code
@@ -357,9 +359,8 @@ int main() {
357359
#endif
358360

359361
// Do your application code here
360-
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 1);
361-
sleep_ms(250);
362-
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 0);
362+
led_state = !led_state;
363+
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, led_state);
363364
sleep_ms(250);
364365
}
365366

0 commit comments

Comments
 (0)