aiwb212f 2.1.0.0
|
API for configuring and manipulating Ai-WB2-12F Click driver. More...
Topics | |
Ai-WB2-12F Device Settings | |
Settings for registers of Ai-WB2-12F Click driver. | |
Ai-WB2-12F MikroBUS Map | |
MikroBUS pin mapping of Ai-WB2-12F Click driver. | |
Functions | |
void | aiwb212f_cfg_setup (aiwb212f_cfg_t *cfg) |
Ai-WB2-12F configuration object setup function. | |
err_t | aiwb212f_init (aiwb212f_t *ctx, aiwb212f_cfg_t *cfg) |
Ai-WB2-12F initialization function. | |
err_t | aiwb212f_default_cfg (aiwb212f_t *ctx) |
Ai-WB2-12F default configuration function. | |
err_t | aiwb212f_generic_write (aiwb212f_t *ctx, uint8_t *data_in, uint16_t len) |
Ai-WB2-12F data writing function. | |
err_t | aiwb212f_generic_read (aiwb212f_t *ctx, uint8_t *data_out, uint16_t len) |
Ai-WB2-12F data reading function. | |
void | aiwb212f_hw_reset (aiwb212f_t *ctx) |
Ai-WB2-12F hardware reset function. | |
void | aiwb212f_send_cmd (aiwb212f_t *ctx, uint8_t *at_cmd_buf) |
Ai-WB2-12F send command function. | |
void | aiwb212f_send_cmd_with_par (aiwb212f_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf) |
Ai-WB2-12F send command with parameter function. | |
void | aiwb212f_send_cmd_check (aiwb212f_t *ctx, uint8_t *at_cmd_buf) |
Ai-WB2-12F send command check function. | |
void | aiwb212f_set_gpio (aiwb212f_t *ctx, uint8_t *pin, uint8_t *state) |
Ai-WB2-12F set gpio pin state function. | |
API for configuring and manipulating Ai-WB2-12F Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void aiwb212f_cfg_setup | ( | aiwb212f_cfg_t * | cfg | ) |
Ai-WB2-12F configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See aiwb212f_cfg_t object definition for detailed explanation. |
err_t aiwb212f_default_cfg | ( | aiwb212f_t * | ctx | ) |
Ai-WB2-12F default configuration function.
This function executes a default configuration of Ai-WB2-12F click board.
[in] | ctx | : Click context object. See aiwb212f_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t aiwb212f_generic_read | ( | aiwb212f_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len ) |
Ai-WB2-12F data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See aiwb212f_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 aiwb212f_generic_write | ( | aiwb212f_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len ) |
Ai-WB2-12F data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See aiwb212f_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. void aiwb212f_hw_reset | ( | aiwb212f_t * | ctx | ) |
Ai-WB2-12F hardware reset function.
This function is used to perform a hardware reset of the device.
[in] | ctx | : Click context object. See aiwb212f_t object definition for detailed explanation. |
err_t aiwb212f_init | ( | aiwb212f_t * | ctx, |
aiwb212f_cfg_t * | cfg ) |
Ai-WB2-12F initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See aiwb212f_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See aiwb212f_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void aiwb212f_send_cmd | ( | aiwb212f_t * | ctx, |
uint8_t * | at_cmd_buf ) |
Ai-WB2-12F send command function.
This function is used to send a desired command.
[in] | ctx | : Click context object. See aiwb212f_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command string. |
void aiwb212f_send_cmd_check | ( | aiwb212f_t * | ctx, |
uint8_t * | at_cmd_buf ) |
Ai-WB2-12F send command check function.
This function sends a desired command with the question mark for checking parameters.
[in] | ctx | : Click context object. See aiwb212f_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command string. |
void aiwb212f_send_cmd_with_par | ( | aiwb212f_t * | ctx, |
uint8_t * | at_cmd_buf, | ||
uint8_t * | param_buf ) |
Ai-WB2-12F send command with parameter function.
This function sends a desired command with the parameter.
[in] | ctx | : Click context object. See aiwb212f_t object definition for detailed explanation. |
[in] | at_cmd_buf | : Command string. |
[in] | param_buf | : Parameters string. |
void aiwb212f_set_gpio | ( | aiwb212f_t * | ctx, |
uint8_t * | pin, | ||
uint8_t * | state ) |
Ai-WB2-12F set gpio pin state function.
This function sends a command to change state of the selected GPIO pin.
[in] | ctx | : Click context object. See aiwb212f_t object definition for detailed explanation. |
[in] | pin | : Selected pin. |
[in] | pin | : Pin state. |