Skip to content

Commit

Permalink
Periodically try reconnecting
Browse files Browse the repository at this point in the history
  • Loading branch information
polpo committed Dec 1, 2024
1 parent 0984cad commit 0836bc6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sw/ne2000play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ void play_ne2000() {
PG_EnableWifi();
PG_Wifi_Connect(settings.WiFi.ssid, settings.WiFi.password);

static bool flag = false;
while(1) {
PIC_AddEvent(&Wifi_Reconnect_Event, 1000, 0);
if (multicore_fifo_rvalid()) {
Expand All @@ -79,5 +80,14 @@ void play_ne2000() {
}
}
//cyw43_arch_poll();
if (((time_us_32() >> 21) & 0x1) == 0x1) {
if (flag == false) {
putchar('=');
PG_Wifi_Reconnect();
flag = true;
}
} else {
flag = false;
}
}
}

0 comments on commit 0836bc6

Please sign in to comment.