Loading...
Searching...
No Matches

Detailed Description

Files

file  wifi.h
 Definitions for netdev common Wi-Fi code.
 

Data Structures

struct  wifi_scan_request
 A Wi-Fi scan request. More...
 
struct  wifi_scan_result
 A Wi-Fi scan result. More...
 
struct  wifi_scan_list_node
 Node type in a wifi scan list wifi_scan_list_t. More...
 
struct  wifi_connect_request
 A Wi-Fi connect request. More...
 
struct  wifi_connect_result
 A Wi-Fi connect result. More...
 
struct  wifi_disconnect_request
 A Wi-Fi disconnect request. More...
 
struct  wifi_disconnect_result
 A Wi-Fi disconnect result. More...
 

Macros

#define WIFI_SCAN_REQUEST_INITIALIZER(ch, cb, ms)
 Static initializer for a wifi_scan_request_t.
 
#define WIFI_SCAN_RESULT_INITIALIZER(ch, str, sec)
 Static initializer for a wifi_scan_result_t.
 
#define WIFI_SCAN_LIST_INITIALIZER(list)
 Static initializer for a wifi_scan_list_t.
 
#define WIFI_CONNECT_REQUEST_INITIALIZER(ch, ccb, dcb, cr)
 Static initializer for a wifi_connect_request_t.
 
#define WIFI_CONNECT_RESULT_INITIALIZER(ch, p_ssid)
 Static initializer for a wifi_connect_result_t.
 
#define WIFI_DISCONNECT_REQUEST_INITIALIZER(dcb)
 Static initializer for a wifi_disconnect_request_t.
 
#define WIFI_DISCONNECT_RESULT_INITIALIZER(ch, p_ssid)
 Static initializer for a wifi_disconnect_result_t.
 

Typedefs

typedef struct wifi_scan_request wifi_scan_request_t
 A Wi-Fi scan request.
 
typedef struct wifi_scan_result wifi_scan_result_t
 A Wi-Fi scan result.
 
typedef l2scan_list_t wifi_scan_list_t
 A Wi-Fi scan list.
 
typedef struct wifi_scan_list_node wifi_scan_list_node_t
 Node type in a wifi scan list wifi_scan_list_t.
 
typedef void(* wifi_on_scan_result_t) (void *netif, const wifi_scan_list_t *res)
 Wi-Fi scan result callback prototype.
 
typedef struct wifi_connect_request wifi_connect_request_t
 A Wi-Fi connect request.
 
typedef struct wifi_connect_result wifi_connect_result_t
 A Wi-Fi connect result.
 
typedef void(* wifi_on_connect_result_t) (void *netif, const wifi_connect_result_t *res)
 Wi-Fi connect result callback prototype.
 
typedef struct wifi_disconnect_request wifi_disconnect_request_t
 A Wi-Fi disconnect request.
 
typedef struct wifi_disconnect_result wifi_disconnect_result_t
 A Wi-Fi disconnect result.
 
typedef void(* wifi_on_disconnect_result_t) (void *netif, const wifi_disconnect_result_t *res)
 Wi-Fi disconnect result callback prototype.
 

Macro Definition Documentation

◆ WIFI_CONNECT_REQUEST_INITIALIZER

#define WIFI_CONNECT_REQUEST_INITIALIZER (   ch,
  ccb,
  dcb,
  cr 
)
Value:
.base = NETOPT_CONNECT_REQUEST_INITIALIZER(ch, ccb, dcb), \
.cred = cr, \
.ssid = { 0 }, \
}
struct wifi_connect_request wifi_connect_request_t
A Wi-Fi connect request.
#define NETOPT_CONNECT_REQUEST_INITIALIZER(ch, ccb, dcb)
Static initializer for a netopt_connect_request_t.
Definition netopt.h:1051

Static initializer for a wifi_connect_request_t.

Parameters
chChannel to connect to
ccbOn connect callback
dcbOn disconnect callback
crPointer to credentials

Definition at line 123 of file wifi.h.

◆ WIFI_CONNECT_RESULT_INITIALIZER

#define WIFI_CONNECT_RESULT_INITIALIZER (   ch,
  p_ssid 
)
Value:
.ssid = p_ssid, \
.credentials = { .sec = WIFI_SECURITY_MODE_OPEN }, \
}
struct wifi_connect_result wifi_connect_result_t
A Wi-Fi connect result.
#define NETOPT_CONNECT_RESULT_INITIALIZER(ch)
Static initializer for a netopt_connect_result_t.
Definition netopt.h:1003
@ WIFI_SECURITY_MODE_OPEN
AP is open.
Definition wifi.h:106

