hallcurrent825a 2.0.0.0
|
API for configuring and manipulating Hall Current 8 25A Click driver. More...
Topics | |
Hall Current 8 25A MikroBUS Map | |
MikroBUS pin mapping of Hall Current 8 25A Click driver. | |
Functions | |
void | hallcurrent825a_cfg_setup (hallcurrent825a_cfg_t *cfg) |
Hall Current 8 25A configuration object setup function. | |
err_t | hallcurrent825a_init (hallcurrent825a_t *ctx, hallcurrent825a_cfg_t *cfg) |
Hall Current 8 25A initialization function. | |
err_t | hallcurrent825a_read_pin_value (hallcurrent825a_t *ctx, uint16_t *data_out) |
Hall Current 8 25A read AN pin value function. | |
err_t | hallcurrent825a_read_pin_volt (hallcurrent825a_t *ctx, float *data_out) |
Hall Current 8 25A read AN pin voltage level function. | |
err_t | hallcurrent825a_calibration (hallcurrent825a_t *ctx) |
Hall Current 8 25A calibration function. | |
err_t | hallcurrent825a_get_voltage (hallcurrent825a_t *ctx, float *avr_voltage) |
Hall Current 8 25A read voltage level function. | |
err_t | hallcurrent825a_get_current (hallcurrent825a_t *ctx, float *current) |
Hall Current 8 25A get current level function. | |
uint8_t | hallcurrent825a_get_odc1 (hallcurrent825a_t *ctx) |
Hall Current 8 25A get state of OC1 function. | |
uint8_t | hallcurrent825a_get_odc2 (hallcurrent825a_t *ctx) |
Hall Current 8 25A get state of OC2 function. | |
API for configuring and manipulating Hall Current 8 25A Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
err_t hallcurrent825a_calibration | ( | hallcurrent825a_t * | ctx | ) |
Hall Current 8 25A calibration function.
This function sets the calibration value into the offset data from context object of the TLI4971 high precision coreless current sensor on Hall Current 8 25A Click board.
[in] | ctx | : Click context object. See hallcurrent825a_t object definition for detailed explanation. |
0
- Success, -1
- Error.void hallcurrent825a_cfg_setup | ( | hallcurrent825a_cfg_t * | cfg | ) |
Hall Current 8 25A configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See hallcurrent825a_cfg_t object definition for detailed explanation. |
err_t hallcurrent825a_get_current | ( | hallcurrent825a_t * | ctx, |
float * | current ) |
Hall Current 8 25A get current level function.
This function reads results of AD conversion of the AN pin and converts them to proportional current level.
[in] | ctx | : Click context object. See hallcurrent825a_t object definition for detailed explanation. |
[out] | current | : Average current level of the analog pin [A]. |
0
- Success, -1
- Error.uint8_t hallcurrent825a_get_odc1 | ( | hallcurrent825a_t * | ctx | ) |
Hall Current 8 25A get state of OC1 function.
This function gets the state of the OC1 pin which detects overcurrent of the 201.6 [A] ( 120 [A] * 1.68 ) of the TLI4971 high precision coreless current sensor on the Hall Current 8 25A Click board.
[out] | ctx | : Click context object. See #daq3_t object definition for detailed explanation. |
0x00
- Overcurrent detected, 0x01
- OK.uint8_t hallcurrent825a_get_odc2 | ( | hallcurrent825a_t * | ctx | ) |
Hall Current 8 25A get state of OC2 function.
This function gets the state of the OC2 pin which detects overcurrent of the 98.4 [A] ( 120 [A] * 0.82 ) of the TLI4971 high precision coreless current sensor on the Hall Current 8 25A Click board.
[out] | ctx | : Click context object. See #daq3_t object definition for detailed explanation. |
0x00
- Overcurrent detected, 0x01
- OK.err_t hallcurrent825a_get_voltage | ( | hallcurrent825a_t * | ctx, |
float * | avr_voltage ) |
Hall Current 8 25A read 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 hallcurrent825a_t object definition for detailed explanation. |
[out] | avr_voltage | : Average voltage level of the analog pin [V]. |
0
- Success, -1
- Error.err_t hallcurrent825a_init | ( | hallcurrent825a_t * | ctx, |
hallcurrent825a_cfg_t * | cfg ) |
Hall Current 8 25A initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See hallcurrent825a_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See hallcurrent825a_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t hallcurrent825a_read_pin_value | ( | hallcurrent825a_t * | ctx, |
uint16_t * | data_out ) |
Hall Current 8 25A read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See hallcurrent825a_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t hallcurrent825a_read_pin_volt | ( | hallcurrent825a_t * | ctx, |
float * | data_out ) |
Hall Current 8 25A 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 hallcurrent825a_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error.