qirx
2.0.0.0
|
API for configuring and manipulating Qi RX Click driver. More...
Modules | |
Qi RX Registers Settings | |
Settings for registers of Qi RX Click driver. | |
Qi RX MikroBUS Map | |
MikroBUS pin mapping of Qi RX Click driver. | |
Functions | |
void | qirx_cfg_setup (qirx_cfg_t *cfg) |
Qi RX configuration object setup function. More... | |
err_t | qirx_init (qirx_t *ctx, qirx_cfg_t *cfg) |
Qi RX initialization function. More... | |
uint16_t | qirx_read_data (qirx_t *ctx) |
Read data function. More... | |
uint16_t | qirx_read_voltage (qirx_t *ctx, uint16_t v_ref) |
Read voltage function. More... | |
API for configuring and manipulating Qi RX Click driver.
void qirx_cfg_setup | ( | qirx_cfg_t * | cfg | ) |
Qi RX configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See qirx_cfg_t object definition for detailed explanation. |
err_t qirx_init | ( | qirx_t * | ctx, |
qirx_cfg_t * | cfg | ||
) |
Qi RX initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See qirx_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See qirx_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint16_t qirx_read_data | ( | qirx_t * | ctx | ) |
Read data function.
Function is used to read raw data from MCP3221.
[in] | ctx | : Click context object. See qirx_t object definition for detailed explanation. |
uint16_t qirx_read_voltage | ( | qirx_t * | ctx, |
uint16_t | v_ref | ||
) |
Read voltage function.
Function is used to calculate voltage of the connected battery.
[in] | ctx | : Click context object. See qirx_t object definition for detailed explanation. |
[in] | v_ref | : 16-bit value representing power supply voltage. |