wifi9 2.0.0.0
wifi9.h File Reference

This file contains API for Wifi 9 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  wifi9_t
 Click ctx object definition. More...
 
struct  wifi9_cfg_t
 Click configuration structure definition. More...
 

Macros

#define WIFI9_MAP_MIKROBUS(cfg, mikrobus)
 
#define WIFI9_OK   0
 
#define WIFI9_ERROR   -1
 
#define WIFI9_ERROR_TIMEOUT   -2
 
#define WIFI9_MODULE_POWER_ON   1
 
#define WIFI9_MODULE_POWER_OFF   0
 
#define WIFI9_SELECT_CMD_UART   0
 
#define WIFI9_SELECT_BIN_UART   1
 
#define WIFI9_CMD_GET_SYSTEM_FIRMWARE   "get system firmware"
 
#define WIFI9_CMD_GET_SYSTEM_MAC_ADDR   "get system macaddr"
 
#define WIFI9_CMD_GET_SYSTEM_SERIAL_NUM   "get system serialnum"
 
#define WIFI9_CMD_GET_SYSTEM_RADIO_VER   "get system radio_ver"
 
#define WIFI9_CMD_GET_SYSTEM_BOOTL_VER   "get system bootl_ver"
 
#define WIFI9_CMD_GET_SYSTEM_HW_REV   "get system hwrev"
 
#define WIFI9_CMD_GET_WLAN_STATE   "get wlan state"
 
#define WIFI9_CMD_GET_WLAN_STATE_STA   "get wlan state sta"
 
#define WIFI9_CMD_SET_WLAN_STATE   "set wlan state"
 
#define WIFI9_CMD_SET_WLAN_STATE_STA_ON   "set wlan state sta on"
 
#define WIFI9_CMD_SET_WLAN_CFG   "set wlan cfg"
 
#define WIFI9_CMD_SET_WLAN_CFG_STA   "set wlan cfg sta"
 
#define WIFI9_CMD_SET_NETCAT_STATE   "set netcat state"
 
#define WIFI9_CMD_SET_NETCAT_STATE_OFF   "set netcat state off"
 
#define WIFI9_CMD_SET_NETCAT_STATE_ON   "set netcat state on"
 
#define WIFI9_CMD_SET_NETCAT_CFG   "set netcat cfg"
 
#define WIFI9_CMD_SET_NETCAT_CFG_SERVER   "set netcat cfg server"
 
#define WIFI9_CMD_SET_NETCAT_AUTH   "set netcat auth"
 
#define WIFI9_CMD_SET_NETCAT_AUTH_OFF   "set netcat auth off"
 
#define WIFI9_CMD_GET_NET_CFG   "get net cfg"
 
#define WIFI9_CMD_GET_NET_CFG_STA   "get net cfg sta"
 
#define WIFI9_DRV_TX_BUFFER_SIZE   300
 
#define WIFI9_DRV_RX_BUFFER_SIZE   500
 

Functions

void wifi9_cfg_setup (wifi9_cfg_t *cfg)
 Config Object Initialization function.
 
err_t wifi9_init (wifi9_t *ctx, wifi9_cfg_t *cfg)
 Initialization function.
 
void wifi9_reset_device (wifi9_t *ctx)
 Module reset.
 
void wifi9_set_rst_pin (wifi9_t *ctx, uint8_t state)
 Set RST pin state.
 
void wifi9_set_rts_pin (wifi9_t *ctx, uint8_t state)
 Set RTS pin state.
 
void wifi9_select_uart (wifi9_t *ctx, uint8_t uart_select)
 Switch to a command or binary uart.
 
uint8_t wifi9_get_mcr_pin (wifi9_t *ctx)
 Get MCR pin state.
 
uint8_t wifi9_get_cts_pin (wifi9_t *ctx)
 Get CTS pin state.
 
void wifi9_generic_write (wifi9_t *ctx, uint8_t *data_buf, uint16_t len)
 Generic write function.
 
int32_t wifi9_generic_read (wifi9_t *ctx, uint8_t *data_buf, uint16_t max_len)
 Generic read function.
 
void wifi9_send_command (wifi9_t *ctx, uint8_t *command)
 Send Command function.
 

Detailed Description

This file contains API for Wifi 9 Click driver.