efuse4 2.1.0.0
eFuse 4 Click Driver

API for configuring and manipulating eFuse 4 Click driver. More...

Topics

 eFuse 4 Commands List
 List of registers of eFuse 4 Click driver.
 
 eFuse 4 Registers Settings
 Settings for registers of eFuse 4 Click driver.
 
 eFuse 4 MikroBUS Map
 MikroBUS pin mapping of eFuse 4 Click driver.
 

Functions

void efuse4_cfg_setup (efuse4_cfg_t *cfg)
 eFuse 4 configuration object setup function.
 
err_t efuse4_init (efuse4_t *ctx, efuse4_cfg_t *cfg)
 eFuse 4 initialization function.
 
err_t efuse4_default_cfg (efuse4_t *ctx)
 eFuse 4 default configuration function.
 
err_t efuse4_generic_write (efuse4_t *ctx, uint8_t cmd, uint16_t data_in)
 eFuse 4 I2C writing function.
 
err_t efuse4_generic_read (efuse4_t *ctx, uint8_t cmd, uint16_t data_in, uint16_t *data_out)
 eFuse 4 I2C reading function.
 
void efuse4_set_enable (efuse4_t *ctx)
 eFuse 4 enable function.
 
void efuse4_set_disable (efuse4_t *ctx)
 eFuse 4 disable function.
 
void efuse4_set_low_power_mode (efuse4_t *ctx)
 eFuse 4 set low power mode function.
 
void efuse4_set_normal_mode (efuse4_t *ctx)
 eFuse 4 set normal mode function.
 
err_t efuse4_sw_reset (efuse4_t *ctx)
 eFuse 4 software reset function.
 
err_t efuse4_enable_write (efuse4_t *ctx)
 eFuse 4 enable write function.
 
err_t efuse4_write_rdac (efuse4_t *ctx, uint16_t data_in)
 eFuse 4 write RDAC function.
 
err_t efuse4_read_rdac (efuse4_t *ctx, uint16_t *data_out)
 eFuse 4 read RDAC function.
 
err_t efuse4_digi_pot_op_mode (efuse4_t *ctx, uint8_t mode)
 eFuse 4 set digital potentiometer operation mode function.
 
err_t efuse4_store_wiper_pos (efuse4_t *ctx)
 eFuse 4 store wiper function.
 
err_t efuse4_next_frame_read (efuse4_t *ctx, uint8_t wiper_location, uint16_t *data_out)
 eFuse 4 next frame read function.
 
err_t efuse4_read_memory (efuse4_t *ctx, uint16_t *data_out)
 eFuse 4 read memory function.
 
err_t efuse4_set_digi_pot (efuse4_t *ctx, uint16_t wiper_pos)
 eFuse 4 set digital potentiometer function.
 
err_t efuse4_set_resistance (efuse4_t *ctx, uint32_t res_ohm)
 eFuse 4 set resistance function.
 
err_t efuse4_set_current_limit (efuse4_t *ctx, efuse4_current_limit_t current_limit)
 eFuse 4 set current limit function.
 
uint8_t efuse4_fault_state (efuse4_t *ctx)
 eFuse 4 get fault state function.
 
uint8_t efuse4_pwr_good_state (efuse4_t *ctx)
 eFuse 4 get power good state function.
 

Detailed Description

API for configuring and manipulating eFuse 4 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

◆ efuse4_cfg_setup()

void efuse4_cfg_setup ( efuse4_cfg_t * cfg)

eFuse 4 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ efuse4_default_cfg()

err_t efuse4_default_cfg ( efuse4_t * ctx)

eFuse 4 default configuration function.

This function executes a default configuration: enables a programmable under-voltage lockout threshold, set normal mode, performs the software reset, sets normal operation mode of the digital potentiometer, performs command to enable the write and set the current limit to 750 mA of eFuse 4 Click board™.

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

◆ efuse4_digi_pot_op_mode()

err_t efuse4_digi_pot_op_mode ( efuse4_t * ctx,
uint8_t mode )

eFuse 4 set digital potentiometer operation mode function.

This function sets the digital potentiometer operation mode of the AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the eFuse 4 Click board™.

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

◆ efuse4_enable_write()

err_t efuse4_enable_write ( efuse4_t * ctx)

eFuse 4 enable write function.

This function performs command to enable the write of the AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the eFuse 4 Click board™.

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

◆ efuse4_fault_state()

uint8_t efuse4_fault_state ( efuse4_t * ctx)

eFuse 4 get fault state function.

This function get fault event indicator state of the TPS25940x 2.7 – 18V eFuse with True Reverse Blocking and DevSleep Support for SSDs on the eFuse 4 Click board™.

Parameters
[in]ctx: Click context object. See efuse4_t object definition for detailed explanation.
Returns
  • 0 - Fault condition due to Undervoltage, Overvoltage, Reverse voltage and Thermal shutdown event,
  • 1 - Normal condition.
Note
None.

◆ efuse4_generic_read()

err_t efuse4_generic_read ( efuse4_t * ctx,
uint8_t cmd,
uint16_t data_in,
uint16_t * data_out )

eFuse 4 I2C reading function.

This function reads a 10-bit data value for the desired command operation by using I2C serial interface.

Parameters
[in]ctx: Click context object. See efuse4_t object definition for detailed explanation.
[in]cmd: Command.
[in]data_in: Data to be written.
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ efuse4_generic_write()

