hallcurrent5  2.0.0.0
Functions

Functions

void hallcurrent5_cfg_setup (hallcurrent5_cfg_t *cfg)
 Config Object Initialization function. More...
 
HALLCURRENT5_RETVAL hallcurrent5_init (hallcurrent5_t *ctx, hallcurrent5_cfg_t *cfg)
 Initialization function. More...
 
hallcurrent5_data_t hallcurrent5_generic_read (hallcurrent5_t *ctx)
 Generic read function. More...
 
void hallcurrent5_set_adc_resolution (hallcurrent5_t *ctx, float adc_res)
 Set ADC resolution function. More...
 
float hallcurrent5_get_adc_voltage (hallcurrent5_t *ctx, uint16_t adc_value)
 Get ADC voltage function. More...
 
float hallcurrent5_get_current (hallcurrent5_t *ctx, uint16_t adc_value)
 Get ADC current value function. More...
 
uint8_t hallcurrent5_get_fault (hallcurrent5_t *ctx)
 Get ADC fault function. More...
 
void hallcurrent5_set_init_voltage (hallcurrent5_t *ctx, uint16_t voltage)
 Get ADC current value function. More...
 

Detailed Description

Function Documentation

◆ hallcurrent5_cfg_setup()

void hallcurrent5_cfg_setup ( hallcurrent5_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ hallcurrent5_generic_read()

hallcurrent5_data_t hallcurrent5_generic_read ( hallcurrent5_t ctx)

Generic read function.

Parameters
ctxClick object.
Returns
ADC data

This function read ADC data.

◆ hallcurrent5_get_adc_voltage()

float hallcurrent5_get_adc_voltage ( hallcurrent5_t ctx,
uint16_t  adc_value 
)

Get ADC voltage function.

Parameters
ctxClick object.
adc_valueADC Value

This function gets ADC voltage.

◆ hallcurrent5_get_current()

float hallcurrent5_get_current ( hallcurrent5_t ctx,
uint16_t  adc_value 
)

Get ADC current value function.

Parameters
ctxClick object.
adc_valueADC Value

This function gets ADC current value.

◆ hallcurrent5_get_fault()

uint8_t hallcurrent5_get_fault ( hallcurrent5_t ctx)

Get ADC fault function.

Parameters
ctxClick object.

This function gets fault.

◆ hallcurrent5_init()

HALLCURRENT5_RETVAL hallcurrent5_init ( hallcurrent5_t ctx,
hallcurrent5_cfg_t cfg 
)

Initialization function.

Parameters
hallcurrent5Click object.
cfgClick configuration structure.

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

◆ hallcurrent5_set_adc_resolution()

void hallcurrent5_set_adc_resolution ( hallcurrent5_t ctx,
float  adc_res 
)

Set ADC resolution function.

Parameters
ctxClick object.
adc_resADC Resolution

This function sets ADC resolution.

◆ hallcurrent5_set_init_voltage()

void hallcurrent5_set_init_voltage ( hallcurrent5_t ctx,
uint16_t  voltage 
)

Get ADC current value function.

Parameters
ctxClick object.
voltageVoltage

This function gets ADC value.