hallcurrent16 2.1.0.0
|
API for configuring and manipulating Hall Current 16 Click driver. More...
Topics | |
Hall Current 16 Registers Settings | |
Settings for registers of Hall Current 16 Click driver. | |
Hall Current 16 MikroBUS Map | |
MikroBUS pin mapping of Hall Current 16 Click driver. | |
Functions | |
void | hallcurrent16_cfg_setup (hallcurrent16_cfg_t *cfg) |
Hall Current 16 configuration object setup function. | |
err_t | hallcurrent16_init (hallcurrent16_t *ctx, hallcurrent16_cfg_t *cfg) |
Hall Current 16 initialization function. | |
err_t | hallcurrent16_default_cfg (hallcurrent16_t *ctx) |
Hall Current 16 default configuration function. | |
void | hallcurrent16_set_vref (hallcurrent16_t *ctx, float vref) |
Hall Current 16 set vref function. | |
void | hallcurrent16_set_sens (hallcurrent16_t *ctx) |
Hall Current 16 set sens function. | |
err_t | hallcurrent16_get_voltage (hallcurrent16_t *ctx, float *voltage) |
Hall Current 16 get voltage function. | |
err_t | hallcurrent16_get_vout (hallcurrent16_t *ctx, float *adc_vout) |
Hall Current 16 get vout function. | |
err_t | hallcurrent16_get_vref (hallcurrent16_t *ctx, float *adc_vref) |
Hall Current 16 get vout function. | |
err_t | hallcurrent16_get_current (hallcurrent16_t *ctx, float *current) |
Hall Current 16 get current function. | |
uint8_t | hallcurrent16_get_ovc_fault (hallcurrent16_t *ctx) |
Hall Current 16 get overcurrent fault function. | |
API for configuring and manipulating Hall Current 16 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void hallcurrent16_cfg_setup | ( | hallcurrent16_cfg_t * | cfg | ) |
Hall Current 16 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See hallcurrent16_cfg_t object definition for detailed explanation. |
err_t hallcurrent16_default_cfg | ( | hallcurrent16_t * | ctx | ) |
Hall Current 16 default configuration function.
This function executes a default configuration of Hall Current 16 click board.
[in] | ctx | : Click context object. See hallcurrent16_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent16_get_current | ( | hallcurrent16_t * | ctx, |
float * | current ) |
Hall Current 16 get current function.
This function reads and calculate input current value of the ACS37002, 400 kHz, High Accuracy Current Sensor with Pin-Selectable Gains on the Hall Current 16 Click board™.
[in] | ctx | : Click context object. See hallcurrent16_t object definition for detailed explanation. |
[out] | current | : Current [A]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t hallcurrent16_get_ovc_fault | ( | hallcurrent16_t * | ctx | ) |
Hall Current 16 get overcurrent fault function.
This function get states of the OCF ( Overcurrent Fault ) pin of the ACS37002, 400 kHz, High Accuracy Current Sensor with Pin-Selectable Gains on the Hall Current 16 Click board™.
[in] | ctx | : Click context object. See hallcurrent16_t object definition for detailed explanation. |
0
- Overcurrent Fault state, 1
- OK state. err_t hallcurrent16_get_voltage | ( | hallcurrent16_t * | ctx, |
float * | voltage ) |
Hall Current 16 get voltage function.
This function reads raw ADC value and converts it to proportional voltage level of the ADC122S101, 2 Channel, 500 ksps to 1 Msps 12-Bit A/D Converter on the Hall Current 16 Click board™.
[in] | ctx | : Click context object. See hallcurrent16_t object definition for detailed explanation. |
[out] | voltage | : Output voltage [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent16_get_vout | ( | hallcurrent16_t * | ctx, |
float * | adc_vout ) |
Hall Current 16 get vout function.
This function reads output voltage of the ACS37002, 400 kHz, High Accuracy Current Sensor with Pin-Selectable Gains on the Hall Current 16 Click board™.
[in] | ctx | : Click context object. See hallcurrent16_t object definition for detailed explanation. |
[out] | adc_vout | : ADC output voltage [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent16_get_vref | ( | hallcurrent16_t * | ctx, |
float * | adc_vref ) |
Hall Current 16 get vout function.
This function reads output voltage of the ACS37002, 400 kHz, High Accuracy Current Sensor with Pin-Selectable Gains on the Hall Current 16 Click board™.
[in] | ctx | : Click context object. See hallcurrent16_t object definition for detailed explanation. |
[out] | adc_vref | : ADC reference voltage [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent16_init | ( | hallcurrent16_t * | ctx, |
hallcurrent16_cfg_t * | cfg ) |
Hall Current 16 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See hallcurrent16_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See hallcurrent16_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void hallcurrent16_set_sens | ( | hallcurrent16_t * | ctx | ) |
Hall Current 16 set sens function.
This function sets the sensitivity values for the calculation depending on the selected gain of the ACS37002, 400 kHz, High Accuracy Current Sensor with Pin-Selectable Gains on the Hall Current 16 Click board™.
[in] | ctx | : Click context object. See hallcurrent16_t object definition for detailed explanation. |
[in] | vref | : Reference voltage [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void hallcurrent16_set_vref | ( | hallcurrent16_t * | ctx, |
float | vref ) |
Hall Current 16 set vref function.
This function sets the voltage reference of the ADC122S101, 2 Channel, 500 ksps to 1 Msps 12-Bit A/D Converter on the Hall Current 16 Click board™.
[in] | ctx | : Click context object. See hallcurrent16_t object definition for detailed explanation. |
[in] | vref | : Reference voltage [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.