c3gea  2.0.0.0
Data Structures | Macros | Enumerations | Functions
c3gea.h File Reference

This file contains API for 3G-EA Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  c3gea_t
 3G-EA Click context object. More...
 
struct  c3gea_cfg_t
 3G-EA Click configuration object. More...
 

Macros

#define C3GEA_MODULE_POWER_ON   1
 3G-EA module power. More...
 
#define C3GEA_MODULE_POWER_OFF   0
 
#define C3GEA_CMD_AT   "AT"
 3G-EA description setting. More...
 
#define C3GEA_CMD_ATI   "ATI"
 
#define C3GEA_CMD_CGMR   "AT+CGMR"
 
#define C3GEA_CMD_CFUN   "AT+CFUN"
 
#define C3GEA_CMD_CREG   "AT+CREG"
 
#define C3GEA_CMD_CGREG   "AT+CGREG"
 
#define C3GEA_CMD_CGDCONT   "AT+CGDCONT"
 
#define C3GEA_CMD_CIMI   "AT+CIMI"
 
#define C3GEA_CMD_CMEE   "AT+CMEE"
 
#define C3GEA_CMD_CGATT   "AT+CGATT"
 
#define C3GEA_CMD_CSQ   "AT+CSQ"
 
#define C3GEA_CMD_COPS   "AT+COPS"
 
#define C3GEA_CMD_CMGS   "AT+CMGS"
 
#define C3GEA_CMD_CMGF   "AT+CMGF"
 
#define DRV_RX_BUFFER_SIZE   256
 3G-EA driver buffer size. More...
 
#define DRV_TX_BUFFER_SIZE   256
 
#define C3GEA_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  c3gea_return_value_t { C3GEA_OK = 0, C3GEA_ERROR = -1 }
 3G-EA Click return value data. More...
 

Functions

void c3gea_cfg_setup (c3gea_cfg_t *cfg)
 3G-EA configuration object setup function. More...
 
err_t c3gea_init (c3gea_t *ctx, c3gea_cfg_t *cfg)
 3G-EA initialization function. More...
 
void c3gea_module_power (c3gea_t *ctx, uint8_t state)
 Power ON/OFF the module. More...
 
err_t c3gea_generic_write (c3gea_t *ctx, char *data_buf, uint16_t len)
 3G-EA data writing function. More...
 
err_t c3gea_generic_read (c3gea_t *ctx, char *data_buf, uint16_t max_len)
 3G-EA data reading function. More...
 
void c3gea_set_rts_pin (c3gea_t *ctx, uint8_t state)
 Sets state of the RTS pin. More...
 
void c3gea_set_pwk_pin (c3gea_t *ctx, uint8_t state)
 Sets state of the PWK pin. More...
 
uint8_t c3gea_get_cts_pin (c3gea_t *ctx)
 CTS Pin Get function. More...
 
uint8_t c3gea_get_sta_pin (c3gea_t *ctx)
 STA Pin Get function. More...
 
uint8_t c3gea_get_ring_pin (c3gea_t *ctx)
 RING Pin Get function. More...
 
void c3gea_send_cmd (c3gea_t *ctx, char *cmd)
 Send command function. More...
 
void c3gea_send_cmd_with_parameter (c3gea_t *ctx, char *at_cmd_buf, char *param_buf)
 Send command function with parameter. More...
 
void c3gea_send_cmd_check (c3gea_t *ctx, char *at_cmd_buf)
 Check the sent command. More...
 
void c3gea_send_cmd_parameter_check (c3gea_t *ctx, char *at_cmd_buf)
 Check the command parameters. More...
 
void c3gea_set_sim_apn (c3gea_t *ctx, char *sim_apn)
 Set sim card APN. More...
 
void c3gea_send_sms_text (c3gea_t *ctx, char *phone_number, char *sms_text)
 3G-EA send SMS in text mode. More...
 
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. More...
 

Detailed Description

This file contains API for 3G-EA Click Driver.

Enumeration Type Documentation

◆ c3gea_return_value_t

3G-EA Click return value data.

Predefined enum values for driver return values.

Enumerator
C3GEA_OK 
C3GEA_ERROR