Go to the documentation of this file.
35 #include "drv_digital_out.h"
36 #include "drv_digital_in.h"
59 #define C3GEA_MODULE_POWER_ON 1
60 #define C3GEA_MODULE_POWER_OFF 0
66 #define C3GEA_CMD_AT "AT"
67 #define C3GEA_CMD_ATI "ATI"
68 #define C3GEA_CMD_CGMR "AT+CGMR"
69 #define C3GEA_CMD_CFUN "AT+CFUN"
70 #define C3GEA_CMD_CREG "AT+CREG"
71 #define C3GEA_CMD_CGREG "AT+CGREG"
72 #define C3GEA_CMD_CGDCONT "AT+CGDCONT"
73 #define C3GEA_CMD_CIMI "AT+CIMI"
74 #define C3GEA_CMD_CMEE "AT+CMEE"
75 #define C3GEA_CMD_CGATT "AT+CGATT"
76 #define C3GEA_CMD_CSQ "AT+CSQ"
77 #define C3GEA_CMD_COPS "AT+COPS"
78 #define C3GEA_CMD_CMGS "AT+CMGS"
79 #define C3GEA_CMD_CMGF "AT+CMGF"
86 #define DRV_RX_BUFFER_SIZE 256
87 #define DRV_TX_BUFFER_SIZE 256
105 #define C3GEA_MAP_MIKROBUS( cfg, mikrobus ) \
106 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
107 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
108 cfg.sta = MIKROBUS( mikrobus, MIKROBUS_AN ); \
109 cfg.pwk = MIKROBUS( mikrobus, MIKROBUS_RST ); \
110 cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
111 cfg.ring = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
112 cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT )
161 uart_data_bits_t data_bit;
162 uart_parity_t parity_bit;
163 uart_stop_bits_t stop_bit;
3G-EA Click configuration object.
Definition: c3gea.h:144
void c3gea_module_power(c3gea_t *ctx, uint8_t state)
Power ON/OFF the module.
void c3gea_send_cmd(c3gea_t *ctx, char *cmd)
Send command function.
void c3gea_send_cmd_check(c3gea_t *ctx, char *at_cmd_buf)
Check the sent command.
#define DRV_TX_BUFFER_SIZE
Definition: c3gea.h:86
c3gea_return_value_t
3G-EA Click return value data.
Definition: c3gea.h:170
uint8_t c3gea_get_ring_pin(c3gea_t *ctx)
RING Pin Get function.
void c3gea_set_rts_pin(c3gea_t *ctx, uint8_t state)
Sets state of the RTS pin.
void c3gea_set_pwk_pin(c3gea_t *ctx, uint8_t state)
Sets state of the PWK pin.
err_t c3gea_generic_read(c3gea_t *ctx, char *data_buf, uint16_t max_len)
3G-EA data reading function.
void c3gea_send_sms_text(c3gea_t *ctx, char *phone_number, char *sms_text)
3G-EA send SMS in text mode.
err_t c3gea_init(c3gea_t *ctx, c3gea_cfg_t *cfg)
3G-EA initialization function.
3G-EA Click context object.
Definition: c3gea.h:120
void c3gea_set_sim_apn(c3gea_t *ctx, char *sim_apn)
Set sim card APN.
err_t c3gea_send_sms_pdu(c3gea_t *ctx, char *service_center_number, char *phone_number, char *sms_text)
3G-EA send SMS in PDU mode.
uint8_t c3gea_get_sta_pin(c3gea_t *ctx)
STA Pin Get function.
uint8_t c3gea_get_cts_pin(c3gea_t *ctx)
CTS Pin Get function.
void c3gea_cfg_setup(c3gea_cfg_t *cfg)
3G-EA configuration object setup function.
void c3gea_send_cmd_with_parameter(c3gea_t *ctx, char *at_cmd_buf, char *param_buf)
Send command function with parameter.
err_t c3gea_generic_write(c3gea_t *ctx, char *data_buf, uint16_t len)
3G-EA data writing function.
#define DRV_RX_BUFFER_SIZE
3G-EA driver buffer size.
Definition: c3gea.h:85
void c3gea_send_cmd_parameter_check(c3gea_t *ctx, char *at_cmd_buf)
Check the command parameters.