Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of X_NUCLEO_IDW01M1 by
Diff: Spwf/wifi_interface.c
- Revision:
- 5:c83ffd44f40a
- Parent:
- 1:bd9db471d47d
- Child:
- 6:e7a3fca2df10
--- a/Spwf/wifi_interface.c	Tue Apr 19 07:42:22 2016 +0000
+++ b/Spwf/wifi_interface.c	Wed May 04 12:16:20 2016 +0000
@@ -80,6 +80,7 @@
 extern volatile Wifi_Status_Var status_flag;
 
 extern char UserDataBuff[MAX_BUFFER_GLOBAL];
+extern buffer_e event_buff;
 extern wifi_scan *wifi_scanned_list;//[15];
 extern char print_msg_buff[MAX_BUFFER_GLOBAL];
 extern uint8_t user_scan_number;
@@ -1233,6 +1234,10 @@
 {
 WiFi_Status_t status = WiFi_MODULE_SUCCESS;
 
+//Wait till all queued events are executed
+while(!event_empty(&event_buff));
+Wait_For_Sock_Read_To_Complete();
+
 /* Set wifi_mode to idle*/
 status = SET_Configuration_Value(WIFI_MODE, WiFi_IDLE_MODE);
 
    