hallcurrent14
2.0.0.0
|
API for configuring and manipulating Hall Current 14 Click driver. More...
Modules | |
Hall Current 14 Registers Settings | |
Settings for registers of Hall Current 14 Click driver. | |
Hall Current 14 MikroBUS Map | |
MikroBUS pin mapping of Hall Current 14 Click driver. | |
Functions | |
void | hallcurrent14_cfg_setup (hallcurrent14_cfg_t *cfg) |
Hall Current 14 configuration object setup function. More... | |
void | hallcurrent14_drv_interface_selection (hallcurrent14_cfg_t *cfg, hallcurrent14_drv_t drv_sel) |
Hall Current 14 driver interface setup function. More... | |
err_t | hallcurrent14_init (hallcurrent14_t *ctx, hallcurrent14_cfg_t *cfg) |
Hall Current 14 initialization function. More... | |
err_t | hallcurrent14_read_raw_adc (hallcurrent14_t *ctx, uint16_t *raw_adc) |
Hall Current 14 read raw ADC value function. More... | |
err_t | hallcurrent14_read_voltage (hallcurrent14_t *ctx, float *voltage) |
Hall Current 14 read voltage level function. More... | |
err_t | hallcurrent14_set_vref (hallcurrent14_t *ctx, float vref) |
Hall Current 14 set vref function. More... | |
err_t | hallcurrent14_read_current (hallcurrent14_t *ctx, float *current) |
Hall Current 14 read current function. More... | |
API for configuring and manipulating Hall Current 14 Click driver.
void hallcurrent14_cfg_setup | ( | hallcurrent14_cfg_t * | cfg | ) |
Hall Current 14 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See hallcurrent14_cfg_t object definition for detailed explanation. |
void hallcurrent14_drv_interface_selection | ( | hallcurrent14_cfg_t * | cfg, |
hallcurrent14_drv_t | drv_sel | ||
) |
Hall Current 14 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See hallcurrent14_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See hallcurrent14_drv_t object definition for detailed explanation. |
err_t hallcurrent14_init | ( | hallcurrent14_t * | ctx, |
hallcurrent14_cfg_t * | cfg | ||
) |
Hall Current 14 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See hallcurrent14_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See hallcurrent14_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent14_read_current | ( | hallcurrent14_t * | ctx, |
float * | current | ||
) |
Hall Current 14 read current function.
This function reads the input current level [A] based on HALLCURRENT14_NUM_CONVERSIONS of voltage measurements.
[in] | ctx | : Click context object. See hallcurrent14_t object definition for detailed explanation. |
[out] | current | : Input current level [A]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent14_read_raw_adc | ( | hallcurrent14_t * | ctx, |
uint16_t * | raw_adc | ||
) |
Hall Current 14 read raw ADC value function.
This function reads raw ADC value.
[in] | ctx | : Click context object. See hallcurrent14_t object definition for detailed explanation. |
[out] | raw_adc | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent14_read_voltage | ( | hallcurrent14_t * | ctx, |
float * | voltage | ||
) |
Hall Current 14 read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level.
[in] | ctx | : Click context object. See hallcurrent14_t object definition for detailed explanation. |
[out] | voltage | : Output voltage level [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent14_set_vref | ( | hallcurrent14_t * | ctx, |
float | vref | ||
) |
Hall Current 14 set vref function.
This function sets the voltage reference for Hall Current 14 click driver.
[in] | ctx | : Click context object. See hallcurrent14_t object definition for detailed explanation. |
[in] | vref | : Reference voltage (volts). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.