11
11
*
12
12
* If no EULA applies, Cypress hereby grants you a personal, non-exclusive,
13
13
* non-transferable license to copy, modify, and compile the Software source
14
- * code solely for use in connection with Cypress's integrated circuit products.
14
+ * code solely for use in connection with Cypress' integrated circuit products.
15
15
* Any reproduction, modification, translation, compilation, or representation
16
16
* of this Software except as specified above is prohibited without the express
17
17
* written permission of Cypress.
25
25
* not authorize its products for use in any products where a malfunction or
26
26
* failure of the Cypress product may reasonably be expected to result in
27
27
* significant property damage, injury or death ("High Risk Product"). By
28
- * including Cypress's product in a High Risk Product, the manufacturer of such
28
+ * including Cypress' product in a High Risk Product, the manufacturer of such
29
29
* system or application assumes all risk of such use and in doing so agrees to
30
30
* indemnify Cypress against all liability.
31
31
*/
@@ -57,61 +57,61 @@ class SclSTAInterface : public WiFiInterface, public EMACInterface {
57
57
SCL_EMAC &emac = SCL_EMAC::get_instance(),
58
58
OnboardNetworkStack &stack = OnboardNetworkStack::get_default_instance());
59
59
60
- /* * Get current instance of the SclSTAInterface
60
+ /* * Gets the current instance of the SclSTAInterface
61
61
*
62
- * @return pointer to the object of class SclSTAInterface
62
+ * @return Pointer to the object of class SclSTAInterface.
63
63
*/
64
64
static SclSTAInterface *get_default_instance ();
65
65
66
- /* * Turn on the WiFi device
66
+ /* * Turn ON the WiFi device
67
67
*
68
68
* @return void
69
69
*/
70
- /* Turn on the wifi device*/
70
+ /* Turns ON the WiFi device*/
71
71
void wifi_on ();
72
72
73
- /* * Start the interface
73
+ /* * Starts the interface
74
74
*
75
75
* Attempts to connect to a WiFi network. Requires ssid and passphrase to be set.
76
76
* If passphrase is invalid, NSAPI_ERROR_AUTH_ERROR is returned.
77
77
*
78
- * @return 0 on success, negative error code on failure
78
+ * @return 0 on success, negative error code on failure.
79
79
*/
80
80
nsapi_error_t connect ();
81
81
82
- /* * Start the interface
82
+ /* * Starts the interface
83
83
*
84
84
* Attempts to connect to a WiFi network.
85
85
*
86
- * @param ssid Name of the network to connect to
87
- * @param pass Security passphrase to connect to the network
88
- * @param security Type of encryption for connection (Default: NSAPI_SECURITY_NONE)
89
- * @param channel This parameter is not supported, setting it to anything else than 0 will result in NSAPI_ERROR_UNSUPPORTED
90
- * @return 0 on success, or error code on failure
86
+ * @param ssid Name of the network to connect to.
87
+ * @param pass Security passphrase to connect to the network.
88
+ * @param security Type of encryption for connection (Default: NSAPI_SECURITY_NONE).
89
+ * @param channel This parameter is not supported, setting it to a value other than 0 will result in NSAPI_ERROR_UNSUPPORTED.
90
+ * @return 0 on success, or error code on failure.
91
91
*/
92
92
nsapi_error_t connect (const char *ssid, const char *pass, nsapi_security_t security = NSAPI_SECURITY_NONE, uint8_t channel = 0 );
93
93
94
- /* * Stop the interface
95
- * @return 0 on success, negative on failure
94
+ /* * Stops the interface
95
+ * @return 0 on success, negative on failure.
96
96
*/
97
97
nsapi_error_t disconnect ();
98
98
99
99
/* * Set the WiFi network credentials
100
100
*
101
- * @param ssid Name of the network to connect to
102
- * @param pass Security passphrase to connect to the network
103
- * @param security Type of encryption for connection
101
+ * @param ssid Name of the network to connect to.
102
+ * @param pass Security passphrase to connect to the network.
103
+ * @param security Type of encryption for connection.
104
104
* (defaults to NSAPI_SECURITY_NONE)
105
- * @return 0 on success, or error code on failure
105
+ * @return 0 on success, or error code on failure.
106
106
*/
107
107
nsapi_error_t set_credentials (const char *ssid, const char *pass, nsapi_security_t security = NSAPI_SECURITY_NONE);
108
108
109
- /* * Set the WiFi network channel - NOT SUPPORTED
109
+ /* * Sets the WiFi network channel - NOT SUPPORTED
110
110
*
111
- * This function is not supported and will return NSAPI_ERROR_UNSUPPORTED
111
+ * This function is not supported and will return NSAPI_ERROR_UNSUPPORTED.
112
112
*
113
- * @param channel Channel on which the connection is to be made, or 0 for any (Default: 0)
114
- * @return Not supported, returns NSAPI_ERROR_UNSUPPORTED
113
+ * @param channel Channel on which the connection is to be made (Default: 0).
114
+ * @return Not supported, returns NSAPI_ERROR_UNSUPPORTED.
115
115
*/
116
116
nsapi_error_t set_channel (uint8_t channel)
117
117
{
@@ -122,10 +122,10 @@ class SclSTAInterface : public WiFiInterface, public EMACInterface {
122
122
}
123
123
124
124
/* * Set blocking status of interface.
125
- * Nonblocking mode unsupported .
125
+ * Nonblocking mode is not supported .
126
126
*
127
- * @param blocking true if connect is blocking
128
- * @return 0 on success, negative error code on failure
127
+ * @param blocking True if connect is blocking
128
+ * @return 0 on success, negative error code on failure
129
129
*/
130
130
nsapi_error_t set_blocking (bool blocking)
131
131
{
@@ -138,38 +138,32 @@ class SclSTAInterface : public WiFiInterface, public EMACInterface {
138
138
}
139
139
/* * Gets the current radio signal strength for active connection
140
140
*
141
- * @return Connection strength in dBm (negative value)
141
+ * @return Connection strength in dBm (negative value).
142
142
*/
143
143
int8_t get_rssi ();
144
144
145
- /* * Scan for available networks
145
+ /* * Scans for available networks - NOT SUPPORTED
146
146
*
147
- * This function will block.
148
- *
149
- * @param ap Pointer to allocated array to store discovered AP
150
- * @param count Size of allocated @a res array, or 0 to only count available AP
151
- * @param timeout Timeout in milliseconds; 0 for no timeout (Default: 0)
152
- * @return Number of entries in @a, or if @a count was 0 number of available networks, negative on error
153
- * see @a nsapi_error
147
+ * @return NSAPI_ERROR_UNSUPPORTED
154
148
*/
155
149
int scan (WiFiAccessPoint *res, unsigned count);
156
150
157
- /* * This function is used to know if the device is connected to the network
158
- * @return SCL_SUCCESS if device is connected
151
+ /* * This function is used to indicate if the device is connected to the network.
152
+ * @return SCL_SUCCESS if device is connected.
159
153
*/
160
154
int is_interface_connected ();
161
155
162
- /* * Get the BSSID (MAC address of device connected to)
156
+ /* * Gets the BSSID (MAC address of device connected to)
163
157
*
164
- * @param bssid pointer to the BSSID value
165
- * @return SCL_SUCCESS if BSSID is obtained successfully
166
- * @return SCL_BADARG if input parameter is NULL
167
- * @return SCL_ERROR if unable to fetch BSSID
158
+ * @param bssid Pointer to the BSSID value.
159
+ * @return SCL_SUCCESS if BSSID is obtained successfully.
160
+ * @return SCL_BADARG if input parameter is NULL.
161
+ * @return SCL_ERROR if unable to fetch BSSID.
168
162
*/
169
163
int get_bssid (uint8_t *bssid);
170
164
171
- /* * This function is used to set up the wifi interface after wifi on
172
- * @return SCL_SUCCESS if wifi interface is up successfully
165
+ /* * This function is used to set up the WiFi interface after the WiFi on
166
+ * @return SCL_SUCCESS if the WiFi interface is up successfully.
173
167
*/
174
168
int wifi_set_up (void );
175
169
0 commit comments