hallcurrent19  2.1.0.0
Modules | Functions
Hall Current 19 Click Driver

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...
 

Detailed Description

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.

Function Documentation

◆ hallcurrent19_cfg_setup()

void hallcurrent19_cfg_setup ( hallcurrent19_cfg_t cfg)

Hall Current 19 configuration object setup function.

This function initializes Click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See hallcurrent19_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ hallcurrent19_default_cfg()

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.

Parameters
[in]ctx: Click context object. See hallcurrent19_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ hallcurrent19_get_current()

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.

Parameters
[in]ctx: Click context object. See hallcurrent19_t object definition for detailed explanation.
[in]current: Current [A].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hallcurrent19_get_oc1()

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.

Parameters
[in]ctx: Click context object. See hallcurrent19_t object definition for detailed explanation.
Returns
  • 0 - OCD active, current over 7A,
  • 1 - OCD inactive. See #err_t definition for detailed explanation.
Note
None.

◆ hallcurrent19_get_oc2()

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.

Parameters
[in]ctx: Click context object. See hallcurrent19_t object definition for detailed explanation.
Returns
  • 0 - OCD active, current over 17.5A,
  • 1 - OCD inactive. See #err_t definition for detailed explanation.
Note
None.

◆ hallcurrent19_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hallcurrent19_read_an_pin_value()

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.

Parameters
[in]ctx: Click context object. See hallcurrent19_t object definition for detailed explanation.
[out]data_out: Output ADC result.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hallcurrent19_read_voltage()

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.

Parameters
[in]ctx: Click context object. See hallcurrent19_t object definition for detailed explanation.
[out]data_out: Output voltage level of the analog pin [V].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
The conversion to voltage depends on the entered configuration of the ADC (resolution, reference voltage).

◆ hallcurrent19_set_zero_ref()

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.

Parameters
[in]ctx: Click context object. See hallcurrent19_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.