@@ -29,17 +29,21 @@ class ESP8266Interface : public NetworkStack, public WiFiInterface
29
29
{
30
30
public:
31
31
/* * ESP8266Interface lifetime
32
- * @param tx TX pin
33
- * @param rx RX pin
34
- * @param debug Enable debugging
32
+ * @param tx TX pin
33
+ * @param rx RX pin
34
+ * @param debug Enable debugging
35
35
*/
36
36
ESP8266Interface (PinName tx, PinName rx, bool debug = false );
37
37
38
38
/* * Start the interface
39
- * @param ssid Name of the network to connect to
40
- * @param pass Security passphrase to connect to the network
41
- * @param security Type of encryption for connection
42
- * @return 0 on success, negative on failure
39
+ *
40
+ * Attempts to connect to a WiFi network. If passphrase is invalid,
41
+ * NSAPI_ERROR_AUTH_ERROR is returned.
42
+ *
43
+ * @param ssid Name of the network to connect to
44
+ * @param pass Security passphrase to connect to the network
45
+ * @param security Type of encryption for connection
46
+ * @return 0 on success, negative error code on failure
43
47
*/
44
48
virtual int connect (
45
49
const char *ssid,
@@ -98,12 +102,6 @@ class ESP8266Interface : public NetworkStack, public WiFiInterface
98
102
* @return 0 on success, negative on failure
99
103
*/
100
104
virtual int socket_connect (void *handle, const SocketAddress &address);
101
-
102
- /* * Check if the socket is connected
103
- * @param handle Socket handle
104
- * @return true if connected, false otherwise
105
- */
106
- virtual bool socket_is_connected (void *handle);
107
105
108
106
/* * Accept a new connection.
109
107
* @param handle Handle in which to store new socket
@@ -139,7 +137,7 @@ class ESP8266Interface : public NetworkStack, public WiFiInterface
139
137
* @param address The remote SocketAddress
140
138
* @param data The packet to be sent
141
139
* @param size The length of the packet to be sent
142
- * @return the number of written bytes on success, negative on failure
140
+ * @return The number of written bytes on success, negative on failure
143
141
* @note This call is not-blocking, if this call would block, must
144
142
* immediately return NSAPI_ERROR_WOULD_WAIT
145
143
*/
@@ -152,7 +150,7 @@ class ESP8266Interface : public NetworkStack, public WiFiInterface
152
150
* If a packet is too long to fit in the supplied buffer,
153
151
* excess bytes are discarded
154
152
* @param size The length of the buffer
155
- * @return the number of received bytes on success, negative on failure
153
+ * @return The number of received bytes on success, negative on failure
156
154
* @note This call is not-blocking, if this call would block, must
157
155
* immediately return NSAPI_ERROR_WOULD_WAIT
158
156
*/
@@ -172,4 +170,3 @@ class ESP8266Interface : public NetworkStack, public WiFiInterface
172
170
};
173
171
174
172
#endif
175
-
0 commit comments