efuse4 2.1.0.0
efuse4.h File Reference

This file contains API for eFuse 4 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  efuse4_t
 eFuse 4 Click context object. More...
 
struct  efuse4_cfg_t
 eFuse 4 Click configuration object. More...
 

Macros

#define EFUSE4_CMD_NOP   0x00
 eFuse 4 description command.
 
#define EFUSE4_CMD_WRITE_RDAC   0x04
 
#define EFUSE4_CMD_READ_RDAC   0x08
 
#define EFUSE4_CMD_STORE_WIPER   0x0C
 
#define EFUSE4_CMD_SW_RESET   0x10
 
#define EFUSE4_CMD_READ_CONTENTS   0x14
 
#define EFUSE4_CMD_READ_MEMORY   0x18
 
#define EFUSE4_CMD_WRITE_MEMORY   0x1C
 
#define EFUSE4_CMD_READ_CTRL   0x20
 
#define EFUSE4_CMD_SW_SHUTDOWN   0x24
 
#define EFUSE4_SET_SHUTDOWN_BIT_MASK   0x01
 eFuse 4 description setting.
 
#define EFUSE4_SET_NORMAL_MODE   0x00
 
#define EFUSE4_SET_SHUTDOWN_MODE   0x01
 
#define EFUSE4_SET_ENABLE_WRITE_MEMORY   0x0002
 
#define EFUSE4_DEVICE_ADDRESS   0x2F
 eFuse 4 device address setting.
 
#define EFUSE4_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  efuse4_return_value_t { EFUSE4_OK = 0 , EFUSE4_ERROR = -1 }
 eFuse 4 Click return value data. More...
 
enum  efuse4_current_limit_t {
  EFUSE4_CURRENT_LIMIT_670_mA = 670 , EFUSE4_CURRENT_LIMIT_750_mA = 750 , EFUSE4_CURRENT_LIMIT_990_mA = 990 , EFUSE4_CURRENT_LIMIT_2080_mA = 2080 ,
  EFUSE4_CURRENT_LIMIT_3530_mA = 3530 , EFUSE4_CURRENT_LIMIT_4450_mA = 4450 , EFUSE4_CURRENT_LIMIT_5200_mA = 5200
}
 eFuse 4 Click current limit value data. More...
 

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

This file contains API for eFuse 4 Click Driver.

Enumeration Type Documentation

◆ efuse4_current_limit_t

eFuse 4 Click current limit value data.

Predefined enum values for driver current limit values.

Enumerator
EFUSE4_CURRENT_LIMIT_670_mA 
EFUSE4_CURRENT_LIMIT_750_mA 
EFUSE4_CURRENT_LIMIT_990_mA 
EFUSE4_CURRENT_LIMIT_2080_mA 
EFUSE4_CURRENT_LIMIT_3530_mA 
EFUSE4_CURRENT_LIMIT_4450_mA 
EFUSE4_CURRENT_LIMIT_5200_mA 

◆ efuse4_return_value_t

eFuse 4 Click return value data.

Predefined enum values for driver return values.

Enumerator
EFUSE4_OK 
EFUSE4_ERROR