g2c
2.0.0.0
|
Functions | |
void | g2c_cfg_setup (g2c_cfg_t *cfg) |
Config Object Initialization function. More... | |
G2C_RETVAL | g2c_init (g2c_t *ctx, g2c_cfg_t *cfg) |
Initialization function. More... | |
void | g2c_module_power (g2c_t *ctx, uint8_t power_state, uint8_t bootloader) |
Power module. More... | |
void | g2c_reset (g2c_t *ctx) |
Reset module. More... | |
void | g2c_generic_write (g2c_t *ctx, char *data_buf, uint16_t len) |
Generic write function. More... | |
uint16_t | g2c_generic_read (g2c_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. More... | |
void | g2c_send_command (g2c_t *ctx, char *command) |
Function for send command. More... | |
void | g2c_send_operator_cfg (g2c_t *ctx, char *op_username, char *op_password) |
Operater ( Network ) configuration. More... | |
void | g2c_send_broker_cfg (g2c_t *ctx, char *brc_key, char *brc_password) |
Broker configuration. More... | |
void | g2c_send_data_ref (g2c_t *ctx, char *reference_buf, char *data_buf) |
Send data reference. More... | |
g2c_error_t | g2c_actuator_sw_parser (char *rsp, char *act_ref, g2c_actuator_sw_t *sw_state) |
Switch parser function. More... | |
g2c_error_t | g2c_actuator_cnt_parser (char *rsp, char *act_ref, g2c_actuator_cnt_t *num_data) |
Counter parser function. More... | |
g2c_error_t | g2c_actuator_str_parser (char *rsp, char *act_ref, g2c_actuator_str_t *str_data) |
String parser function. More... | |
g2c_error_t g2c_actuator_cnt_parser | ( | char * | rsp, |
char * | act_ref, | ||
g2c_actuator_cnt_t * | num_data | ||
) |
Counter parser function.
g2c | Click object. |
act_ref | Actuator reference. |
num_data | Number of data. |
g2c_error_t g2c_actuator_str_parser | ( | char * | rsp, |
char * | act_ref, | ||
g2c_actuator_str_t * | str_data | ||
) |
String parser function.
g2c | Click object. |
act_ref | Actuator reference. |
str_data | String to send. |
g2c_error_t g2c_actuator_sw_parser | ( | char * | rsp, |
char * | act_ref, | ||
g2c_actuator_sw_t * | sw_state | ||
) |
Switch parser function.
g2c | Click object. |
act_ref | Actuator reference. |
sw_state | Switch state of pin. |
void g2c_cfg_setup | ( | g2c_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
uint16_t g2c_generic_read | ( | g2c_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
Generic read function.
g2c | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
void g2c_generic_write | ( | g2c_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
Generic write function.
g2c | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
G2C_RETVAL g2c_init | ( | g2c_t * | ctx, |
g2c_cfg_t * | cfg | ||
) |
Initialization function.
g2c | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
void g2c_module_power | ( | g2c_t * | ctx, |
uint8_t | power_state, | ||
uint8_t | bootloader | ||
) |
Power module.
g2c | Click object. |
power_state | State of pin. |
bootloader | Bootloader ( 0 or 1 ). |
void g2c_reset | ( | g2c_t * | ctx | ) |
Reset module.
g2c | Click object. |
void g2c_send_broker_cfg | ( | g2c_t * | ctx, |
char * | brc_key, | ||
char * | brc_password | ||
) |
Broker configuration.
g2c | Click object. |
brc_key | Device key. |
brc_password | Device password. |
void g2c_send_command | ( | g2c_t * | ctx, |
char * | command | ||
) |
Function for send command.
g2c | Click object. |
command | Command to send. |
void g2c_send_data_ref | ( | g2c_t * | ctx, |
char * | reference_buf, | ||
char * | data_buf | ||
) |
Send data reference.
g2c | Click object. |
reference_buf | Reference. |
data_buf |
void g2c_send_operator_cfg | ( | g2c_t * | ctx, |
char * | op_username, | ||
char * | op_password | ||
) |
Operater ( Network ) configuration.
g2c | Click object. |
op_username | Network username. |
op_password | Network password. |