7#ifndef ZEPHYR_DRIVERS_WIFI_ESWIFI_ESWIFI_H_
8#define ZEPHYR_DRIVERS_WIFI_ESWIFI_ESWIFI_H_
19#define MAX_DATA_SIZE 1600
21#define AT_OK_STR "\r\nOK\r\n> "
22#define AT_OK_STR_LEN 8
23#define AT_RSP_DELIMITER "\r\n"
24#define AT_RSP_DELIMITER_LEN 2
85 char *rsp,
size_t rlen);
89 size_t clen,
char *rsp,
size_t rlen)
137 int proto,
void *context);
143#if defined(CONFIG_NET_SOCKETS_OFFLOAD)
147#if defined(CONFIG_WIFI_ESWIFI_SHELL)
150#define eswifi_shell_register(dev)
atomic_t atomic_val_t
Definition: atomic.h:22
int atomic_t
Definition: atomic.h:21
static ALWAYS_INLINE atomic_val_t atomic_set(atomic_t *target, atomic_val_t value)
Definition: atomic_xtensa.h:70
static ALWAYS_INLINE atomic_val_t atomic_get(const atomic_t *target)
Definition: atomic_xtensa.h:16
static void eswifi_lock(struct eswifi_dev *eswifi)
Definition: eswifi.h:94
struct eswifi_bus_ops * eswifi_get_bus(void)
Definition: eswifi_bus_spi.c:280
int eswifi_at_cmd_rsp(struct eswifi_dev *eswifi, char *cmd, char **rsp)
Definition: eswifi_core.c:127
static struct eswifi_dev * eswifi_socket_to_dev(struct eswifi_off_socket *socket)
Definition: eswifi.h:122
#define eswifi_shell_register(dev)
Definition: eswifi.h:150
void eswifi_async_msg(struct eswifi_dev *eswifi, char *msg, size_t len)
Definition: eswifi_core.c:502
struct eswifi_dev * eswifi_by_iface_idx(uint8_t iface)
Definition: eswifi_core.c:175
void eswifi_offload_async_msg(struct eswifi_dev *eswifi, char *msg, size_t len)
Definition: eswifi_offload.c:444
#define MAX_DATA_SIZE
Definition: eswifi.h:19
eswifi_role
Definition: eswifi.h:47
@ ESWIFI_ROLE_AP
Definition: eswifi.h:49
@ ESWIFI_ROLE_CLIENT
Definition: eswifi.h:48
eswifi_security_type
Definition: eswifi.h:31
@ ESWIFI_SEC_WPA2_AES
Definition: eswifi.h:35
@ ESWIFI_SEC_WPA2_MIXED
Definition: eswifi.h:36
@ ESWIFI_SEC_WEP
Definition: eswifi.h:33
@ ESWIFI_SEC_MAX
Definition: eswifi.h:37
@ ESWIFI_SEC_OPEN
Definition: eswifi.h:32
@ ESWIFI_SEC_WPA
Definition: eswifi.h:34
static void eswifi_unlock(struct eswifi_dev *eswifi)
Definition: eswifi.h:106
int eswifi_at_cmd(struct eswifi_dev *eswifi, char *cmd)
Definition: eswifi_core.c:170
int eswifi_offload_init(struct eswifi_dev *eswifi)
Definition: eswifi_offload.c:560
eswifi_request
Definition: eswifi.h:40
@ ESWIFI_REQ_SCAN
Definition: eswifi.h:41
@ ESWIFI_REQ_NONE
Definition: eswifi.h:44
@ ESWIFI_REQ_CONNECT
Definition: eswifi.h:42
@ ESWIFI_REQ_DISCONNECT
Definition: eswifi.h:43
#define ESWIFI_OFFLOAD_MAX_SOCKETS
Definition: eswifi_offload.h:13
static struct eswifi_dev * eswifi
Definition: eswifi_shell.c:12
int eswifi_socket_offload_init(struct eswifi_dev *leswifi)
Definition: eswifi_socket_offload.c:669
#define K_FOREVER
Generate infinite timeout delay.
Definition: kernel.h:1186
static void cmd(uint32_t command)
Execute a display list command by co-processor engine.
Definition: ft8xx_reference_api.h:153
size_t socklen_t
Definition: net_ip.h:161
int k_mutex_unlock(struct k_mutex *mutex)
Unlock a mutex.
int k_mutex_lock(struct k_mutex *mutex, k_timeout_t timeout)
Lock a mutex.
#define CONTAINER_OF(ptr, type, field)
Get a pointer to a container structure from an element.
Definition: util.h:131
int snprintk(char *str, size_t size, const char *fmt,...)
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
__UINTPTR_TYPE__ uintptr_t
Definition: stdint.h:75
Runtime device structure (in ROM) per driver instance.
Definition: device.h:367
int(* request)(struct eswifi_dev *eswifi, char *cmd, size_t clen, char *rsp, size_t rlen)
Definition: eswifi.h:84
int(* init)(struct eswifi_dev *eswifi)
Definition: eswifi.h:83
struct eswifi_gpio resetn
Definition: eswifi.h:65
void * bus_data
Definition: eswifi.h:78
enum eswifi_role role
Definition: eswifi.h:72
struct net_if * iface
Definition: eswifi.h:63
struct eswifi_gpio wakeup
Definition: eswifi.h:66
char buf[1600]
Definition: eswifi.h:74
struct eswifi_bus_ops * bus
Definition: eswifi.h:64
uint8_t mac[6]
Definition: eswifi.h:73
struct eswifi_off_socket socket[4]
Definition: eswifi.h:79
enum eswifi_request req
Definition: eswifi.h:71
scan_result_cb_t scan_cb
Definition: eswifi.h:67
atomic_val_t mutex_owner
Definition: eswifi.h:76
struct eswifi_sta sta
Definition: eswifi.h:70
struct k_work request_work
Definition: eswifi.h:69
unsigned int mutex_depth
Definition: eswifi.h:77
struct k_mutex mutex
Definition: eswifi.h:75
struct k_work_q work_q
Definition: eswifi.h:68
const struct device * dev
Definition: eswifi.h:27
unsigned int pin
Definition: eswifi.h:28
Definition: eswifi_offload.h:29
enum eswifi_security_type security
Definition: eswifi.h:54
uint8_t channel
Definition: eswifi.h:57
char pass[65]
Definition: eswifi.h:55
char ssid[WIFI_SSID_MAX_LEN+1]
Definition: eswifi.h:53
bool connected
Definition: eswifi.h:56
Definition: kernel.h:2680
A structure used to hold work until it can be processed.
Definition: kernel.h:3770
A structure used to submit work.
Definition: kernel.h:3623
Network Interface structure.
Definition: net_if.h:468
#define WIFI_SSID_MAX_LEN
Definition: wifi.h:20
WiFi L2 stack public header.
void(* scan_result_cb_t)(struct net_if *iface, int status, struct wifi_scan_result *entry)
Definition: wifi_mgmt.h:113
NMI_API SOCKET socket(uint16 u16Domain, uint8 u8Type, uint8 u8Flags)