Go to the source code of this file.
|
enum | csk_wifi_encryption_mode_t {
CSK_WIFI_AUTH_OPEN = 0
, CSK_WIFI_AUTH_WEP
, CSK_WIFI_AUTH_WPA_PSK
, CSK_WIFI_AUTH_WPA2_PSK
,
CSK_WIFI_AUTH_WPA_WPA2_PSK
, CSK_WIFI_AUTH_WPA2_ENTERPRISE
, CSK_WIFI_AUTH_WPA3_PSK
, CSK_WIFI_AUTH_WPA2_WPA3_PSK
,
CSK_WIFI_AUTH_MAX
} |
| CSK WiFi encryption mode. More...
|
|
enum | csk_wifi_bandwidth_t { CSK_WIFI_BW_HT20 = 0
, CSK_WIFI_BW_HT40
} |
| CSK WiFi bandwidth mode. More...
|
|
enum | csk_wifi_result_t {
CSK_WIFI_SUCCESS
, CSK_WIFI_ERR_STA_FAILED
, CSK_WIFI_ERR_AP_FAILED
, CSK_WIFI_ERR_AP_NOT_FOUND
,
CSK_WIFI_ERR_INVALID_PASSWORD
, CSK_WIFI_ERR_SCAN_FAILED
} |
| CSK WiFi operation(API) results structure. More...
|
|
enum | csk_wifi_event_t {
CSK_WIFI_EVT_STA_CONNECTED = BIT(0)
, CSK_WIFI_EVT_STA_DISCONNECTED = BIT(1)
, CSK_WIFI_EVT_AP_STARTED = BIT(2)
, CSK_WIFI_EVT_AP_STOPPED = BIT(3)
,
CSK_WIFI_EVT_AP_STACONNECTED = BIT(4)
, CSK_WIFI_EVT_AP_STADISCONNECTED = BIT(5)
, CSK_WIFI_EVT_SCAN_DONE = BIT(6)
, CSK_WIFI_EVT_STA_CONNECTING = BIT(7)
} |
| CSK WiFi events structure. More...
|
|
◆ CSK_WIFI_BSSID_LEN
#define CSK_WIFI_BSSID_LEN 17 |
◆ CSK_WIFI_PWD_LEN
#define CSK_WIFI_PWD_LEN 64 |
◆ CSK_WIFI_SSID_LEN
#define CSK_WIFI_SSID_LEN 32 |
◆ CSK_WIFI_STATUS_STA_CONNECTED
#define CSK_WIFI_STATUS_STA_CONNECTED 0 |
◆ CSK_WIFI_STATUS_STA_DISCONNECTED
#define CSK_WIFI_STATUS_STA_DISCONNECTED 2 |
◆ CSK_WIFI_STATUS_STA_UNKNOWN
#define CSK_WIFI_STATUS_STA_UNKNOWN 3 |
◆ csk_wifi_event_cb_t
CSK WIFI callback structure.
Used to register a callback in the csk_wifi driver instance callback list. As many callbacks as needed can be added as long as each of them are unique pointers of struct csk_wifi_event_cb. Beware such structure should not be allocated on stack.
TODO: add a callback initializer
◆ wifi_event_cb_t
WIFI event handler type (will be invoked in csk_wifi_event_cb_t
)
◆ csk_wifi_bandwidth_t
CSK WiFi bandwidth mode.
Enumerator |
---|
CSK_WIFI_BW_HT20 | |
CSK_WIFI_BW_HT40 | |
◆ csk_wifi_encryption_mode_t
CSK WiFi encryption mode.
Enumerator |
---|
CSK_WIFI_AUTH_OPEN | |
CSK_WIFI_AUTH_WEP | |
CSK_WIFI_AUTH_WPA_PSK | |
CSK_WIFI_AUTH_WPA2_PSK | |
CSK_WIFI_AUTH_WPA_WPA2_PSK | |
CSK_WIFI_AUTH_WPA2_ENTERPRISE | |
CSK_WIFI_AUTH_WPA3_PSK | |
CSK_WIFI_AUTH_WPA2_WPA3_PSK | |
CSK_WIFI_AUTH_MAX | |
◆ csk_wifi_event_t
CSK WiFi events structure.
Enumerator |
---|
CSK_WIFI_EVT_STA_CONNECTED | |
CSK_WIFI_EVT_STA_DISCONNECTED | |
CSK_WIFI_EVT_AP_STARTED | |
CSK_WIFI_EVT_AP_STOPPED | |
CSK_WIFI_EVT_AP_STACONNECTED | |
CSK_WIFI_EVT_AP_STADISCONNECTED | |
CSK_WIFI_EVT_SCAN_DONE | |
CSK_WIFI_EVT_STA_CONNECTING | |
◆ csk_wifi_result_t
CSK WiFi operation(API) results structure.
Enumerator |
---|
CSK_WIFI_SUCCESS | |
CSK_WIFI_ERR_STA_FAILED | |
CSK_WIFI_ERR_AP_FAILED | |
CSK_WIFI_ERR_AP_NOT_FOUND | |
CSK_WIFI_ERR_INVALID_PASSWORD | |
CSK_WIFI_ERR_SCAN_FAILED | |
◆ csk_wifi_add_callback()
Add an wifi event callback.
- Parameters
-
wifi_event_cb[in] | Application's callback structure pointer. |
- Returns
- 0 if successful, negative errno code on failure.
◆ csk_wifi_deinit()
int csk_wifi_deinit |
( |
void |
| ) |
|
CSK WiFi driver deinitialize.
- Returns
- 0 if successful, negative errno code on failure.
◆ csk_wifi_init()
int csk_wifi_init |
( |
void |
| ) |
|
CSK WiFi driver initialize.
- Returns
- 0 if successful, negative errno code on failure.
◆ csk_wifi_remove_callback()
Remove an wifi event callback.
- Parameters
-
wifi_event_cb[in] | Application's callback structure pointer. |
- Return values
-
0 | Success |
-ENXIO(6) | wifi event callback not found |
◆ csk_wifi_scan_ap()
Scan the neighboring AP device.
- Parameters
-
ap_info[in/out] | Pointer to WiFi AP information structure |
result[out] | Pointer to WIFI operation result |
timeout[in] | How long to try to scan neighboring WIFI Access Point |
- Note
- timeout parameter only supports K_FOREVER or K_NO_WAIT
- Returns
- Number of neighboring APs imformation
- Return values
-
-EAGAIN(11) | errno code if timeout or invalid state |
-ENOMEM(12) | errno code if insufficient memory |
-EIO(5) | errno code if wlan driver exceptions occur |