CYW43 driver interface. More...
#include "cyw43_config.h"
#include "lwip/netif.h"
#include "lwip/dhcp.h"
#include "cyw43_ll.h"
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | _cyw43_t |
Macros | |
#define | CYW43_DEFAULT_PM cyw43_pm_value(CYW43_PM2_POWERSAVE_MODE, 200, 1, 1, 10) |
Default power management mode. | |
#define | CYW43_AGGRESSIVE_PM cyw43_pm_value(CYW43_PM2_POWERSAVE_MODE, 2000, 1, 1, 10) |
Aggressive power management mode for optimial power usage at the cost of performance. | |
#define | CYW43_PERFORMANCE_PM cyw43_pm_value(CYW43_PM2_POWERSAVE_MODE, 20, 1, 1, 1) |
Performance power management mode where more power is used to increase performance. | |
Trace flags | |
#define | CYW43_TRACE_ASYNC_EV (0x0001) |
#define | CYW43_TRACE_ETH_TX (0x0002) |
#define | CYW43_TRACE_ETH_RX (0x0004) |
#define | CYW43_TRACE_ETH_FULL (0x0008) |
#define | CYW43_TRACE_MAC (0x0010) |
Link status | |
| |
#define | CYW43_LINK_DOWN (0) |
link is down | |
#define | CYW43_LINK_JOIN (1) |
Connected to wifi. | |
#define | CYW43_LINK_NOIP (2) |
Connected to wifi, but no IP address. | |
#define | CYW43_LINK_UP (3) |
Connect to wifi with an IP address. | |
#define | CYW43_LINK_FAIL (-1) |
Connection failed. | |
#define | CYW43_LINK_NONET (-2) |
No matching SSID found (could be out of range, or down) | |
#define | CYW43_LINK_BADAUTH (-3) |
Typedefs | |
typedef struct _cyw43_t | cyw43_t |
Functions | |
void | cyw43_init (cyw43_t *self) |
Initialize the driver. More... | |
void | cyw43_deinit (cyw43_t *self) |
Shut the driver down. More... | |
int | cyw43_ioctl (cyw43_t *self, uint32_t cmd, size_t len, uint8_t *buf, uint32_t iface) |
Send an ioctl command to cyw43. More... | |
int | cyw43_send_ethernet (cyw43_t *self, int itf, size_t len, const void *buf, bool is_pbuf) |
Send a raw ethernet packet. More... | |
int | cyw43_wifi_pm (cyw43_t *self, uint32_t pm) |
Set the wifi power management mode. More... | |
int | cyw43_wifi_get_pm (cyw43_t *self, uint32_t *pm) |
Get the wifi power management mode. More... | |
int | cyw43_wifi_link_status (cyw43_t *self, int itf) |
Get the wifi link status. More... | |
void | cyw43_wifi_set_up (cyw43_t *self, int itf, bool up, uint32_t country) |
Set up and initialise wifi. More... | |
int | cyw43_wifi_get_mac (cyw43_t *self, int itf, uint8_t mac[6]) |
Get the mac address of the device. More... | |
int | cyw43_wifi_update_multicast_filter (cyw43_t *self, uint8_t *addr, bool add) |
Add/remove multicast group address. More... | |
int | cyw43_wifi_scan (cyw43_t *self, cyw43_wifi_scan_options_t *opts, void *env, int(*result_cb)(void *, const cyw43_ev_scan_result_t *)) |
Perform a wifi scan for wifi networks. More... | |
static bool | cyw43_wifi_scan_active (cyw43_t *self) |
Determine if a wifi scan is in progress. More... | |
int | cyw43_wifi_join (cyw43_t *self, size_t ssid_len, const uint8_t *ssid, size_t key_len, const uint8_t *key, uint32_t auth_type, const uint8_t *bssid, uint32_t channel) |
Connect or join a wifi network. More... | |
int | cyw43_wifi_leave (cyw43_t *self, int itf) |
Dissassociate from a wifi network. More... | |
int | cyw43_wifi_get_rssi (cyw43_t *self, int32_t *rssi) |
Get the signal strength (RSSI) of the wifi network. More... | |
int | cyw43_wifi_get_bssid (cyw43_t *self, uint8_t bssid[6]) |
Get the BSSID of the connected wifi network. More... | |
static void | cyw43_wifi_ap_get_ssid (cyw43_t *self, size_t *len, const uint8_t **buf) |
Get the ssid for the access point. More... | |
static uint32_t | cyw43_wifi_ap_get_auth (cyw43_t *self) |
Get the security authorisation used in AP mode. More... | |
static void | cyw43_wifi_ap_set_channel (cyw43_t *self, uint32_t channel) |
Set the the channel for the access point. More... | |
static void | cyw43_wifi_ap_set_ssid (cyw43_t *self, size_t len, const uint8_t *buf) |
Set the ssid for the access point. More... | |
static void | cyw43_wifi_ap_set_password (cyw43_t *self, size_t len, const uint8_t *buf) |
Set the password for the wifi access point. More... | |
static void | cyw43_wifi_ap_set_auth (cyw43_t *self, uint32_t auth) |
Set the security authorisation used in AP mode. More... | |
void | cyw43_wifi_ap_get_max_stas (cyw43_t *self, int *max_stas) |
Get the maximum number of devices (STAs) that can be associated with the wifi access point. More... | |
void | cyw43_wifi_ap_get_stas (cyw43_t *self, int *num_stas, uint8_t *macs) |
Get the number of devices (STAs) associated with the wifi access point. More... | |
static bool | cyw43_is_initialized (cyw43_t *self) |
Determines if the cyw43 driver been initialised. More... | |
void | cyw43_cb_tcpip_init (cyw43_t *self, int itf) |
Initialise the IP stack. More... | |
void | cyw43_cb_tcpip_deinit (cyw43_t *self, int itf) |
Deinitialise the IP stack. More... | |
void | cyw43_cb_tcpip_set_link_up (cyw43_t *self, int itf) |
Notify the IP stack that the link is up. More... | |
void | cyw43_cb_tcpip_set_link_down (cyw43_t *self, int itf) |
Notify the IP stack that the link is down. More... | |
int | cyw43_tcpip_link_status (cyw43_t *self, int itf) |
Get the link status. More... | |
static uint32_t | cyw43_pm_value (uint8_t pm_mode, uint16_t pm2_sleep_ret_ms, uint8_t li_beacon_period, uint8_t li_dtim_period, uint8_t li_assoc) |
Return a power management value to pass to cyw43_wifi_pm. More... | |
Variables | |
cyw43_t | cyw43_state |
void(* | cyw43_poll )(void) |
uint32_t | cyw43_sleep |
CYW43 driver interface.