hallcurrent12 2.0.0.0
Hall Current 12 Click Driver

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

Topics

 Hall Current 12 Registers Settings
 Settings for registers of Hall Current 12 Click driver.
 

Macros

#define HALLCURRENT12_SET_DEV_ADDR   0x4D
 Hall Current 12 device address setting.
 

Functions

void hallcurrent12_cfg_setup (hallcurrent12_cfg_t *cfg)
 Hall Current 12 configuration object setup function.
 
err_t hallcurrent12_init (hallcurrent12_t *ctx, hallcurrent12_cfg_t *cfg)
 Hall Current 12 initialization function.
 
err_t hallcurrent12_get_adc (hallcurrent12_t *ctx, float *adc_vtg)
 Hall Current 12 get ADC function.
 
err_t hallcurrent12_get_adc_voltage (hallcurrent12_t *ctx, float *adc_vtg)
 Hall Current 12 get ADC voltage function.
 
err_t hallcurrent12_get_current (hallcurrent12_t *ctx, float *current)
 Hall Current 12 get current function.
 
err_t hallcurrent12_get_pin_voltage (hallcurrent12_t *ctx, float *adc_vtg)
 Hall Current 12 read AN pin voltage level function.
 
err_t hallcurrent12_calibration (hallcurrent12_t *ctx)
 Hall Current 12 calibration function.
 

Detailed Description

API for configuring and manipulating Hall Current 12 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Macro Definition Documentation

◆ HALLCURRENT12_SET_DEV_ADDR

#define HALLCURRENT12_SET_DEV_ADDR   0x4D

Hall Current 12 device address setting.

Specified setting for device slave address selection of Hall Current 12 Click driver.

Function Documentation

◆ hallcurrent12_calibration()

err_t hallcurrent12_calibration ( hallcurrent12_t * ctx)

Hall Current 12 calibration function.

This function calculates voltage offset when there's no input current applied.

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

◆ hallcurrent12_cfg_setup()

void hallcurrent12_cfg_setup ( hallcurrent12_cfg_t * cfg)

Hall Current 12 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ hallcurrent12_get_adc()

err_t hallcurrent12_get_adc ( hallcurrent12_t * ctx,
float * adc_vtg )

Hall Current 12 get ADC function.

This function reads ADC voltage ( V ) of the TMCS1100 1% High-Precision, Basic Isolation Hall-Effect Current Sensor on the Hall Current 12 click boardâ„¢.

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

◆ hallcurrent12_get_adc_voltage()

err_t hallcurrent12_get_adc_voltage ( hallcurrent12_t * ctx,
float * adc_vtg )

Hall Current 12 get ADC voltage function.

This function reads 12-bit ADC data and calculate ADC voltage ( V ) of the TMCS1100 1% High-Precision, Basic Isolation Hall-Effect Current Sensor on the Hall Current 12 click boardâ„¢.

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

◆ hallcurrent12_get_current()

err_t hallcurrent12_get_current ( hallcurrent12_t * ctx,
float * current )

Hall Current 12 get current function.

This function reads 12-bit ADC data and calculate current ( A ) of the TMCS1100 1% High-Precision, Basic Isolation Hall-Effect Current Sensor on the Hall Current 12 click boardâ„¢.

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

◆ hallcurrent12_get_pin_voltage()

err_t hallcurrent12_get_pin_voltage ( hallcurrent12_t * ctx,
float * adc_vtg )

Hall Current 12 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 hallcurrent12_t object definition for detailed explanation.
[out]adc_vtg: Output voltage level of the analog pin ( V ).
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ hallcurrent12_init()

err_t hallcurrent12_init ( hallcurrent12_t * ctx,
hallcurrent12_cfg_t * cfg )

Hall Current 12 initialization function.

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

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