Extending the X_NUCLEO_IDW01M1 to allow configuration of the board as an access point

Dependents:   X_NUCLEO_IDW01M1_AP_Test

Fork of X_NUCLEO_IDW01M1 by ST

Revision:
8:0f302a13e21b
Parent:
6:e7a3fca2df10
Child:
12:3799f8475c8a
--- a/Spwf/wifi_driver.c	Wed May 11 06:12:16 2016 +0000
+++ b/Spwf/wifi_driver.c	Thu May 12 07:36:13 2016 +0000
@@ -173,7 +173,7 @@
 
 #elif defined(USART3_POLLING_MODE)
 
-  callSpwfSADevice_write(spwf_dev, (const char *) WiFi_AT_Cmd_Buff, size);
+  write_size = callSpwfSADevice_write(spwf_dev, (const char *) WiFi_AT_Cmd_Buff, size);
 
 #else
  #error "Please select USART mode in your application (in wifi_module.h file)"
@@ -191,7 +191,7 @@
 * @param  None
 * @retval WiFi_Status_t : return status of server socket request
 */
-WiFi_Status_t wifi_socket_server_write(uint16_t DataLength,char * pData) 
+int wifi_socket_server_write(uint16_t DataLength,char * pData) 
 {
     WiFi_Status_t status = WiFi_MODULE_SUCCESS;
     /*Can only write if there is a client connected*/
@@ -226,7 +226,7 @@
     }
     }  
     
-    callSpwfSADevice_write(spwf_dev, (const char *) pData, DataLength);
+    write_size = callSpwfSADevice_write(spwf_dev, (const char *) pData, DataLength);
     
     /*Write the data on the uart*/
     /*if(HAL_UART_Transmit(&UartWiFiHandle, (uint8_t *)pData, DataLength,1000)!= HAL_OK)
@@ -254,5 +254,9 @@
     status_flag.do_not_reset_push_WIFI_event = WIFI_FALSE;
     __enable_irq();
     
-    return status;
+    if(status==WiFi_MODULE_SUCCESS)
+        return write_size;
+    else
+        return -1;
+    //return status;
 }
\ No newline at end of file