Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Revision:
1:9db0e321a9f4
Parent:
0:5b88d5760320
--- a/components/wifi/esp8266-driver/ESP8266/ESP8266.h	Tue Dec 17 23:23:45 2019 +0000
+++ b/components/wifi/esp8266-driver/ESP8266/ESP8266.h	Tue Dec 31 06:02:27 2019 +0000
@@ -17,7 +17,7 @@
 #ifndef ESP8266_H
 #define ESP8266_H
 
-#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
+#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_API_PRESENT)
 #include <stdint.h>
 
 #include "drivers/UARTSerial.h"
@@ -27,8 +27,8 @@
 #include "platform/ATCmdParser.h"
 #include "platform/Callback.h"
 #include "platform/mbed_error.h"
-#include "rtos/ConditionVariable.h"
 #include "rtos/Mutex.h"
+#include "rtos/ThisThread.h"
 
 // Various timeouts for different ESP8266 operations
 #ifndef ESP8266_CONNECT_TIMEOUT
@@ -405,6 +405,14 @@
     static const int8_t WIFIMODE_STATION_SOFTAP = 3;
     static const int8_t SOCKET_COUNT = 5;
 
+    /**
+     * Enables or disables uart input and deep sleep
+     *
+     * @param lock if TRUE, uart input is enabled and  deep sleep is locked
+     * if FALSE, uart input is disabled and  deep sleep is unlocked
+     */
+    int uart_enable_input(bool lock);
+
 private:
     // FW version
     struct fw_sdk_version _sdk_v;
@@ -420,7 +428,6 @@
     PinName _serial_rts;
     PinName _serial_cts;
     rtos::Mutex _smutex; // Protect serial port access
-    rtos::Mutex _rmutex; // Reset protection
 
     // AT Command Parser
     mbed::ATCmdParser _parser;
@@ -462,6 +469,7 @@
     void _oob_tcp_data_hdlr();
     void _oob_ready();
     void _oob_scan_results();
+    void _oob_ok_received();
 
     // OOB state variables
     int _connect_error;
@@ -471,8 +479,8 @@
     bool _closed;
     bool _error;
     bool _busy;
-    rtos::ConditionVariable _reset_check;
     bool _reset_done;
+    bool _ok_received;
 
     // Modem's address info
     char _ip_buffer[16];