amrcurent 2.0.0.0

Functions

void amrcurent_cfg_setup (amrcurent_cfg_t *cfg)
 Config Object Initialization function.
 
AMRCURENT_RETVAL amrcurent_init (amrcurent_t *ctx, amrcurent_cfg_t *cfg)
 Initialization function.
 
void amrcurent_default_cfg (amrcurent_t *ctx)
 Click Default Configuration function.
 
void amrcurent_generic_write (amrcurent_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void amrcurent_generic_read (amrcurent_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint16_t amrcurrent_read_value (amrcurent_t *ctx)
 Reads ADC current data.
 
uint8_t amrcurrent_get_int_pin_state (amrcurent_t *ctx)
 Gets state of the FLTB pin on int.
 
void amrcurrent_set_rst_pin_state (amrcurent_t *ctx, uint8_t pin_state)
 Sets state of the reset pin.
 
void amrcurrent_hw_reset (amrcurent_t *ctx)
 Hardware reset device.
 
float amrcurrent_get_current (amrcurent_t *ctx)
 Reads current data in mA.
 

Detailed Description

Function Documentation

◆ amrcurent_cfg_setup()

void amrcurent_cfg_setup ( amrcurent_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ amrcurent_default_cfg()

void amrcurent_default_cfg ( amrcurent_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for AMRCurent click.

◆ amrcurent_generic_read()

void amrcurent_generic_read ( amrcurent_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ amrcurent_generic_write()

void amrcurent_generic_write ( amrcurent_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ amrcurent_init()

AMRCURENT_RETVAL amrcurent_init ( amrcurent_t * ctx,
amrcurent_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ amrcurrent_get_current()

float amrcurrent_get_current ( amrcurent_t * ctx)

Reads current data in mA.

Parameters
ctxClick object.

@description This function gets current.

◆ amrcurrent_get_int_pin_state()

uint8_t amrcurrent_get_int_pin_state ( amrcurent_t * ctx)

Gets state of the FLTB pin on int.

Parameters
ctxClick object.

@description This function state of the pin.

◆ amrcurrent_hw_reset()

void amrcurrent_hw_reset ( amrcurent_t * ctx)

Hardware reset device.

Parameters
ctxClick object.

@description This function reset hardware device.

◆ amrcurrent_read_value()

uint16_t amrcurrent_read_value ( amrcurent_t * ctx)

Reads ADC current data.

Parameters
ctxClick object.

@description This function read value.

◆ amrcurrent_set_rst_pin_state()

void amrcurrent_set_rst_pin_state ( amrcurent_t * ctx,
uint8_t pin_state )

Sets state of the reset pin.

Parameters
ctxClick object.
pin_statevalue of pin to be set.

@description This function sets rst pin state.