28#ifndef IOTEXPRESSLINK_H
29#define IOTEXPRESSLINK_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 IOTEXPRESSLINK_CMD_AT "AT"
74#define IOTEXPRESSLINK_CMD_CONNECT "AT+CONNECT"
75#define IOTEXPRESSLINK_CMD_CONNECT_CHECK "AT+CONNECT?"
76#define IOTEXPRESSLINK_CMD_DISCONNECT "AT+DISCONNECT"
77#define IOTEXPRESSLINK_CMD_SLEEP "AT+SLEEP"
78#define IOTEXPRESSLINK_CMD_CONFMODE "AT+CONFMODE"
79#define IOTEXPRESSLINK_CMD_RESET "AT+RESET"
80#define IOTEXPRESSLINK_CMD_FACTORY_RESET "AT+FACTORY_RESET"
81#define IOTEXPRESSLINK_CMD_SEND "AT+SEND"
82#define IOTEXPRESSLINK_CMD_GET "AT+GET"
83#define IOTEXPRESSLINK_CMD_SUBSCRIBE "AT+SUBSCRIBE"
84#define IOTEXPRESSLINK_CMD_UNSUBSCRIBE "AT+UNSUBSCRIBE"
85#define IOTEXPRESSLINK_CMD_CONF "AT+CONF"
86#define IOTEXPRESSLINK_CMD_CONF_CHECK "AT+CONF?"
87#define IOTEXPRESSLINK_CMD_EVENT "AT+EVENT?"
88#define IOTEXPRESSLINK_CMD_TIME "AT+TIME"
89#define IOTEXPRESSLINK_CMD_WHERE "AT+WHERE"
90#define IOTEXPRESSLINK_CMD_SEPARATOR " "
91#define IOTEXPRESSLINK_CMD_SIGN_EQUAL "="
97#define IOTEXPRESSLINK_CONF_KEY_ABOUT "About"
98#define IOTEXPRESSLINK_CONF_KEY_VERSION "Version"
99#define IOTEXPRESSLINK_CONF_KEY_TECH_SPEC "TechSpec"
100#define IOTEXPRESSLINK_CONF_KEY_THING_NAME "ThingName"
101#define IOTEXPRESSLINK_CONF_KEY_CERTIFICATE "Certificate"
102#define IOTEXPRESSLINK_CONF_KEY_CUSTOM_NAME "CustomName"
103#define IOTEXPRESSLINK_CONF_KEY_ENDPOINT "Endpoint"
104#define IOTEXPRESSLINK_CONF_KEY_ROOT_CA "RootCA"
105#define IOTEXPRESSLINK_CONF_KEY_DEFENDER "Defender"
106#define IOTEXPRESSLINK_CONF_KEY_HOTA_CERTIFICATE "HOTAcertificate"
107#define IOTEXPRESSLINK_CONF_KEY_OTA_CERTIFICATE "OTAcertificate"
108#define IOTEXPRESSLINK_CONF_KEY_SSID "SSID"
109#define IOTEXPRESSLINK_CONF_KEY_PASSPHRASE "Passphrase"
110#define IOTEXPRESSLINK_CONF_KEY_APN "APN"
111#define IOTEXPRESSLINK_CONF_KEY_QOS "QOS"
112#define IOTEXPRESSLINK_CONF_KEY_TOPIC "Topic"
118#define IOTEXPRESSLINK_RSP_OK "OK"
119#define IOTEXPRESSLINK_RSP_ERR "ERR"
126#define IOTEXPRESSLINK_TX_DRV_BUFFER_SIZE 300
127#define IOTEXPRESSLINK_RX_DRV_BUFFER_SIZE 1000
145#define IOTEXPRESSLINK_MAP_MIKROBUS( cfg, mikrobus ) \
146 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
147 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
148 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
149 cfg.wake = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
150 cfg.event = MIKROBUS( mikrobus, MIKROBUS_INT );
#define IOTEXPRESSLINK_RX_DRV_BUFFER_SIZE
Definition iotexpresslink.h:127
#define IOTEXPRESSLINK_TX_DRV_BUFFER_SIZE
IoT ExpressLink driver buffer size.
Definition iotexpresslink.h:126
uint8_t iotexpresslink_get_wake_pin(iotexpresslink_t *ctx)
IoT ExpressLink get wake pin function.
void iotexpresslink_reset_device(iotexpresslink_t *ctx)
IoT ExpressLink reset device function.
uint8_t iotexpresslink_get_event_pin(iotexpresslink_t *ctx)
IoT ExpressLink get event pin function.
void iotexpresslink_enable_device(iotexpresslink_t *ctx)
IoT ExpressLink enable device function.
err_t iotexpresslink_generic_write(iotexpresslink_t *ctx, uint8_t *data_in, uint16_t len)
IoT ExpressLink data writing function.
err_t iotexpresslink_generic_read(iotexpresslink_t *ctx, uint8_t *data_out, uint16_t len)
IoT ExpressLink data reading function.
void iotexpresslink_cfg_setup(iotexpresslink_cfg_t *cfg)
IoT ExpressLink configuration object setup function.
err_t iotexpresslink_init(iotexpresslink_t *ctx, iotexpresslink_cfg_t *cfg)
IoT ExpressLink initialization function.
void iotexpresslink_disable_device(iotexpresslink_t *ctx)
IoT ExpressLink disable device function.
void iotexpresslink_send_cmd(iotexpresslink_t *ctx, uint8_t *cmd)
IoT ExpressLink send cmd function.
iotexpresslink_return_value_t
IoT ExpressLink Click return value data.
Definition iotexpresslink.h:206
@ IOTEXPRESSLINK_OK
Definition iotexpresslink.h:207
@ IOTEXPRESSLINK_ERROR_TIMEOUT
Definition iotexpresslink.h:209
@ IOTEXPRESSLINK_ERROR_UNKNOWN
Definition iotexpresslink.h:211
@ IOTEXPRESSLINK_ERROR
Definition iotexpresslink.h:208
@ IOTEXPRESSLINK_ERROR_CMD
Definition iotexpresslink.h:210
IoT ExpressLink Click configuration object.
Definition iotexpresslink.h:182
uint32_t baud_rate
Definition iotexpresslink.h:193
pin_name_t wake
Definition iotexpresslink.h:190
bool uart_blocking
Definition iotexpresslink.h:194
uart_data_bits_t data_bit
Definition iotexpresslink.h:195
pin_name_t tx_pin
Definition iotexpresslink.h:185
pin_name_t rx_pin
Definition iotexpresslink.h:184
uart_stop_bits_t stop_bit
Definition iotexpresslink.h:197
uart_parity_t parity_bit
Definition iotexpresslink.h:196
pin_name_t event
Definition iotexpresslink.h:189
pin_name_t rst
Definition iotexpresslink.h:188
IoT ExpressLink Click context object.
Definition iotexpresslink.h:160
digital_in_t event
Definition iotexpresslink.h:165
digital_in_t wake
Definition iotexpresslink.h:166
uart_t uart
Definition iotexpresslink.h:169
digital_out_t rst
Definition iotexpresslink.h:162