anynet2g 2.0.0.0
|
API for configuring and manipulating AnyNet 2G Click driver. More...
Topics | |
AnyNet 2G Device Settings | |
Settings for registers of AnyNet 2G Click driver. | |
AnyNet 2G MikroBUS Map | |
MikroBUS pin mapping of AnyNet 2G Click driver. | |
Functions | |
void | anynet2g_cfg_setup (anynet2g_cfg_t *cfg) |
AnyNet 2G configuration object setup function. | |
err_t | anynet2g_init (anynet2g_t *ctx, anynet2g_cfg_t *cfg) |
AnyNet 2G initialization function. | |
err_t | anynet2g_generic_write (anynet2g_t *ctx, uint8_t *data_in, uint16_t len) |
AnyNet 2G data writing function. | |
err_t | anynet2g_generic_read (anynet2g_t *ctx, uint8_t *data_out, uint16_t len) |
AnyNet 2G data reading function. | |
void | anynet2g_set_slp_pin (anynet2g_t *ctx, uint8_t state) |
AnyNet 2G set slp pin function. | |
void | anynet2g_set_dtr_pin (anynet2g_t *ctx, uint8_t state) |
AnyNet 2G set dtr pin function. | |
void | anynet2g_set_iot_pin (anynet2g_t *ctx, uint8_t state) |
AnyNet 2G set iot pin function. | |
uint8_t | anynet2g_get_dsr_pin (anynet2g_t *ctx) |
AnyNet 2G get dsr pin function. | |
void | anynet2g_send_cmd (anynet2g_t *ctx, uint8_t *cmd) |
Send command function. | |
void | anynet2g_send_cmd_with_par (anynet2g_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf) |
Send command function with parameter. | |
void | anynet2g_send_cmd_check (anynet2g_t *ctx, uint8_t *at_cmd_buf) |
Check the sent command. | |
void | anynet2g_send_cmd_par_check (anynet2g_t *ctx, uint8_t *at_cmd_buf) |
Check the command parameters. | |
API for configuring and manipulating AnyNet 2G Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void anynet2g_cfg_setup | ( | anynet2g_cfg_t * | cfg | ) |
AnyNet 2G configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See anynet2g_cfg_t object definition for detailed explanation. |
err_t anynet2g_generic_read | ( | anynet2g_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len ) |
AnyNet 2G data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See anynet2g_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t anynet2g_generic_write | ( | anynet2g_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len ) |
AnyNet 2G data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See anynet2g_t object definition for detailed explanation. |
[in] | data_in | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. uint8_t anynet2g_get_dsr_pin | ( | anynet2g_t * | ctx | ) |
AnyNet 2G get dsr pin function.
This function returns the DSR handshake pin logic state.
[in] | ctx | : Click context object. See anynet2g_t object definition for detailed explanation. |
err_t anynet2g_init | ( | anynet2g_t * | ctx, |
anynet2g_cfg_t * | cfg ) |
AnyNet 2G initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See anynet2g_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See anynet2g_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void anynet2g_send_cmd | ( | anynet2g_t * | ctx, |
uint8_t * | cmd ) |
Send command function.
This function sends a specified command to the click module.
[in] | ctx | : Click context object. See anynet2g_t object definition for detailed explanation. |
[in] | cmd | : Command variable. |
void anynet2g_send_cmd_check | ( | anynet2g_t * | ctx, |
uint8_t * | at_cmd_buf ) |
Check the sent command.
This function checks the command status.
[in] | ctx | : Click context object. See anynet2g_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command buffer. |
void anynet2g_send_cmd_par_check | ( | anynet2g_t * | ctx, |
uint8_t * | at_cmd_buf ) |
Check the command parameters.
This function checks the command parameters.
[in] | ctx | : Click context object. See anynet2g_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command buffer. |
void anynet2g_send_cmd_with_par | ( | anynet2g_t * | ctx, |
uint8_t * | at_cmd_buf, | ||
uint8_t * | param_buf ) |
Send command function with parameter.
This function sends a command with specified parameter to the click module.
[in] | ctx | : Click context object. See anynet2g_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command buffer. |
[in] | param_buf | : Parameter buffer. |
void anynet2g_set_dtr_pin | ( | anynet2g_t * | ctx, |
uint8_t | state ) |
AnyNet 2G set dtr pin function.
This function sets the DTR handshake pin logic state.
[in] | ctx | : Click context object. See anynet2g_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void anynet2g_set_iot_pin | ( | anynet2g_t * | ctx, |
uint8_t | state ) |
AnyNet 2G set iot pin function.
This function sets the IoT button pin logic state.
[in] | ctx | : Click context object. See anynet2g_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void anynet2g_set_slp_pin | ( | anynet2g_t * | ctx, |
uint8_t | state ) |
AnyNet 2G set slp pin function.
This function sets the Sleep mode (SLP) pin logic state.
[in] | ctx | : Click context object. See anynet2g_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |