hallcurrent  2.0.0.0
Functions

Functions

void hallcurrent_cfg_setup (hallcurrent_cfg_t *cfg)
 Config Object Initialization function. More...
 
HALLCURRENT_RETVAL hallcurrent_init (hallcurrent_t *ctx, hallcurrent_cfg_t *cfg)
 Initialization function. More...
 
void hallcurrent_generic_transfer (hallcurrent_t *ctx, spi_master_transfer_data_t *block)
 Generic transfer function. More...
 
uint16_t hallcurrent_read_data (hallcurrent_t *ctx)
 Generic read 16-bit data function. More...
 
uint8_t hallcurrent_chack_status (hallcurrent_t *ctx)
 Check status of read data function. More...
 
float hallcurrent_read_current (hallcurrent_t *ctx)
 Read electric current function. More...
 

Detailed Description

Function Documentation

◆ hallcurrent_cfg_setup()

void hallcurrent_cfg_setup ( hallcurrent_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.

◆ hallcurrent_chack_status()

uint8_t hallcurrent_chack_status ( hallcurrent_t ctx)

Check status of read data function.

Returns
status
  • 0 : OK, Sensor Value Message.
  • 1 : ERROR, Sensor Status Message.

Function read the 16-bit data from the target register address and return 0 if data is valid or 1 of data not valid.

◆ hallcurrent_generic_transfer()

void hallcurrent_generic_transfer ( hallcurrent_t ctx,
spi_master_transfer_data_t *  block 
)

Generic transfer function.

Parameters
ctxClick object.
blockTransfer block structure.

Generic SPI transfer, for sending and receiving packages

◆ hallcurrent_init()

HALLCURRENT_RETVAL hallcurrent_init ( hallcurrent_t ctx,
hallcurrent_cfg_t cfg 
)

Initialization function.

Parameters
hallcurrentClick object.
cfgClick configuration structure.

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

◆ hallcurrent_read_current()

float hallcurrent_read_current ( hallcurrent_t ctx)

Read electric current function.

Returns
result float electric current data

Generic SPI transfer, for sending and receiving packages

◆ hallcurrent_read_data()

uint16_t hallcurrent_read_data ( hallcurrent_t ctx)

Generic read 16-bit data function.

Returns
result 16-bit read data

Function read the 16-bit data from the target register address of TLI4970-D050T4 miniature magnetic digital current sensor