b102c
2.1.0.0
|
API for configuring and manipulating B102C Click driver. More...
Modules | |
B102C Device Settings | |
Settings for registers of B102C Click driver. | |
B102C MikroBUS Map | |
MikroBUS pin mapping of B102C Click driver. | |
Functions | |
void | b102c_cfg_setup (b102c_cfg_t *cfg) |
B102C configuration object setup function. More... | |
err_t | b102c_init (b102c_t *ctx, b102c_cfg_t *cfg) |
B102C initialization function. More... | |
err_t | b102c_default_cfg (b102c_t *ctx) |
B102C default configuration function. More... | |
err_t | b102c_generic_write (b102c_t *ctx, uint8_t *data_in, uint16_t len) |
B102C data writing function. More... | |
err_t | b102c_generic_read (b102c_t *ctx, uint8_t *data_out, uint16_t len) |
B102C data reading function. More... | |
void | b102c_set_rst_pin (b102c_t *ctx, uint8_t pin_state) |
B102C set RST pin state function. More... | |
void | b102c_hw_reset (b102c_t *ctx) |
B102C hardware reset function. More... | |
void | b102c_send_cmd (b102c_t *ctx, uint8_t *cmd) |
B102C send command function. More... | |
void | b102c_send_cmd_with_params (b102c_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf) |
B102C send command function with parameter. More... | |
void | b102c_send_cmd_check (b102c_t *ctx, uint8_t *at_cmd_buf) |
B102C check the sent command. More... | |
void | b102c_send_cmd_params_check (b102c_t *ctx, uint8_t *at_cmd_buf) |
B102C check the command parameters. More... | |
API for configuring and manipulating B102C Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void b102c_cfg_setup | ( | b102c_cfg_t * | cfg | ) |
B102C configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See b102c_cfg_t object definition for detailed explanation. |
err_t b102c_default_cfg | ( | b102c_t * | ctx | ) |
B102C default configuration function.
This function executes a default configuration of B102C click board.
[in] | ctx | : Click context object. See b102c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t b102c_generic_read | ( | b102c_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
B102C data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See b102c_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 b102c_generic_write | ( | b102c_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
B102C data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See b102c_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 b102c_hw_reset | ( | b102c_t * | ctx | ) |
B102C hardware reset function.
This function is used to perform a hardware reset of the B102C Click module.
[in] | ctx | : Click context object. See b102c_t object definition for detailed explanation. |
err_t b102c_init | ( | b102c_t * | ctx, |
b102c_cfg_t * | cfg | ||
) |
B102C initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See b102c_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See b102c_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void b102c_send_cmd | ( | b102c_t * | ctx, |
uint8_t * | cmd | ||
) |
B102C send command function.
This function sends a specified command to the B102C Click module.
[in] | ctx | : Click context object. See b102c_t object definition for detailed explanation. |
[in] | cmd | Command variable. |
void b102c_send_cmd_check | ( | b102c_t * | ctx, |
uint8_t * | at_cmd_buf | ||
) |
B102C check the sent command.
This function checks the command that is sent.
[in] | ctx | : Click context object. See b102c_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
void b102c_send_cmd_params_check | ( | b102c_t * | ctx, |
uint8_t * | at_cmd_buf | ||
) |
B102C check the command parameters.
This function checks the command that is sent.
[in] | ctx | : Click context object. See b102c_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
void b102c_send_cmd_with_params | ( | b102c_t * | ctx, |
uint8_t * | at_cmd_buf, | ||
uint8_t * | param_buf | ||
) |
B102C send command function with parameter.
This function sends a command with specified parameter to the click module.
[in] | ctx | : Click context object. See b102c_t object definition for detailed explanation. |
[in] | at_cmd_buf | Command buffer. |
[in] | param_buf | Parameter buffer. |
void b102c_set_rst_pin | ( | b102c_t * | ctx, |
uint8_t | pin_state | ||
) |
B102C set RST pin state function.
This function is used to set state of the RST pin of the B102C Click module.
[in] | ctx | : Click context object. See b102c_t object definition for detailed explanation. |
[in] | pin_state | : State of the RST pin. |