hallcurrent18
2.1.0.0
|
API for configuring and manipulating Hall Current 18 Click driver. More...
Modules | |
Hall Current 18 Registers Settings | |
Settings for registers of Hall Current 18 Click driver. | |
Hall Current 18 MikroBUS Map | |
MikroBUS pin mapping of Hall Current 18 Click driver. | |
Functions | |
void | hallcurrent18_cfg_setup (hallcurrent18_cfg_t *cfg) |
Hall Current 18 configuration object setup function. More... | |
void | hallcurrent18_drv_interface_selection (hallcurrent18_cfg_t *cfg, hallcurrent18_drv_t drv_sel) |
Hall Current 18 driver interface setup function. More... | |
err_t | hallcurrent18_init (hallcurrent18_t *ctx, hallcurrent18_cfg_t *cfg) |
Hall Current 18 initialization function. More... | |
err_t | hallcurrent18_default_cfg (hallcurrent18_t *ctx) |
Hall Current 18 default configuration function. More... | |
err_t | hallcurrent18_read_raw_adc (hallcurrent18_t *ctx, uint16_t *raw_adc) |
Hall Current 18 read raw ADC value function. More... | |
err_t | hallcurrent18_read_voltage (hallcurrent18_t *ctx, float *voltage) |
Hall Current 18 read voltage level function. More... | |
err_t | hallcurrent18_set_vref (hallcurrent18_t *ctx, float vref) |
Hall Current 18 set vref function. More... | |
err_t | hallcurrent18_read_current (hallcurrent18_t *ctx, float *current) |
Hall Current 18 get current function. More... | |
err_t | hallcurrent18_set_zero_ref (hallcurrent18_t *ctx) |
Hall Current 18 set zero reference function. More... | |
API for configuring and manipulating Hall Current 18 Click driver.
void hallcurrent18_cfg_setup | ( | hallcurrent18_cfg_t * | cfg | ) |
Hall Current 18 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See hallcurrent18_cfg_t object definition for detailed explanation. |
err_t hallcurrent18_default_cfg | ( | hallcurrent18_t * | ctx | ) |
Hall Current 18 default configuration function.
This function executes a default configuration of Hall Current 18 click board.
[in] | ctx | : Click context object. See hallcurrent18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void hallcurrent18_drv_interface_selection | ( | hallcurrent18_cfg_t * | cfg, |
hallcurrent18_drv_t | drv_sel | ||
) |
Hall Current 18 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 hallcurrent18_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See hallcurrent18_drv_t object definition for detailed explanation. |
err_t hallcurrent18_init | ( | hallcurrent18_t * | ctx, |
hallcurrent18_cfg_t * | cfg | ||
) |
Hall Current 18 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See hallcurrent18_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See hallcurrent18_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent18_read_current | ( | hallcurrent18_t * | ctx, |
float * | current | ||
) |
Hall Current 18 get current function.
This function reads and calculate input current value of the MCS1806GS-3-40-P, solated Hall-Effect Current Sensor on the Hall Current 18 Click boardâ„¢.
[in] | ctx | : Click context object. See hallcurrent18_t object definition for detailed explanation. |
[in] | current | : Current [A]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent18_read_raw_adc | ( | hallcurrent18_t * | ctx, |
uint16_t * | raw_adc | ||
) |
Hall Current 18 read raw ADC value function.
This function reads raw ADC value.
[in] | ctx | : Click context object. See hallcurrent18_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 hallcurrent18_read_voltage | ( | hallcurrent18_t * | ctx, |
float * | voltage | ||
) |
Hall Current 18 read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level.
[in] | ctx | : Click context object. See hallcurrent18_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 hallcurrent18_set_vref | ( | hallcurrent18_t * | ctx, |
float | vref | ||
) |
Hall Current 18 set vref function.
This function sets the voltage reference for Hall Current 18 click driver.
[in] | ctx | : Click context object. See hallcurrent18_t object definition for detailed explanation. |
[in] | vref | : Reference voltage (volts). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent18_set_zero_ref | ( | hallcurrent18_t * | ctx | ) |
Hall Current 18 set zero reference function.
This function sets the zero voltage reference of the MCS1806GS-3-40-P, solated Hall-Effect Current Sensor on the Hall Current 18 Click boardâ„¢.
[in] | ctx | : Click context object. See hallcurrent18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.