iotexpresslink2 2.1.0.0
iotexpresslink2.h File Reference

This file contains API for IoT ExpressLink 2 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  iotexpresslink2_t
 IoT ExpressLink 2 Click context object. More...
 
struct  iotexpresslink2_cfg_t
 IoT ExpressLink 2 Click configuration object. More...
 

Macros

#define IOTEXPRESSLINK2_CMD_AT   "AT"
 IoT ExpressLink 2 AT commands list.
 
#define IOTEXPRESSLINK2_CMD_CONNECT   "AT+CONNECT"
 
#define IOTEXPRESSLINK2_CMD_CONNECT_CHECK   "AT+CONNECT?"
 
#define IOTEXPRESSLINK2_CMD_DISCONNECT   "AT+DISCONNECT"
 
#define IOTEXPRESSLINK2_CMD_SLEEP   "AT+SLEEP"
 
#define IOTEXPRESSLINK2_CMD_CONFMODE   "AT+CONFMODE"
 
#define IOTEXPRESSLINK2_CMD_RESET   "AT+RESET"
 
#define IOTEXPRESSLINK2_CMD_FACTORY_RESET   "AT+FACTORY_RESET"
 
#define IOTEXPRESSLINK2_CMD_SEND   "AT+SEND"
 
#define IOTEXPRESSLINK2_CMD_GET   "AT+GET"
 
#define IOTEXPRESSLINK2_CMD_SUBSCRIBE   "AT+SUBSCRIBE"
 
#define IOTEXPRESSLINK2_CMD_UNSUBSCRIBE   "AT+UNSUBSCRIBE"
 
#define IOTEXPRESSLINK2_CMD_CONF   "AT+CONF"
 
#define IOTEXPRESSLINK2_CMD_CONF_CHECK   "AT+CONF?"
 
#define IOTEXPRESSLINK2_CMD_EVENT   "AT+EVENT?"
 
#define IOTEXPRESSLINK2_CMD_TIME   "AT+TIME"
 
#define IOTEXPRESSLINK2_CMD_WHERE   "AT+WHERE"
 
#define IOTEXPRESSLINK2_CMD_SEPARATOR   " "
 
#define IOTEXPRESSLINK2_CMD_SIGN_EQUAL   "="
 
#define IOTEXPRESSLINK2_CONF_KEY_ABOUT   "About"
 IoT ExpressLink 2 config key parameters list.
 
#define IOTEXPRESSLINK2_CONF_KEY_VERSION   "Version"
 
#define IOTEXPRESSLINK2_CONF_KEY_TECH_SPEC   "TechSpec"
 
#define IOTEXPRESSLINK2_CONF_KEY_THING_NAME   "ThingName"
 
#define IOTEXPRESSLINK2_CONF_KEY_CERTIFICATE   "Certificate"
 
#define IOTEXPRESSLINK2_CONF_KEY_CERTIFICATE_PEM   "Certificate pem"
 
#define IOTEXPRESSLINK2_CONF_KEY_CUSTOM_NAME   "CustomName"
 
#define IOTEXPRESSLINK2_CONF_KEY_ENDPOINT   "Endpoint"
 
#define IOTEXPRESSLINK2_CONF_KEY_ROOT_CA   "RootCA"
 
#define IOTEXPRESSLINK2_CONF_KEY_DEFENDER   "Defender"
 
#define IOTEXPRESSLINK2_CONF_KEY_HOTA_CERTIFICATE   "HOTAcertificate"
 
#define IOTEXPRESSLINK2_CONF_KEY_OTA_CERTIFICATE   "OTAcertificate"
 
#define IOTEXPRESSLINK2_CONF_KEY_APN   "APN"
 
#define IOTEXPRESSLINK2_CONF_KEY_QOS   "QOS"
 
#define IOTEXPRESSLINK2_CONF_KEY_TOPIC   "Topic"
 
#define IOTEXPRESSLINK2_RSP_OK   "OK"
 IoT ExpressLink 2 device response for AT commands.
 
#define IOTEXPRESSLINK2_RSP_ERR   "ERR"
 
#define IOTEXPRESSLINK2_EVENT_TIMEOUT   10000ul
 IoT ExpressLink 2 timeout in milliseconds settings.
 
#define IOTEXPRESSLINK2_CONNECT_TIMEOUT   1000000ul
 
#define IOTEXPRESSLINK2_NORMAL_TIMEOUT   5000ul
 
#define IOTEXPRESSLINK2_POWER_ON_DELAY   15
 IoT ExpressLink 2 power settings.
 
#define IOTEXPRESSLINK2_EMERGENCY_SD_DELAY   25
 
#define IOTEXPRESSLINK2_EMERGENCY_SD_RETRY   5
 
#define IOTEXPRESSLINK2_TX_DRV_BUFFER_SIZE   200
 IoT ExpressLink 2 driver buffer size.
 
#define IOTEXPRESSLINK2_RX_DRV_BUFFER_SIZE   900
 
#define IOTEXPRESSLINK2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  iotexpresslink2_return_value_t { IOTEXPRESSLINK2_OK = 0 , IOTEXPRESSLINK2_ERROR = -1 , IOTEXPRESSLINK2_ERROR_TIMEOUT = -2 , IOTEXPRESSLINK2_ERROR_CMD = -3 }
 IoT ExpressLink 2 Click return value data. More...
 

Functions

void iotexpresslink2_cfg_setup (iotexpresslink2_cfg_t *cfg)
 IoT ExpressLink 2 configuration object setup function.
 
err_t iotexpresslink2_init (iotexpresslink2_t *ctx, iotexpresslink2_cfg_t *cfg)
 IoT ExpressLink 2 initialization function.
 
err_t iotexpresslink2_generic_write (iotexpresslink2_t *ctx, uint8_t *data_in, uint16_t len)
 IoT ExpressLink 2 data writing function.
 
err_t iotexpresslink2_generic_read (iotexpresslink2_t *ctx, uint8_t *data_out, uint16_t len)
 IoT ExpressLink 2 data reading function.
 
void iotexpresslink2_send_cmd (iotexpresslink2_t *ctx, uint8_t *cmd)
 IoT ExpressLink 2 send cmd function.
 
void iotexpresslink2_set_pwr_pin (iotexpresslink2_t *ctx, uint8_t state)
 IoT ExpressLink 2 set pwr pin function.
 
void iotexpresslink2_set_rst_pin (iotexpresslink2_t *ctx, uint8_t state)
 IoT ExpressLink 2 set rst pin function.
 
uint8_t iotexpresslink2_get_wake_pin (iotexpresslink2_t *ctx)
 IoT ExpressLink 2 get wake pin function.
 
uint8_t iotexpresslink2_get_event_pin (iotexpresslink2_t *ctx)
 IoT ExpressLink 2 get event pin function.
 
void iotexpresslink2_power_on (iotexpresslink2_t *ctx)
 IoT ExpressLink 2 power on function.
 
void iotexpresslink2_reset_device (iotexpresslink2_t *ctx)
 IoT ExpressLink 2 reset device function.
 

Detailed Description

This file contains API for IoT ExpressLink 2 Click Driver.

Enumeration Type Documentation

◆ iotexpresslink2_return_value_t

IoT ExpressLink 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
IOTEXPRESSLINK2_OK 
IOTEXPRESSLINK2_ERROR 
IOTEXPRESSLINK2_ERROR_TIMEOUT 
IOTEXPRESSLINK2_ERROR_CMD