g2c3g  2.0.0.0
Data Structures | Macros | Typedefs | Functions
g2c3g.h File Reference

This file contains API for G2C 3G 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  g2c3g_t
 Click ctx object definition. More...
 
struct  g2c3g_cfg_t
 Click configuration structure definition. More...
 

Macros

#define G2C3G_MAP_MIKROBUS(cfg, mikrobus)
 
#define G2C3G_RETVAL   uint8_t
 
#define G2C3G_OK   0x00
 
#define G2C3G_INIT_ERROR   0xFF
 
#define G2C3G_PARSER_NO_ERROR   0x00
 
#define G2C3G_PARSER_ERROR_REF   0x01
 
#define G2C3G_PARSER_ERROR_CMD   0x02
 
#define G2C3G_PARSER_ERROR_DATA   0x04
 
#define G2C3G_STATUS_DEVICE_READY   1
 
#define G2C3G_STATUS_ACT_NETWORK_AND_BROKER   4
 
#define G2C3G_STATUS_ACT_NETWORK   2
 
#define G2C3G_STATUS_ACT_BROKER   3
 
#define G2C3G_STATUS_DEVICE_BUSY   0
 
#define G2C3G_MODULE_POWER_ON   1
 
#define G2C3G_MODULE_POWER_OFF   0
 

Typedefs

typedef uint8_t g2c3g_actuator_sw_t
 
typedef int16_t g2c3g_actuator_cnt_t
 
typedef char g2c3g_actuator_str_t
 
typedef uint8_t g2c3g_error_t
 

Functions

void g2c3g_cfg_setup (g2c3g_cfg_t *cfg)
 Config Object Initialization function. More...
 
G2C3G_RETVAL g2c3g_init (g2c3g_t *ctx, g2c3g_cfg_t *cfg)
 Initialization function. More...
 
void g2c3g_module_reset (g2c3g_t *ctx)
 Reset module. More...
 
uint8_t g2c3g_led_net (g2c3g_t *ctx)
 Led network. More...
 
uint8_t g2c3g_led_conn (g2c3g_t *ctx)
 Led connection. More...
 
void g2c3g_generic_write (g2c3g_t *ctx, char *data_buf, uint16_t len)
 Generic write function. More...
 
int32_t g2c3g_generic_read (g2c3g_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function. More...
 
void g2c3g_send_command (g2c3g_t *ctx, char *command)
 Function for send command. More...
 
void g2c3g_send_operator_cfg (g2c3g_t *ctx, char *op_apn, char *op_username, char *op_password)
 Operater configuration. More...
 
void g2c3g_send_broker_cfg (g2c3g_t *ctx, char *brc_key, char *brc_password)
 Broker configuration. More...
 
void g2c3g_send_data_ref (g2c3g_t *ctx, char *reference_buf, char *data_buf)
 Send data reference. More...
 
g2c3g_error_t g2c3g_actuator_sw_parser (char *rsp, char *act_ref, g2c3g_actuator_sw_t *sw_state)
 Switch parser function. More...
 
g2c3g_error_t g2c3g_actuator_cnt_parser (char *rsp, char *act_ref, g2c3g_actuator_cnt_t *num_data)
 Counter parser function. More...
 
g2c3g_error_t g2c3g_actuator_str_parser (char *rsp, char *act_ref, g2c3g_actuator_str_t *str_data)
 String parser function. More...
 

Detailed Description

This file contains API for G2C 3G Click driver.