Static initializer for a wifi_connect_result_t.

Parameters
chChannel of the connected AP
p_ssidSSID of connected AP

Definition at line 150 of file wifi.h.

◆ WIFI_DISCONNECT_REQUEST_INITIALIZER

#define WIFI_DISCONNECT_REQUEST_INITIALIZER (   dcb)
Value:
}
struct wifi_disconnect_request wifi_disconnect_request_t
A Wi-Fi disconnect request.
#define NETOPT_DISCONNECT_REQUEST_INITIALIZER(dcb)
Static initializer for a netopt_disconnect_request_t.
Definition netopt.h:1070

Static initializer for a wifi_disconnect_request_t.

Parameters
dcbOn disconnect callback

Definition at line 174 of file wifi.h.

◆ WIFI_DISCONNECT_RESULT_INITIALIZER

#define WIFI_DISCONNECT_RESULT_INITIALIZER (   ch,
  p_ssid 
)
Value:
.ssid = p_ssid, \
}
struct wifi_disconnect_result wifi_disconnect_result_t
A Wi-Fi disconnect result.
#define NETOPT_DISCONNECT_RESULT_INITIALIZER(ch)
Static initializer for a netopt_disconnect_result_t.
Definition netopt.h:1020

Static initializer for a wifi_disconnect_result_t.

Parameters
chChannel of no longer connected AP
p_ssidSSID of no longer connected AP

Definition at line 193 of file wifi.h.

◆ WIFI_SCAN_LIST_INITIALIZER

#define WIFI_SCAN_LIST_INITIALIZER (   list)
Value:
.head = (list_node_t *)list, \
}
l2scan_list_t wifi_scan_list_t
A Wi-Fi scan list.
Definition wifi.h:81
List node structure.
Definition list.h:40

Static initializer for a wifi_scan_list_t.

Parameters
listPointer to first list node

Definition at line 88 of file wifi.h.

◆ WIFI_SCAN_REQUEST_INITIALIZER

#define WIFI_SCAN_REQUEST_INITIALIZER (   ch,
  cb,
  ms 
)
Value:
.timeout_ms_per_ch = ms, \
}
struct wifi_scan_request wifi_scan_request_t
A Wi-Fi scan request.
#define NETOPT_SCAN_REQUEST_INITIALIZER(ch, cb)
Static initializer for a netopt_scan_request_t.
Definition netopt.h:985

Static initializer for a wifi_scan_request_t.

Parameters
chChannel to scan or NETOPT_SCAN_REQ_ALL_CH
cbCallback on scan result wifi_on_scan_result_t
msTimeout for each channel to scan

Definition at line 47 of file wifi.h.

◆ WIFI_SCAN_RESULT_INITIALIZER

#define WIFI_SCAN_RESULT_INITIALIZER (   ch,
  str,
  sec 
)
Value:
.base = NETOPT_SCAN_RESULT_INITIALIZER(ch, str), \
.sec_mode = sec, \
.bssid = { 0 }, \
.ssid = { 0 }, \
}
struct wifi_scan_result wifi_scan_result_t
A Wi-Fi scan result.
#define NETOPT_SCAN_RESULT_INITIALIZER(ch, str)
Static initializer for a netopt_scan_result_t.
Definition netopt.h:953

Static initializer for a wifi_scan_result_t.

Parameters
chChannel that was scanned
strReceived signal strength
secAP security mode

Definition at line 70 of file wifi.h.

Typedef Documentation

◆ wifi_on_connect_result_t

typedef void(* wifi_on_connect_result_t) (void *netif, const wifi_connect_result_t *res)

Wi-Fi connect result callback prototype.

Definition at line 160 of file wifi.h.

◆ wifi_on_disconnect_result_t

typedef void(* wifi_on_disconnect_result_t) (void *netif, const wifi_disconnect_result_t *res)

Wi-Fi disconnect result callback prototype.

Definition at line 202 of file wifi.h.

◆ wifi_on_scan_result_t

typedef void(* wifi_on_scan_result_t) (void *netif, const wifi_scan_list_t *res)

Wi-Fi scan result callback prototype.

Definition at line 104 of file wifi.h.

◆ wifi_scan_list_t

A Wi-Fi scan list.

Definition at line 81 of file wifi.h.