efuse2 2.0.0.0
efuse2.h File Reference

This file contains API for eFuse 2 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  efuse2_t
 eFuse 2 Click context object. More...
 
struct  efuse2_cfg_t
 eFuse 2 Click configuration object. More...
 
struct  ad5241_instru_t
 eFuse 2 Click instruction object. More...
 

Macros

#define EFUSE2_AD5175_SHUTDOWN_BIT_MASK   0x01
 eFuse 2 description setting.
 
#define EFUSE2_AD5175_NORMAL_MODE   0x00
 
#define EFUSE2_AD5175_SHUTDOWN_MODE   0x01
 
#define EFUSE2_AD5175_CTRL_REG_BIT_MASK   0x0B
 eFuse 2 ADD5175 Bit masks.
 
#define EFUSE2_AD5175_FUSE_PROGRAM_SUCCESSFUL   0x00
 
#define EFUSE2_AD5175_FUSE_PROGRAM_UNSUCCESSFUL   0x08
 
#define EFUSE2_AD5175_WIPER_POS_FROZEN   0x00
 
#define EFUSE2_AD5175_UPDATE_WIPER_POS   0x02
 
#define EFUSE2_AD5175_50T_PROGRAM_DISABLED   0x00
 
#define EFUSE2_AD5175_50T_PROGRAM_ENABLE   0x01
 
#define EFUSE2_AD5175_COMMAND_NOP   0x00
 eFuse 2 ADD5175 commands.
 
#define EFUSE2_AD5175_COMMAND_WRITE_RDAC   0x04
 
#define EFUSE2_AD5175_COMMAND_READ_RDAC   0x08
 
#define EFUSE2_AD5175_COMMAND_STORE_WIPER   0x0C
 
#define EFUSE2_AD5175_COMMAND_SW_RESET   0x10
 
#define EFUSE2_AD5175_COMMAND_READ_50TP   0x14
 
#define EFUSE2_AD5175_COMMAND_READ_MEMORY   0x18
 
#define EFUSE2_AD5175_COMMAND_WRITE_MEMORY   0x1C
 
#define EFUSE2_AD5175_COMMAND_READ_CONTROL   0x20
 
#define EFUSE2_AD5175_COMMAND_SW_SHUTDOWN   0x24
 
#define EFUSE2_AD5241_RDAC0   0x00
 
#define EFUSE2_AD5241_RDAC1   0x80
 
#define EFUSE2_AD5241_NO_RESET   0x00
 
#define EFUSE2_AD5241_RESET   0x40
 
#define EFUSE2_AD5241_NO_SHUTDOWN   0x00
 
#define EFUSE2_AD5241_SHUTDOWN   0x20
 
#define EFUSE2_AD5241_O1_LOW   0x00
 
#define EFUSE2_AD5241_O1_HIGH   0x10
 
#define EFUSE2_AD5241_O2_LOW   0x00
 
#define EFUSE2_AD5241_O2_HIGH   0x08
 
#define EFUSE2_I2C_SLAVE_ADDRESS_AD5241_0   0x2C
 eFuse 2 device address setting.
 
#define EFUSE2_I2C_SLAVE_ADDRESS_AD5241_1   0x2D
 
#define EFUSE2_I2C_SLAVE_ADDRESS_AD5241_2   0x2E
 
#define EFUSE2_I2C_SLAVE_ADDRESS_AD5241_3   0x2F
 
#define EFUSE2_I2C_SLAVE_ADDRESS_AD5175_GND   0x2F
 
#define EFUSE2_I2C_SLAVE_ADDRESS_AD5175_VCC   0x2C
 
#define EFUSE2_I2C_SLAVE_ADDRESS_AD5175_NC   0x2E
 
#define EFUSE2_FAULT   0x00
 eFuse 2 fault setting.
 
#define EFUSE2_NO_FAULT   0x01
 
#define EFUSE2_10_BIT   0x03FF
 eFuse 2 data setting.
 
#define EFUSE2_DUMMY   0x0000
 
#define EFUSE2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  efuse2_return_value_t { EFUSE2_OK = 0 , EFUSE2_ERROR = -1 }
 eFuse 2 Click return value data. More...
 

Functions

void efuse2_cfg_setup (efuse2_cfg_t *cfg)
 eFuse 2 configuration object setup function.
 
err_t efuse2_init (efuse2_t *ctx, efuse2_cfg_t *cfg)
 eFuse 2 initialization function.
 
err_t efuse2_default_cfg (efuse2_t *ctx)
 eFuse 2 default configuration function.
 
err_t efuse2_write_ad5241 (efuse2_t *ctx, ad5241_instru_t cmd, uint8_t data_byte)
 Generic write data to the AD5241 function.
 
uint8_t efuse2_read_ad5241 (efuse2_t *ctx)
 Generic read data from the AD5241 function.
 
void efuse2_hw_reset (efuse2_t *ctx)
 Hardware reset function.
 
err_t efuse2_set_operating_voltage (efuse2_t *ctx, float voltage, float *min_voltage, float *max_voltage)
 Set operating voltage function.
 
err_t efuse2_write_ad5175 (efuse2_t *ctx, uint8_t cmd, uint16_t data_byte)
 Generic write data to the AD5175 function.
 
uint16_t efuse2_read_ad5175 (efuse2_t *ctx, uint8_t cmd, uint8_t wiper_location)
 Generic read data from the AD5175 function.
 
uint16_t efuse2_read_rdac (efuse2_t *ctx)
 Read RDAC function.
 
err_t efuse2_enable_write (efuse2_t *ctx)
 Enable write function.
 
err_t efuse2_write_rdac (efuse2_t *ctx, uint16_t data_byte)
 Write RDAC function.
 
err_t efuse2_set_current_limit (efuse2_t *ctx, float current)
 Set operating current function.
 
err_t efuse2_sw_reset (efuse2_t *ctx)
 Software reset function.
 
err_t efuse2_store_wiper (efuse2_t *ctx)
 Store wiper setting function.
 
err_t efuse2_operating_mode (efuse2_t *ctx, uint8_t mode)
 Set operating mode function.
 
uint16_t efuse2_next_frame_read (efuse2_t *ctx, uint8_t wiper_location)
 Next frame read function.
 
uint16_t efuse2_read_memory (efuse2_t *ctx)
 Read memory function.
 
uint8_t efuse2_read_control (efuse2_t *ctx)
 Read control register function.
 
uint8_t efuse2_get_fault (efuse2_t *ctx)
 Get fault function.
 

Detailed Description

This file contains API for eFuse 2 Click Driver.

Enumeration Type Documentation

◆ efuse2_return_value_t

eFuse 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
EFUSE2_OK 
EFUSE2_ERROR