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 C4GLTEE_CMD_AT "AT"
74#define C4GLTEE_CMD_ATI "ATI"
75#define C4GLTEE_CMD_CGMR "AT+CGMR"
76#define C4GLTEE_CMD_CFUN "AT+CFUN"
77#define C4GLTEE_CMD_CREG "AT+CREG"
78#define C4GLTEE_CMD_CGREG "AT+CGREG"
79#define C4GLTEE_CMD_CGDCONT "AT+CGDCONT"
80#define C4GLTEE_CMD_CIMI "AT+CIMI"
81#define C4GLTEE_CMD_CMEE "AT+CMEE"
82#define C4GLTEE_CMD_CGATT "AT+CGATT"
83#define C4GLTEE_CMD_CSQ "AT+CSQ"
84#define C4GLTEE_CMD_COPS "AT+COPS"
85#define C4GLTEE_CMD_CMGS "AT+CMGS"
86#define C4GLTEE_CMD_CMGF "AT+CMGF"
92#define DRV_RX_BUFFER_SIZE 256
93#define DRV_TX_BUFFER_SIZE 256
111#define C4GLTEE_MAP_MIKROBUS( cfg, mikrobus ) \
112 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
113 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
114 cfg.sta = MIKROBUS( mikrobus, MIKROBUS_AN ); \
115 cfg.pwk = MIKROBUS( mikrobus, MIKROBUS_RST ); \
116 cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
117 cfg.ring = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
118 cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT );
c4gltee_return_value_t
4G LTE-E Click return value data.
Definition c4gltee.h:178
@ C4GLTEE_ERROR
Definition c4gltee.h:180
@ C4GLTEE_OK
Definition c4gltee.h:179
#define DRV_RX_BUFFER_SIZE
4G LTE-E driver buffer size.
Definition c4gltee.h:92
#define DRV_TX_BUFFER_SIZE
Definition c4gltee.h:93
uint8_t c4gltee_get_sta_pin(c4gltee_t *ctx)
STA Pin Get function.
void c4gltee_send_cmd_check(c4gltee_t *ctx, char *at_cmd_buf)
Check the sent command.
void c4gltee_set_rts_pin(c4gltee_t *ctx, uint8_t state)
Sets state of the RTS pin.
void c4gltee_send_sms_text(c4gltee_t *ctx, char *phone_number, char *sms_text)
4G LTE-E send SMS in text mode.
uint8_t c4gltee_get_cts_pin(c4gltee_t *ctx)
CTS Pin Get function.
void c4gltee_module_power_on(c4gltee_t *ctx)
Power ON the module function.
void c4gltee_set_pwk_pin(c4gltee_t *ctx, uint8_t state)
Sets state of the PWK pin.
uint8_t c4gltee_get_ring_pin(c4gltee_t *ctx)
RING Pin Get function.
void c4gltee_send_cmd_with_parameter(c4gltee_t *ctx, char *at_cmd_buf, char *param_buf)
Send command function with parameter.
err_t c4gltee_generic_read(c4gltee_t *ctx, char *data_buf, uint16_t max_len)
4G LTE-E data reading function.
void c4gltee_send_cmd_parameter_check(c4gltee_t *ctx, char *at_cmd_buf)
Check the command parameters.
err_t c4gltee_send_sms_pdu(c4gltee_t *ctx, char *service_center_number, char *phone_number, char *sms_text)
4G LTE-E send SMS in PDU mode.
err_t c4gltee_generic_write(c4gltee_t *ctx, char *data_buf, uint16_t len)
4G LTE-E data writing function.
void c4gltee_cfg_setup(c4gltee_cfg_t *cfg)
4G LTE-E configuration object setup function.
err_t c4gltee_init(c4gltee_t *ctx, c4gltee_cfg_t *cfg)
4G LTE-E initialization function.
void c4gltee_set_sim_apn(c4gltee_t *ctx, char *sim_apn)
Set sim card APN.
void c4gltee_send_cmd(c4gltee_t *ctx, char *cmd)
Send command function.
4G LTE-E Click configuration object.
Definition c4gltee.h:152
pin_name_t sta
Definition c4gltee.h:158
pin_name_t rts
Definition c4gltee.h:160
uint32_t baud_rate
Definition c4gltee.h:165
pin_name_t pwk
Definition c4gltee.h:159
pin_name_t cts
Definition c4gltee.h:162
pin_name_t ring
Definition c4gltee.h:161
bool uart_blocking
Definition c4gltee.h:166
uart_data_bits_t data_bit
Definition c4gltee.h:167
pin_name_t tx_pin
Definition c4gltee.h:155
pin_name_t rx_pin
Definition c4gltee.h:154
uart_stop_bits_t stop_bit
Definition c4gltee.h:169
uart_parity_t parity_bit
Definition c4gltee.h:168
4G LTE-E Click context object.
Definition c4gltee.h:128
digital_in_t sta
Definition c4gltee.h:134
digital_out_t rts
Definition c4gltee.h:131
uart_t uart
Definition c4gltee.h:139
digital_in_t cts
Definition c4gltee.h:136
digital_out_t pwk
Definition c4gltee.h:130
digital_in_t ring
Definition c4gltee.h:135