File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
ports/raspberrypi/common-hal/wifi Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,15 @@ void common_hal_wifi_radio_stop_station(wifi_radio_obj_t *self) {
161
161
// (by tcpip_link_status). However since ap disconnection isn't working
162
162
// either, this is not an issue.
163
163
cyw43_wifi_leave (& cyw43_state , CYW43_ITF_AP );
164
-
164
+ size_t timeout_ms = (size_t )MICROPY_FLOAT_C_FUN (ceil )(500 );
165
+ uint64_t start = port_get_raw_ticks (NULL );
166
+ uint64_t deadline = start + timeout_ms ;
167
+ while (port_get_raw_ticks (NULL ) < deadline && (cyw43_tcpip_link_status (& cyw43_state , CYW43_ITF_STA ) != CYW43_LINK_DOWN )) {
168
+ RUN_BACKGROUND_TASKS ;
169
+ if (mp_hal_is_interrupted ()) {
170
+ break ;
171
+ }
172
+ }
165
173
bindings_cyw43_wifi_enforce_pm ();
166
174
}
167
175
You can’t perform that action at this time.
0 commit comments