hallcurrent10 2.0.0.0
Hall Current 10 Click Driver

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

Topics

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

Functions

void hallcurrent10_cfg_setup (hallcurrent10_cfg_t *cfg)
 Hall Current 10 configuration object setup function.
 
err_t hallcurrent10_init (hallcurrent10_t *ctx, hallcurrent10_cfg_t *cfg)
 Hall Current 10 initialization function.
 
err_t hallcurrent10_default_cfg (hallcurrent10_t *ctx)
 Hall Current 10 default configuration function.
 
err_t hallcurrent10_read_adc (hallcurrent10_t *ctx, uint16_t *read_adc)
 Hall Current 10 I2C ADC reading function.
 
err_t hallcurrent10_get_adc_voltage (hallcurrent10_t *ctx, float *adc_vtg)
 Hall Current 10 get ADC voltage function.
 
err_t hallcurrent10_get_current (hallcurrent10_t *ctx, float *current)
 Hall Current 10 get current function.
 

Detailed Description

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

◆ hallcurrent10_cfg_setup()

void hallcurrent10_cfg_setup ( hallcurrent10_cfg_t * cfg)

Hall Current 10 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ hallcurrent10_default_cfg()

err_t hallcurrent10_default_cfg ( hallcurrent10_t * ctx)

Hall Current 10 default configuration function.

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

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

◆ hallcurrent10_get_adc_voltage()

err_t hallcurrent10_get_adc_voltage ( hallcurrent10_t * ctx,
float * adc_vtg )

Hall Current 10 get ADC voltage function.

This function reads 12-bit ADC data and calculate ADC voltage ( mV ) by using I2C serial interface.

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

◆ hallcurrent10_get_current()

err_t hallcurrent10_get_current ( hallcurrent10_t * ctx,
float * current )

Hall Current 10 get current function.

This function reads 12-bit ADC data and calculate current ( mA ) by using I2C serial interface.

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

◆ hallcurrent10_init()

err_t hallcurrent10_init ( hallcurrent10_t * ctx,
hallcurrent10_cfg_t * cfg )

Hall Current 10 initialization function.

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

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

◆ hallcurrent10_read_adc()

err_t hallcurrent10_read_adc ( hallcurrent10_t * ctx,
uint16_t * read_adc )

Hall Current 10 I2C ADC reading function.

This function reads 12-bit ADC data by using I2C serial interface.

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