39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
74#define LTECAT1EU_CMD_AT "AT"
75#define LTECAT1EU_CMD_ATI "ATI"
76#define LTECAT1EU_CMD_CGMR "AT+CGMR"
78#define LTECAT1EU_CMD_CFUN "AT+CFUN"
79#define LTECAT1EU_CMD_CREG "AT+CREG"
80#define LTECAT1EU_CMD_CEREG "AT+CEREG"
81#define LTECAT1EU_CMD_CGDCONT "AT+CGDCONT"
82#define LTECAT1EU_CMD_CIMI "AT+CIMI"
83#define LTECAT1EU_CMD_CGATT "AT+CGATT"
84#define LTECAT1EU_CMD_CSQ "AT+CSQ"
85#define LTECAT1EU_CMD_CESQ "AT+CESQ"
86#define LTECAT1EU_CMD_COPS "AT+COPS"
94#define DRV_RX_BUFFER_SIZE 500
95#define DRV_TX_BUFFER_SIZE 100
113#define LTECAT1EU_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 ); \
117 cfg.cts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
118 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
119 cfg.rts = MIKROBUS( mikrobus, MIKROBUS_INT )
#define DRV_RX_BUFFER_SIZE
LTE Cat.1-EU driver buffer size.
Definition ltecat1eu.h:94
#define DRV_TX_BUFFER_SIZE
Definition ltecat1eu.h:95
void ltecat1eu_send_cmd_check(ltecat1eu_t *ctx, char *at_cmd_buf)
Check the sent command.
void ltecat1eu_send_cmd_parameter_check(ltecat1eu_t *ctx, char *at_cmd_buf)
Check the command parameters.
uint8_t ltecat1eu_get_cts(ltecat1eu_t *ctx)
CTS Pin Get function.
void ltecat1eu_set_sim_apn(ltecat1eu_t *ctx, char *sim_apn)
Set sim card APN.
void ltecat1eu_cfg_setup(ltecat1eu_cfg_t *cfg)
LTE Cat.1-EU configuration object setup function.
void ltecat1eu_set_rst(ltecat1eu_t *ctx, uint8_t state)
Sets state of the RST pin.
void ltecat1eu_power_on(ltecat1eu_t *ctx)
LTE Cat.1-EU module power on.
err_t ltecat1eu_generic_read(ltecat1eu_t *ctx, char *data_buf, uint16_t max_len)
LTE Cat.1-EU data reading function.
void ltecat1eu_set_rts(ltecat1eu_t *ctx, uint8_t state)
Sets state of the RTS pin.
err_t ltecat1eu_init(ltecat1eu_t *ctx, ltecat1eu_cfg_t *cfg)
LTE Cat.1-EU initialization function.
void ltecat1eu_generic_write(ltecat1eu_t *ctx, char *data_buf, uint16_t len)
LTE Cat.1-EU data writing function.
void ltecat1eu_send_text_message(ltecat1eu_t *ctx, char *phone_number, char *message_context)
LTE Cat.1-EU send text message.
void ltecat1eu_send_cmd(ltecat1eu_t *ctx, char *cmd)
Send command function.
void ltecat1eu_send_cmd_with_parameter(ltecat1eu_t *ctx, char *at_cmd_buf, char *param_buf)
Send command function with parameter.
ltecat1eu_return_value_t
LTE Cat.1-EU Click return value data.
Definition ltecat1eu.h:178
@ LTECAT1EU_OK
Definition ltecat1eu.h:179
@ LTECAT1EU_ERROR
Definition ltecat1eu.h:180
LTE Cat.1-EU Click configuration object.
Definition ltecat1eu.h:152
pin_name_t rts
Definition ltecat1eu.h:162
uint32_t baud_rate
Definition ltecat1eu.h:165
pin_name_t cts
Definition ltecat1eu.h:160
bool uart_blocking
Definition ltecat1eu.h:166
uart_data_bits_t data_bit
Definition ltecat1eu.h:167
pin_name_t tx_pin
Definition ltecat1eu.h:155
pin_name_t rx_pin
Definition ltecat1eu.h:154
uart_stop_bits_t stop_bit
Definition ltecat1eu.h:169
uart_parity_t parity_bit
Definition ltecat1eu.h:168
pin_name_t rst
Definition ltecat1eu.h:159
pin_name_t cs
Definition ltecat1eu.h:161
LTE Cat.1-EU Click context object.
Definition ltecat1eu.h:129
digital_out_t cs
Definition ltecat1eu.h:132
digital_out_t rts
Definition ltecat1eu.h:133
uart_t uart
Definition ltecat1eu.h:139
digital_in_t cts
Definition ltecat1eu.h:136
digital_out_t rst
Definition ltecat1eu.h:131