hallcurrent11 2.0.0.0
Hall Current 11 Click Driver

API for configuring and manipulating Hall Current 11 Click driver. More...

Topics

 Hall Current 11 Registers Settings
 Settings for registers of Hall Current 11 Click driver.
 
 Hall Current 11 MikroBUS Map
 MikroBUS pin mapping of Hall Current 11 Click driver.
 

Functions

void hallcurrent11_cfg_setup (hallcurrent11_cfg_t *cfg)
 Hall Current 11 configuration object setup function.
 
err_t hallcurrent11_init (hallcurrent11_t *ctx, hallcurrent11_cfg_t *cfg)
 Hall Current 11 initialization function.
 
err_t hallcurrent11_default_cfg (hallcurrent11_t *ctx)
 Hall Current 11 default configuration function.
 
err_t hallcurrent11_get_adc (hallcurrent11_t *ctx, uint16_t *data_out)
 Hall Current 11 ADC reading function.
 
err_t hallcurrent11_get_adc_voltage (hallcurrent11_t *ctx, float *adc_vtg)
 Hall Current 11 get ADC voltage function.
 
err_t hallcurrent11_get_current (hallcurrent11_t *ctx, float *current)
 Hall Current 11 get current function.
 
err_t hallcurrent11_read_an_pin_voltage (hallcurrent11_t *ctx, float *data_out)
 Hall Current 11 read AN pin voltage level function.
 

Detailed Description

API for configuring and manipulating Hall Current 11 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

◆ hallcurrent11_cfg_setup()

void hallcurrent11_cfg_setup ( hallcurrent11_cfg_t * cfg)

Hall Current 11 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ hallcurrent11_default_cfg()

err_t hallcurrent11_default_cfg ( hallcurrent11_t * ctx)

Hall Current 11 default configuration function.

This function executes a default configuration of Hall Current 11 click board.

Parameters
[in]ctx: Click context object. See hallcurrent11_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.

◆ hallcurrent11_get_adc()

err_t hallcurrent11_get_adc ( hallcurrent11_t * ctx,
uint16_t * data_out )

Hall Current 11 ADC reading function.

This function reads 12-bit ADC data.

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

◆ hallcurrent11_get_adc_voltage()

err_t hallcurrent11_get_adc_voltage ( hallcurrent11_t * ctx,
float * adc_vtg )

Hall Current 11 get ADC voltage function.

This function reads 12-bit ADC data and calculate ADC voltage ( mV ).

Parameters
[in]ctx: Click context object. See hallcurrent11_t object definition for detailed explanation.
[out]adc_vtg: Output ADC voltage ( mV ) data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ hallcurrent11_get_current()

err_t hallcurrent11_get_current ( hallcurrent11_t * ctx,
float * current )

Hall Current 11 get current function.

This function reads 12-bit ADC data and calculate current ( mA ).

Parameters
[in]ctx: Click context object. See hallcurrent11_t object definition for detailed explanation.
[out]current: Current ( mA ) data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ hallcurrent11_init()

err_t hallcurrent11_init ( hallcurrent11_t * ctx,
hallcurrent11_cfg_t * cfg )

Hall Current 11 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See hallcurrent11_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See hallcurrent11_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ hallcurrent11_read_an_pin_voltage()

err_t hallcurrent11_read_an_pin_voltage ( hallcurrent11_t * ctx,
float * data_out )

Hall Current 11 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 hallcurrent11_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
None.