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 LTEIOT9_CMD_AT "AT"
74#define LTEIOT9_CMD_ATI "ATI"
75#define LTEIOT9_CMD_CGMR "AT+CGMR"
76#define LTEIOT9_CMD_CFUN "AT+CFUN"
77#define LTEIOT9_CMD_CREG "AT+CREG"
78#define LTEIOT9_CMD_CEREG "AT+CEREG"
79#define LTEIOT9_CMD_CGDCONT "AT+CGDCONT"
80#define LTEIOT9_CMD_CIMI "AT+CIMI"
81#define LTEIOT9_CMD_CGATT "AT+CGATT"
82#define LTEIOT9_CMD_CSQ "AT+CSQ"
83#define LTEIOT9_CMD_CESQ "AT+CESQ"
84#define LTEIOT9_CMD_COPS "AT+COPS"
85#define LTEIOT9_CMD_URAT "AT+URAT"
86#define LTEIOT9_CMD_UBANDMASK "AT+UBANDMASK"
87#define LTEIOT9_CMD_URATCONF "AT+URATCONF"
88#define LTEIOT9_CMD_UAUTHREQ "AT+UAUTHREQ"
89#define LTEIOT9_CMD_UUICC "AT+UUICC"
90#define LTEIOT9_CMD_UCGED "AT+UCGED"
91#define LTEIOT9_CMD_UCELLINFO "AT+UCELLINFO"
92#define LTEIOT9_CMD_UANTR "AT+UANTR"
93#define LTEIOT9_CMD_CMGF "AT+CMGF"
112#define LTEIOT9_GNSS_GPGGA "GPGGA"
113#define LTEIOT9_GNSS_START '$'
114#define LTEIOT9_GNSS_SEPARATOR ','
120#define LTEIOT9_GPGGA_LATITUDE 2
121#define LTEIOT9_GPGGA_LONGITUDE 4
122#define LTEIOT9_GPGGA_ALTITUDE 9
128#define LTEIOT9_SYSSTART "^SYSSTART"
134#define LTEIOT9_RSP_OK "OK"
135#define LTEIOT9_RSP_ERROR "ERROR"
142#define DRV_TX_BUFFER_SIZE 200
143#define DRV_RX_BUFFER_SIZE 500
161#define LTEIOT9_MAP_MIKROBUS( cfg, mikrobus ) \
162 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
163 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
164 cfg.smi = MIKROBUS( mikrobus, MIKROBUS_AN ); \
165 cfg.on = MIKROBUS( mikrobus, MIKROBUS_RST ); \
166 cfg.cts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
167 cfg.rts = MIKROBUS( mikrobus, MIKROBUS_INT );
#define DRV_RX_BUFFER_SIZE
Definition lteiot9.h:143
#define DRV_TX_BUFFER_SIZE
LTE IoT 9 driver buffer size.
Definition lteiot9.h:142
void lteiot9_send_cmd_check(lteiot9_t *ctx, char *at_cmd_buf)
Check the sent command.
void lteiot9_set_pin_on(lteiot9_t *ctx, uint8_t state)
Set ON pin state.
void lteiot9_cfg_setup(lteiot9_cfg_t *cfg)
LTE IoT 9 configuration object setup function.
err_t lteiot9_generic_read(lteiot9_t *ctx, char *data_buf, uint16_t max_len)
LTE IoT 9 data reading function.
void lteiot9_send_text_message(lteiot9_t *ctx, char *phone_number, char *message_context)
LTE IoT 9 send text message.
void lteiot9_send_cmd(lteiot9_t *ctx, char *cmd)
Send command function.
err_t lteiot9_init(lteiot9_t *ctx, lteiot9_cfg_t *cfg)
LTE IoT 9 initialization function.
void lteiot9_send_cmd_with_parameter(lteiot9_t *ctx, char *at_cmd_buf, char *param_buf)
Send command function with parameter.
err_t lteiot9_default_cfg(lteiot9_t *ctx)
LTE IoT 9 default configuration function.
void lteiot9_send_cmd_parameter_check(lteiot9_t *ctx, char *at_cmd_buf)
Check the command parameters.
void lteiot9_set_sim_apn(lteiot9_t *ctx, char *sim_apn)
Set sim card APN.
err_t lteiot9_generic_write(lteiot9_t *ctx, char *data_buf, uint16_t len)
LTE IoT 9 data writing function.
lteiot9_return_value_t
LTE IoT 9 Click return value data.
Definition lteiot9.h:225
@ LTEIOT9_ERROR_OVERFLOW
Definition lteiot9.h:228
@ LTEIOT9_OK
Definition lteiot9.h:226
@ LTEIOT9_ERROR_TIMEOUT
Definition lteiot9.h:229
@ LTEIOT9_ERROR
Definition lteiot9.h:227
LTE IoT 9 Click configuration object.
Definition lteiot9.h:200
pin_name_t rts
Definition lteiot9.h:209
uint32_t baud_rate
Definition lteiot9.h:212
pin_name_t cts
Definition lteiot9.h:208
bool uart_blocking
Definition lteiot9.h:213
pin_name_t smi
Definition lteiot9.h:206
uart_data_bits_t data_bit
Definition lteiot9.h:214
pin_name_t on
Definition lteiot9.h:207
pin_name_t tx_pin
Definition lteiot9.h:203
pin_name_t rx_pin
Definition lteiot9.h:202
uart_stop_bits_t stop_bit
Definition lteiot9.h:216
uart_parity_t parity_bit
Definition lteiot9.h:215
LTE IoT 9 Click context object.
Definition lteiot9.h:177
digital_out_t on
Definition lteiot9.h:180
digital_out_t rts
Definition lteiot9.h:181
uart_t uart
Definition lteiot9.h:187
digital_in_t cts
Definition lteiot9.h:184
digital_out_t smi
Definition lteiot9.h:179