aiwb212f 2.1.0.0
aiwb212f.h File Reference

This file contains API for Ai-WB2-12F 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  aiwb212f_t
 Ai-WB2-12F Click context object. More...
 
struct  aiwb212f_cfg_t
 Ai-WB2-12F Click configuration object. More...
 

Macros

#define AIWB212F_CMD_AT   "AT"
 Ai-WB2-12F control commands.
 
#define AIWB212F_CMD_AT_HELP   "AT+HELP"
 
#define AIWB212F_CMD_AT_SW_RESET   "AT+RST"
 
#define AIWB212F_CMD_AT_GMR   "AT+GMR"
 
#define AIWB212F_CMD_AT_SLEEP   "AT+SLEEP"
 
#define AIWB212F_CMD_AT_SYSIOMAP   "AT+SYSIOMAP"
 
#define AIWB212F_CMD_AT_SYSGPIOWRITE   "AT+SYSGPIOWRITE"
 
#define AIWB212F_CMD_AT_SYSGPIOREAD   "AT+SYSGPIOREAD"
 
#define AIWB212F_CMD_AT_PWMCFG   "AT+PWMCFG"
 
#define AIWB212F_CMD_AT_PWMCFGS   "AT+PWMCFGS"
 
#define AIWB212F_CMD_AT_PWMSTOP   "AT+PWMSTOP"
 
#define AIWB212F_CMD_AT_PWMDUTYSET   "AT+PWMDUTYSET"
 
#define AIWB212F_CMD_AT_PWMDUTYSETS   "AT+PWMDUTYSETS"
 
#define AIWB212F_CMD_AT_WMODE   "AT+WMODE"
 
#define AIWB212F_CMD_AT_WSCAN   "AT+WSCAN"
 
#define AIWB212F_CMD_AT_WSDHCP   "AT+WSDHCP"
 
#define AIWB212F_CMD_AT_WJAP   "AT+WJAP"
 
#define AIWB212F_CMD_AT_WAUTOCONN   "AT+WAUTOCONN"
 
#define AIWB212F_CMD_AT_WAPDHCP   "AT+WAPDHCP"
 
#define AIWB212F_CMD_AT_WAP   "AT+WAP"
 
#define AIWB212F_CMD_AT_PING   "AT+PING"
 
#define AIWB212F_CMD_AT_CIPSTAMAC_DEF   "AT+CIPSTAMAC_DEF"
 
#define AIWB212F_CMD_AT_WCOUNTRY   "AT+WCOUNTRY"
 
#define AIWB212F_CMD_AT_WCONFIG   "AT+WCONFIG"
 
#define AIWB212F_CMD_AT_SOCKET   "AT+SOCKET"
 
#define AIWB212F_CMD_AT_SOCKETSEND   "AT+SOCKETSEND"
 
#define AIWB212F_CMD_AT_SOCKETSENDLINE   "AT+SOCKETSENDLINE"
 
#define AIWB212F_CMD_AT_SOCKETREAD   "AT+SOCKETREAD"
 
#define AIWB212F_CMD_AT_SOCKETDEL   "AT+SOCKETDEL"
 
#define AIWB212F_CMD_AT_SOCKETRECVCFG   "AT+SOCKETRECVCFG"
 
#define AIWB212F_CMD_AT_SOCKETTT   "AT+SOCKETTT"
 
#define AIWB212F_CMD_AT_MQTT   "AT+MQTT"
 
#define AIWB212F_CMD_AT_MQTTPUB   "AT+MQTTPUB"
 
#define AIWB212F_CMD_AT_MQTTPUBRAW   "AT+MQTTPUBRAW"
 
#define AIWB212F_CMD_AT_MQTTSUB   "AT+MQTTSUB"
 
#define AIWB212F_CMD_AT_BLEMAC   "AT+BLEMAC"
 
#define AIWB212F_CMD_AT_BLEMODE   "AT+BLEMODE"
 
#define AIWB212F_CMD_AT_BLERFPWR   "AT+BLERFPWR"
 
#define AIWB212F_CMD_AT_BLENAME   "AT+BLENAME"
 
#define AIWB212F_RSP_OK   "OK"
 Ai-WB2-12F response codes.
 
#define AIWB212F_RSP_ERROR   "ERROR"
 
#define AIWB212F_RSP_READY   "ready"
 
#define AIWB212F_TX_DRV_BUFFER_SIZE   100
 Ai-WB2-12F driver buffer size.
 
#define AIWB212F_RX_DRV_BUFFER_SIZE   300
 
#define AIWB212F_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  aiwb212f_return_value_t {
  AIWB212F_OK = 0 , AIWB212F_ERROR = -1 , AIWB212F_ERROR_TIMEOUT = -2 , AIWB212F_ERROR_CMD = -3 ,
  AIWB212F_ERROR_UNKNOWN = -4
}
 Ai-WB2-12F Click return value data. More...
 

Functions

void aiwb212f_cfg_setup (aiwb212f_cfg_t *cfg)
 Ai-WB2-12F configuration object setup function.
 
err_t aiwb212f_init (aiwb212f_t *ctx, aiwb212f_cfg_t *cfg)
 Ai-WB2-12F initialization function.
 
err_t aiwb212f_default_cfg (aiwb212f_t *ctx)
 Ai-WB2-12F default configuration function.
 
err_t aiwb212f_generic_write (aiwb212f_t *ctx, uint8_t *data_in, uint16_t len)
 Ai-WB2-12F data writing function.
 
err_t aiwb212f_generic_read (aiwb212f_t *ctx, uint8_t *data_out, uint16_t len)
 Ai-WB2-12F data reading function.
 
void aiwb212f_hw_reset (aiwb212f_t *ctx)
 Ai-WB2-12F hardware reset function.
 
void aiwb212f_send_cmd (aiwb212f_t *ctx, uint8_t *at_cmd_buf)
 Ai-WB2-12F send command function.
 
void aiwb212f_send_cmd_with_par (aiwb212f_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf)
 Ai-WB2-12F send command with parameter function.
 
void aiwb212f_send_cmd_check (aiwb212f_t *ctx, uint8_t *at_cmd_buf)
 Ai-WB2-12F send command check function.
 
void aiwb212f_set_gpio (aiwb212f_t *ctx, uint8_t *pin, uint8_t *state)
 Ai-WB2-12F set gpio pin state function.
 

Detailed Description

This file contains API for Ai-WB2-12F Click Driver.

Enumeration Type Documentation

◆ aiwb212f_return_value_t

Ai-WB2-12F Click return value data.

Predefined enum values for driver return values.

Enumerator
AIWB212F_OK 
AIWB212F_ERROR 
AIWB212F_ERROR_TIMEOUT 
AIWB212F_ERROR_CMD 
AIWB212F_ERROR_UNKNOWN