err_t efuse4_generic_write ( efuse4_t * ctx,
uint8_t cmd,
uint16_t data_in )

eFuse 4 I2C writing function.

This function writes a 10-bit data value for the desired command operation by using I2C serial interface.

Parameters
[in]ctx: Click context object. See efuse4_t object definition for detailed explanation.
[in]cmd: Command.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ efuse4_init()

err_t efuse4_init ( efuse4_t * ctx,
efuse4_cfg_t * cfg )

eFuse 4 initialization function.

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

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

◆ efuse4_next_frame_read()

err_t efuse4_next_frame_read ( efuse4_t * ctx,
uint8_t wiper_location,
uint16_t * data_out )

eFuse 4 next frame read function.

This function read contents of 50-TP output in the next frame of the AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the eFuse 4 Click board™.

Parameters
[in]ctx: Click context object.
[in]wiper_location: Wiper location (from 0x00 to the 0x38).
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ efuse4_pwr_good_state()

uint8_t efuse4_pwr_good_state ( efuse4_t * ctx)

eFuse 4 get power good state function.

This function get power good state of the TPS25940x 2.7 – 18V eFuse with True Reverse Blocking and DevSleep Support for SSDs on the eFuse 4 Click board™.

Parameters
[in]ctx: Click context object. See efuse4_t object definition for detailed explanation.
Returns
  • 0 - Normal condition,
  • 1 - Positive input of power good comparator has crossed the threshold value.
Note
None.

◆ efuse4_read_memory()

err_t efuse4_read_memory ( efuse4_t * ctx,
uint16_t * data_out )

eFuse 4 read memory function.

This function read address of the last 50-TP programmed memory location of the AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the eFuse 4 Click board™.

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

◆ efuse4_read_rdac()

err_t efuse4_read_rdac ( efuse4_t * ctx,
uint16_t * data_out )

eFuse 4 read RDAC function.

This function reads 10-bit RDAC values of the AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the eFuse 4 Click board™.

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

◆ efuse4_set_current_limit()

err_t efuse4_set_current_limit ( efuse4_t * ctx,
efuse4_current_limit_t current_limit )

eFuse 4 set current limit function.

This function set current limit of the AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the eFuse 4 Click board™.

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

◆ efuse4_set_digi_pot()

err_t efuse4_set_digi_pot ( efuse4_t * ctx,
uint16_t wiper_pos )

eFuse 4 set digital potentiometer function.

This function set the digital potentiometer wiper position of the AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the eFuse 4 Click board™.

Parameters
[in]ctx: Click context object.
[in]wiper_pos: Wiper position (from 0 to 1023).
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ efuse4_set_disable()

void efuse4_set_disable ( efuse4_t * ctx)

eFuse 4 disable function.

This function disables a programmable under-voltage lockout threshold of the TPS25940x 2.7 – 18V eFuse with True Reverse Blocking and DevSleep Support for SSDs on the eFuse 4 Click board™.

Parameters
[in]ctx: Click context object. See efuse4_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ efuse4_set_enable()

void efuse4_set_enable ( efuse4_t * ctx)

eFuse 4 enable function.

This function enables a programmable under-voltage lockout threshold of the TPS25940x 2.7 – 18V eFuse with True Reverse Blocking and DevSleep Support for SSDs on the eFuse 4 Click board™.

Parameters
[in]ctx: Click context object. See efuse4_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ efuse4_set_low_power_mode()

void efuse4_set_low_power_mode ( efuse4_t * ctx)

eFuse 4 set low power mode function.

This function activates the DevSleep mode (Low Power Mode) of the TPS25940x 2.7 – 18V eFuse with True Reverse Blocking and DevSleep Support for SSDs on the eFuse 4 Click board™.

Parameters
[in]ctx: Click context object. See efuse4_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ efuse4_set_normal_mode()

void efuse4_set_normal_mode ( efuse4_t * ctx)

eFuse 4 set normal mode function.

This function deactivates the DevSleep mode (Normal Power Mode) of the TPS25940x 2.7 – 18V eFuse with True Reverse Blocking and DevSleep Support for SSDs on the eFuse 4 Click board™.

Parameters
[in]ctx: Click context object. See efuse4_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ efuse4_set_resistance()

err_t efuse4_set_resistance ( efuse4_t * ctx,
uint32_t res_ohm )

eFuse 4 set resistance function.

This function set the resistance of the digital potentiometer wiper position of the AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the eFuse 4 Click board™.

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

◆ efuse4_store_wiper_pos()

err_t efuse4_store_wiper_pos ( efuse4_t * ctx)

eFuse 4 store wiper function.

This function store wiper setting, store RDAC setting of the AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the eFuse 4 Click board™.

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

◆ efuse4_sw_reset()

err_t efuse4_sw_reset ( efuse4_t * ctx)

eFuse 4 software reset function.

This function performs the software reset of the AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the eFuse 4 Click board™.

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

◆ efuse4_write_rdac()

err_t efuse4_write_rdac ( efuse4_t * ctx,
uint16_t data_in )

eFuse 4 write RDAC function.

This function writes 10-bit RDAC values of the AD5272, 1024-Position, 1% Resistor Tolerance Error, I2C Interface and 50-TP Memory Digital Rheostat on the eFuse 4 Click board™.

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