Go to the documentation of this file.
35 #include "mikrosdk_version.h"
38 #if mikroSDK_GET_VERSION < 20800ul
39 #include "rcu_delays.h"
45 #include "drv_digital_out.h"
46 #include "drv_digital_in.h"
87 #define LTEIOT5_CMD_AT "AT"
88 #define LTEIOT5_CMD_ATI "ATI"
89 #define LTEIOT5_CMD_CGMR "AT+CGMR"
91 #define LTEIOT5_CMD_CFUN "AT+CFUN"
92 #define LTEIOT5_CMD_CREG "AT+CREG"
93 #define LTEIOT5_CMD_CEREG "AT+CEREG"
94 #define LTEIOT5_CMD_CGDCONT "AT+CGDCONT"
95 #define LTEIOT5_CMD_CIMI "AT+CIMI"
96 #define LTEIOT5_CMD_CGATT "AT+CGATT"
97 #define LTEIOT5_CMD_CSQ "AT+CSQ"
98 #define LTEIOT5_CMD_CESQ "AT+CESQ"
99 #define LTEIOT5_CMD_COPS "AT+COPS"
100 #define LTEIOT5_CMD_URAT "AT+URAT"
101 #define LTEIOT5_CMD_UBANDMASK "AT+UBANDMASK"
102 #define LTEIOT5_CMD_URATCONF "AT+URATCONF"
103 #define LTEIOT5_CMD_UAUTHREQ "AT+UAUTHREQ"
104 #define LTEIOT5_CMD_UUICC "AT+UUICC"
105 #define LTEIOT5_CMD_UCGED "AT+UCGED"
106 #define LTEIOT5_CMD_UCELLINFO "AT+UCELLINFO"
107 #define LTEIOT5_CMD_UANTR "AT+UANTR"
116 #define DRV_RX_BUFFER_SIZE 500
117 #define DRV_TX_BUFFER_SIZE 150
135 #define LTEIOT5_MAP_MIKROBUS( cfg, mikrobus ) \
136 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
137 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
138 cfg.pwr = MIKROBUS( mikrobus, MIKROBUS_AN ); \
139 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
140 cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
141 cfg.ri = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
142 cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT );
void lteiot5_send_text_message(lteiot5_t *ctx, char *phone_number, char *message_context)
LTE IoT 5 send text message.
err_t lteiot5_generic_write(lteiot5_t *ctx, char *data_buf, uint16_t len)
LTE IoT 5 data writing function.
void lteiot5_send_cmd(lteiot5_t *ctx, char *cmd)
Send command function.
uart_stop_bits_t stop_bit
Definition: lteiot5.h:200
void lteiot5_set_rst(lteiot5_t *ctx, uint8_t state)
Sets state of the RST pin.
uint32_t baud_rate
Definition: lteiot5.h:196
pin_name_t rx_pin
Definition: lteiot5.h:183
pin_name_t rst
Definition: lteiot5.h:189
digital_in_t ri
Definition: lteiot5.h:161
#define DRV_RX_BUFFER_SIZE
LTE IoT 5 driver buffer size.
Definition: lteiot5.h:116
pin_name_t ri
Definition: lteiot5.h:191
err_t lteiot5_init(lteiot5_t *ctx, lteiot5_cfg_t *cfg)
LTE IoT 5 initialization function.
#define DRV_TX_BUFFER_SIZE
Definition: lteiot5.h:117
void lteiot5_set_pwr(lteiot5_t *ctx, uint8_t state)
Sets state of the PWR pin.
pin_name_t cts
Definition: lteiot5.h:192
LTE IoT 5 Click configuration object.
Definition: lteiot5.h:180
err_t lteiot5_default_cfg(lteiot5_t *ctx)
LTE IoT 5 default configuration function.
pin_name_t pwr
Definition: lteiot5.h:188
LTE IoT 5 Click context object.
Definition: lteiot5.h:152
digital_out_t rst
Definition: lteiot5.h:156
uart_parity_t parity_bit
Definition: lteiot5.h:199
digital_in_t cts
Definition: lteiot5.h:162
void lteiot5_send_cmd_with_parameter(lteiot5_t *ctx, char *at_cmd_buf, char *param_buf)
Send command function with parameter.
uint8_t lteiot5_get_cts(lteiot5_t *ctx)
CTS Pin Get function.
bool uart_blocking
Definition: lteiot5.h:197
void lteiot5_set_rts(lteiot5_t *ctx, uint8_t state)
Sets state of the RTS pin.
uint8_t lteiot5_get_ri(lteiot5_t *ctx)
RI Pin Get function.
void lteiot5_send_cmd_parameter_check(lteiot5_t *ctx, char *at_cmd_buf)
Check the command parameters.
void lteiot5_cfg_setup(lteiot5_cfg_t *cfg)
LTE IoT 5 configuration object setup function.
pin_name_t tx_pin
Definition: lteiot5.h:184
digital_out_t rts
Definition: lteiot5.h:157
digital_out_t pwr
Definition: lteiot5.h:155
err_t lteiot5_generic_read(lteiot5_t *ctx, char *data_buf, uint16_t max_len)
LTE IoT 5 data reading function.
uart_t uart
Definition: lteiot5.h:166
void lteiot5_reset(lteiot5_t *ctx)
LTE IoT 5 power on.
void lteiot5_set_sim_apn(lteiot5_t *ctx, char *sim_apn)
Set sim card APN.
uart_data_bits_t data_bit
Definition: lteiot5.h:198
pin_name_t rts
Definition: lteiot5.h:190
void lteiot5_power_on(lteiot5_t *ctx)
LTE IoT 5 power on.
void lteiot5_send_cmd_check(lteiot5_t *ctx, char *at_cmd_buf)
Check the sent command.