28#ifndef IOTEXPRESSLINK3_H
29#define IOTEXPRESSLINK3_H
39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
73#define IOTEXPRESSLINK3_CMD_AT "AT"
74#define IOTEXPRESSLINK3_CMD_CONNECT "AT+CONNECT"
75#define IOTEXPRESSLINK3_CMD_CONNECT_CHECK "AT+CONNECT?"
76#define IOTEXPRESSLINK3_CMD_DISCONNECT "AT+DISCONNECT"
77#define IOTEXPRESSLINK3_CMD_SLEEP "AT+SLEEP"
78#define IOTEXPRESSLINK3_CMD_CONFMODE "AT+CONFMODE"
79#define IOTEXPRESSLINK3_CMD_RESET "AT+RESET"
80#define IOTEXPRESSLINK3_CMD_FACTORY_RESET "AT+FACTORY_RESET"
81#define IOTEXPRESSLINK3_CMD_SEND "AT+SEND"
82#define IOTEXPRESSLINK3_CMD_GET "AT+GET"
83#define IOTEXPRESSLINK3_CMD_SUBSCRIBE "AT+SUBSCRIBE"
84#define IOTEXPRESSLINK3_CMD_UNSUBSCRIBE "AT+UNSUBSCRIBE"
85#define IOTEXPRESSLINK3_CMD_CONF "AT+CONF"
86#define IOTEXPRESSLINK3_CMD_CONF_CHECK "AT+CONF?"
87#define IOTEXPRESSLINK3_CMD_EVENT "AT+EVENT?"
88#define IOTEXPRESSLINK3_CMD_TIME "AT+TIME?"
89#define IOTEXPRESSLINK3_CMD_WHERE "AT+WHERE?"
90#define IOTEXPRESSLINK3_CMD_SEPARATOR " "
91#define IOTEXPRESSLINK3_CMD_SIGN_EQUAL "="
97#define IOTEXPRESSLINK3_CONF_KEY_ABOUT "About"
98#define IOTEXPRESSLINK3_CONF_KEY_VERSION "Version"
99#define IOTEXPRESSLINK3_CONF_KEY_TECH_SPEC "TechSpec"
100#define IOTEXPRESSLINK3_CONF_KEY_THING_NAME "ThingName"
101#define IOTEXPRESSLINK3_CONF_KEY_CERTIFICATE "Certificate"
102#define IOTEXPRESSLINK3_CONF_KEY_CUSTOM_NAME "CustomName"
103#define IOTEXPRESSLINK3_CONF_KEY_ENDPOINT "Endpoint"
104#define IOTEXPRESSLINK3_CONF_KEY_ROOT_CA "RootCA"
105#define IOTEXPRESSLINK3_CONF_KEY_DEFENDER "Defender"
106#define IOTEXPRESSLINK3_CONF_KEY_HOTA_CERTIFICATE "HOTAcertificate"
107#define IOTEXPRESSLINK3_CONF_KEY_OTA_CERTIFICATE "OTAcertificate"
108#define IOTEXPRESSLINK3_CONF_KEY_SSID "SSID"
109#define IOTEXPRESSLINK3_CONF_KEY_PASSPHRASE "Passphrase"
110#define IOTEXPRESSLINK3_CONF_KEY_APN "APN"
111#define IOTEXPRESSLINK3_CONF_KEY_QOS "QOS"
112#define IOTEXPRESSLINK3_CONF_KEY_TOPIC "Topic"
118#define IOTEXPRESSLINK3_RSP_OK "OK"
119#define IOTEXPRESSLINK3_RSP_ERR "ERR"
126#define IOTEXPRESSLINK3_TX_DRV_BUFFER_SIZE 300
127#define IOTEXPRESSLINK3_RX_DRV_BUFFER_SIZE 1000
145#define IOTEXPRESSLINK3_MAP_MIKROBUS( cfg, mikrobus ) \
146 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
147 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
148 cfg.rsn = MIKROBUS( mikrobus, MIKROBUS_AN ); \
149 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
150 cfg.wake = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
151 cfg.event = MIKROBUS( mikrobus, MIKROBUS_INT );
#define IOTEXPRESSLINK3_RX_DRV_BUFFER_SIZE
Definition iotexpresslink3.h:127
#define IOTEXPRESSLINK3_TX_DRV_BUFFER_SIZE
IoT ExpressLink 3 driver buffer size.
Definition iotexpresslink3.h:126
void iotexpresslink3_send_cmd(iotexpresslink3_t *ctx, uint8_t *cmd)
IoT ExpressLink 3 send cmd function.
void iotexpresslink3_disable_device(iotexpresslink3_t *ctx)
IoT ExpressLink 3 disable device function.
void iotexpresslink3_cfg_setup(iotexpresslink3_cfg_t *cfg)
IoT ExpressLink 3 configuration object setup function.
uint8_t iotexpresslink3_get_rsn_pin(iotexpresslink3_t *ctx)
IoT ExpressLink 3 get rsn pin function.
void iotexpresslink3_reset_device(iotexpresslink3_t *ctx)
IoT ExpressLink 3 reset device function.
uint8_t iotexpresslink3_get_event_pin(iotexpresslink3_t *ctx)
IoT ExpressLink 3 get event pin function.
err_t iotexpresslink3_generic_read(iotexpresslink3_t *ctx, uint8_t *data_out, uint16_t len)
IoT ExpressLink 3 data reading function.
err_t iotexpresslink3_init(iotexpresslink3_t *ctx, iotexpresslink3_cfg_t *cfg)
IoT ExpressLink 3 initialization function.
err_t iotexpresslink3_generic_write(iotexpresslink3_t *ctx, uint8_t *data_in, uint16_t len)
IoT ExpressLink 3 data writing function.
void iotexpresslink3_enable_device(iotexpresslink3_t *ctx)
IoT ExpressLink 3 enable device function.
uint8_t iotexpresslink3_get_wake_pin(iotexpresslink3_t *ctx)
IoT ExpressLink 3 get wake pin function.
iotexpresslink3_return_value_t
IoT ExpressLink 3 Click return value data.
Definition iotexpresslink3.h:209
@ IOTEXPRESSLINK3_ERROR_TIMEOUT
Definition iotexpresslink3.h:212
@ IOTEXPRESSLINK3_ERROR_CMD
Definition iotexpresslink3.h:213
@ IOTEXPRESSLINK3_ERROR
Definition iotexpresslink3.h:211
@ IOTEXPRESSLINK3_ERROR_UNKNOWN
Definition iotexpresslink3.h:214
@ IOTEXPRESSLINK3_OK
Definition iotexpresslink3.h:210
IoT ExpressLink 3 Click configuration object.
Definition iotexpresslink3.h:184
uint32_t baud_rate
Definition iotexpresslink3.h:196
pin_name_t wake
Definition iotexpresslink3.h:192
pin_name_t rsn
Definition iotexpresslink3.h:193
bool uart_blocking
Definition iotexpresslink3.h:197
uart_data_bits_t data_bit
Definition iotexpresslink3.h:198
pin_name_t tx_pin
Definition iotexpresslink3.h:187
pin_name_t rx_pin
Definition iotexpresslink3.h:186
uart_stop_bits_t stop_bit
Definition iotexpresslink3.h:200
uart_parity_t parity_bit
Definition iotexpresslink3.h:199
pin_name_t event
Definition iotexpresslink3.h:191
pin_name_t rst
Definition iotexpresslink3.h:190
IoT ExpressLink 3 Click context object.
Definition iotexpresslink3.h:161
digital_in_t event
Definition iotexpresslink3.h:166
digital_in_t wake
Definition iotexpresslink3.h:167
uart_t uart
Definition iotexpresslink3.h:171
digital_in_t rsn
Definition iotexpresslink3.h:168
digital_out_t rst
Definition iotexpresslink3.h:163