current4
2.0.0.0
|
API for configuring and manipulating Current 4 Click driver. More...
Modules | |
Current 4 Registers List | |
List of registers of Current 4 Click driver. | |
Current 4 Registers Settings | |
Settings for registers of Current 4 Click driver. | |
Current 4 MikroBUS Map | |
MikroBUS pin mapping of Current 4 Click driver. | |
Functions | |
void | current4_cfg_setup (current4_cfg_t *cfg) |
Current 4 configuration object setup function. More... | |
err_t | current4_init (current4_t *ctx, current4_cfg_t *cfg) |
Current 4 initialization function. More... | |
err_t | current4_read_an_pin_value (current4_t *ctx, uint16_t *data_out) |
Read AN pin value function. More... | |
err_t | current4_read_an_pin_voltage (current4_t *ctx, float *data_out) |
Read AN pin voltage level function. More... | |
err_t | current4_read_load_current (current4_t *ctx, float *load_current) |
Read load current. More... | |
API for configuring and manipulating Current 4 Click driver.
void current4_cfg_setup | ( | current4_cfg_t * | cfg | ) |
Current 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See current4_cfg_t object definition for detailed explanation. |
err_t current4_init | ( | current4_t * | ctx, |
current4_cfg_t * | cfg | ||
) |
Current 4 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See current4_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See current4_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t current4_read_an_pin_value | ( | current4_t * | ctx, |
uint16_t * | data_out | ||
) |
Read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See current4_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t current4_read_an_pin_voltage | ( | current4_t * | ctx, |
float * | data_out | ||
) |
Read AN pin voltage level function.
This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
[in] | ctx | : Click context object. See current4_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error.err_t current4_read_load_current | ( | current4_t * | ctx, |
float * | load_current | ||
) |
Read load current.
This function reads voltage on AN pin and calculates the load current.
[in] | ctx | : Click context object. See current4_t object definition for detailed explanation. |
[out] | load_current | : Output load current [A]. |
0
- Success, -1
- Error.