hallcurrent12 2.0.0.0
|
API for configuring and manipulating Hall Current 12 Click driver. More...
Topics | |
Hall Current 12 Registers Settings | |
Settings for registers of Hall Current 12 Click driver. | |
Macros | |
#define | HALLCURRENT12_SET_DEV_ADDR 0x4D |
Hall Current 12 device address setting. | |
Functions | |
void | hallcurrent12_cfg_setup (hallcurrent12_cfg_t *cfg) |
Hall Current 12 configuration object setup function. | |
err_t | hallcurrent12_init (hallcurrent12_t *ctx, hallcurrent12_cfg_t *cfg) |
Hall Current 12 initialization function. | |
err_t | hallcurrent12_get_adc (hallcurrent12_t *ctx, float *adc_vtg) |
Hall Current 12 get ADC function. | |
err_t | hallcurrent12_get_adc_voltage (hallcurrent12_t *ctx, float *adc_vtg) |
Hall Current 12 get ADC voltage function. | |
err_t | hallcurrent12_get_current (hallcurrent12_t *ctx, float *current) |
Hall Current 12 get current function. | |
err_t | hallcurrent12_get_pin_voltage (hallcurrent12_t *ctx, float *adc_vtg) |
Hall Current 12 read AN pin voltage level function. | |
err_t | hallcurrent12_calibration (hallcurrent12_t *ctx) |
Hall Current 12 calibration function. | |
API for configuring and manipulating Hall Current 12 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
#define HALLCURRENT12_SET_DEV_ADDR 0x4D |
Hall Current 12 device address setting.
Specified setting for device slave address selection of Hall Current 12 Click driver.
err_t hallcurrent12_calibration | ( | hallcurrent12_t * | ctx | ) |
Hall Current 12 calibration function.
This function calculates voltage offset when there's no input current applied.
[in] | ctx | : Click context object. See hallcurrent12_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void hallcurrent12_cfg_setup | ( | hallcurrent12_cfg_t * | cfg | ) |
Hall Current 12 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See hallcurrent12_cfg_t object definition for detailed explanation. |
err_t hallcurrent12_get_adc | ( | hallcurrent12_t * | ctx, |
float * | adc_vtg ) |
Hall Current 12 get ADC function.
This function reads ADC voltage ( V ) of the TMCS1100 1% High-Precision, Basic Isolation Hall-Effect Current Sensor on the Hall Current 12 click boardâ„¢.
[in] | ctx | : Click context object. See hallcurrent12_t object definition for detailed explanation. |
[out] | adc_vtg | : Output ADC voltage ( V ) data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent12_get_adc_voltage | ( | hallcurrent12_t * | ctx, |
float * | adc_vtg ) |
Hall Current 12 get ADC voltage function.
This function reads 12-bit ADC data and calculate ADC voltage ( V ) of the TMCS1100 1% High-Precision, Basic Isolation Hall-Effect Current Sensor on the Hall Current 12 click boardâ„¢.
[in] | ctx | : Click context object. See hallcurrent12_t object definition for detailed explanation. |
[out] | adc_vtg | : Output ADC voltage ( V ) data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent12_get_current | ( | hallcurrent12_t * | ctx, |
float * | current ) |
Hall Current 12 get current function.
This function reads 12-bit ADC data and calculate current ( A ) of the TMCS1100 1% High-Precision, Basic Isolation Hall-Effect Current Sensor on the Hall Current 12 click boardâ„¢.
[in] | ctx | : Click context object. See hallcurrent12_t object definition for detailed explanation. |
[out] | adc_vtg | : Output current ( A ) data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent12_get_pin_voltage | ( | hallcurrent12_t * | ctx, |
float * | adc_vtg ) |
Hall Current 12 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 hallcurrent12_t object definition for detailed explanation. |
[out] | adc_vtg | : Output voltage level of the analog pin ( V ). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent12_init | ( | hallcurrent12_t * | ctx, |
hallcurrent12_cfg_t * | cfg ) |
Hall Current 12 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See hallcurrent12_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See hallcurrent12_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.