hallcurrent19
2.1.0.0
|
API for configuring and manipulating Hall Current 19 Click driver. More...
Modules | |
Hall Current 19 Registers Settings | |
Settings for registers of Hall Current 19 Click driver. | |
Hall Current 19 MikroBUS Map | |
MikroBUS pin mapping of Hall Current 19 Click driver. | |
Functions | |
void | hallcurrent19_cfg_setup (hallcurrent19_cfg_t *cfg) |
Hall Current 19 configuration object setup function. More... | |
err_t | hallcurrent19_init (hallcurrent19_t *ctx, hallcurrent19_cfg_t *cfg) |
Hall Current 19 initialization function. More... | |
err_t | hallcurrent19_default_cfg (hallcurrent19_t *ctx) |
Hall Current 19 default configuration function. More... | |
err_t | hallcurrent19_read_an_pin_value (hallcurrent19_t *ctx, uint16_t *data_out) |
Hall Current 19 read AN pin value function. More... | |
err_t | hallcurrent19_read_voltage (hallcurrent19_t *ctx, float *data_out) |
Hall Current 19 read AN pin voltage level function. More... | |
uint8_t | hallcurrent19_get_oc1 (hallcurrent19_t *ctx) |
Hall Current 19 get over current detection 1 state function. More... | |
uint8_t | hallcurrent19_get_oc2 (hallcurrent19_t *ctx) |
Hall Current 19 get over current detection 2 state function. More... | |
err_t | hallcurrent19_set_zero_ref (hallcurrent19_t *ctx) |
Hall Current 19 set zero reference function. More... | |
err_t | hallcurrent19_get_current (hallcurrent19_t *ctx, float *current) |
Hall Current 19 get current function. More... | |
API for configuring and manipulating Hall Current 19 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void hallcurrent19_cfg_setup | ( | hallcurrent19_cfg_t * | cfg | ) |
Hall Current 19 configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See hallcurrent19_cfg_t object definition for detailed explanation. |
err_t hallcurrent19_default_cfg | ( | hallcurrent19_t * | ctx | ) |
Hall Current 19 default configuration function.
This function executes a default configuration of Hall Current 19 Click board.
[in] | ctx | : Click context object. See hallcurrent19_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent19_get_current | ( | hallcurrent19_t * | ctx, |
float * | current | ||
) |
Hall Current 19 get current function.
This function reads and calculate input current value of the Hall Current 19 Click board.
[in] | ctx | : Click context object. See hallcurrent19_t object definition for detailed explanation. |
[in] | current | : Current [A]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t hallcurrent19_get_oc1 | ( | hallcurrent19_t * | ctx | ) |
Hall Current 19 get over current detection 1 state function.
This function is used to get state of the overcurrent 1 detection of the Hall Current 19 Click board.
[in] | ctx | : Click context object. See hallcurrent19_t object definition for detailed explanation. |
0
- OCD active, current over 7A, 1
- OCD inactive. See #err_t definition for detailed explanation. uint8_t hallcurrent19_get_oc2 | ( | hallcurrent19_t * | ctx | ) |
Hall Current 19 get over current detection 2 state function.
This function is used to get state of the overcurrent 2 detection of the Hall Current 19 Click board.
[in] | ctx | : Click context object. See hallcurrent19_t object definition for detailed explanation. |
0
- OCD active, current over 17.5A, 1
- OCD inactive. See #err_t definition for detailed explanation. err_t hallcurrent19_init | ( | hallcurrent19_t * | ctx, |
hallcurrent19_cfg_t * | cfg | ||
) |
Hall Current 19 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See hallcurrent19_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See hallcurrent19_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent19_read_an_pin_value | ( | hallcurrent19_t * | ctx, |
uint16_t * | data_out | ||
) |
Hall Current 19 read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See hallcurrent19_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent19_read_voltage | ( | hallcurrent19_t * | ctx, |
float * | data_out | ||
) |
Hall Current 19 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 hallcurrent19_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t hallcurrent19_set_zero_ref | ( | hallcurrent19_t * | ctx | ) |
Hall Current 19 set zero reference function.
This function sets the zero voltage reference of the Hall Current 19 Click board.
[in] | ctx | : Click context object. See hallcurrent19_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.