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 LTEIOT4_CMD_AT "AT"
74#define LTEIOT4_CMD_MODULE_VERSION "AT+CGMM"
75#define LTEIOT4_CMD_FW_VERSION "AT+CGMR"
76#define LTEIOT4_CMD_FLIGHT_MODE "AT+CFUN=4"
77#define LTEIOT4_CMD_NBIOT_MODE "AT%XSYSTEMMODE=0,1,0,0"
78#define LTEIOT4_CMD_ENABLE_NET_SMS "AT+CIND=1,0,1"
79#define LTEIOT4_CMD_FULL_FUNCTION "AT+CFUN=1"
80#define LTEIOT4_CMD_AUTO_NET_SRC "AT+COPS=0"
81#define LTEIOT4_CMD_SEARCH_NET "AT+CEREG=2"
82#define LTEIOT4_CMD_SIM_TEST "AT+CIMI"
83#define LTEIOT4_CMD_CHECK_CONNECTION "AT+CGATT?"
84#define LTEIOT4_CMD_CHECK_REGISTARTION "AT+CEREG?"
85#define LTEIOT4_CMD_SIGNAL_QUALITY "AT+CESQ"
86#define LTEIOT4_CMD_SET_DUMMY_CLOCK "AT+CCLK=\"20/12/31,23:59:39+01\""
87#define LTEIOT4_CMD_CHECK_TEMPERATURE "AT%XTEMP?"
88#define LTEIOT4_CMD_CHECK_CLOCK "AT+CCLK?"
95#define DRV_BUFFER_SIZE 500
113#define LTEIOT4_MAP_MIKROBUS( cfg, mikrobus ) \
114 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
115 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
116 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
#define DRV_BUFFER_SIZE
LTE IoT 4 driver buffer size.
Definition lteiot4.h:95
void lteiot4_send_cmd(lteiot4_t *ctx, char *cmd)
Send command function.
void lteiot4_cfg_setup(lteiot4_cfg_t *cfg)
LTE IoT 4 configuration object setup function.
err_t lteiot4_generic_write(lteiot4_t *ctx, char *data_buf, uint16_t len)
LTE IoT 4 data writing function.
err_t lteiot4_generic_read(lteiot4_t *ctx, char *data_buf, uint16_t max_len)
LTE IoT 4 data reading function.
err_t lteiot4_default_cfg(lteiot4_t *ctx)
LTE IoT 4 default configuration function.
err_t lteiot4_init(lteiot4_t *ctx, lteiot4_cfg_t *cfg)
LTE IoT 4 initialization function.
void lteiot4_set_sim_apn(lteiot4_t *ctx, char *sim_apn)
Set sim card APN.
void lteiot4_set_rst(lteiot4_t *ctx, uint8_t state)
Sets state of the rst pin setting.
LTE IoT 4 Click configuration object.
Definition lteiot4.h:144
uint32_t baud_rate
Definition lteiot4.h:154
bool uart_blocking
Definition lteiot4.h:155
uart_data_bits_t data_bit
Definition lteiot4.h:156
pin_name_t tx_pin
Definition lteiot4.h:147
pin_name_t rx_pin
Definition lteiot4.h:146
uart_stop_bits_t stop_bit
Definition lteiot4.h:158
uart_parity_t parity_bit
Definition lteiot4.h:157
pin_name_t rst
Definition lteiot4.h:150
LTE IoT 4 Click context object.
Definition lteiot4.h:126
uart_t uart
Definition lteiot4.h:131
digital_out_t rst
Definition lteiot4.h:128