efuse5 2.1.0.0
efuse5.h File Reference

This file contains API for eFuse 5 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  efuse5_t
 eFuse 5 Click context object. More...
 
struct  efuse5_cfg_t
 eFuse 5 Click configuration object. More...
 

Macros

#define EFUSE5_WRITE_TO_RDAC   0x00
 eFuse 5 description Instruction Byte.
 
#define EFUSE5_ONE_TIME_PROG   0x80
 
#define EFUSE5_OTP_V_READY   0x00
 eFuse 5 description OTP Validation Bits.
 
#define EFUSE5_OTP_V_TEST_FUSE_OK   0x40
 
#define EFUSE5_OTP_V_ERROR   0x80
 
#define EFUSE5_OTP_V_PROG_SUCCESS   0xC0
 
#define EFUSE5_DEVICE_ADDRESS   0x2C
 eFuse 5 device address setting.
 
#define EFUSE5_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  efuse5_current_limit_t {
  EFUSE5_CURRENT_LIMIT_600_mA = 600 , EFUSE5_CURRENT_LIMIT_720_mA = 720 , EFUSE5_CURRENT_LIMIT_865_mA = 865 , EFUSE5_CURRENT_LIMIT_900_mA = 900 ,
  EFUSE5_CURRENT_LIMIT_1030_mA = 1030 , EFUSE5_CURRENT_LIMIT_1200_mA = 1200 , EFUSE5_CURRENT_LIMIT_1445_mA = 1445 , EFUSE5_CURRENT_LIMIT_1550_mA = 1550 ,
  EFUSE5_CURRENT_LIMIT_2000_mA = 2000 , EFUSE5_CURRENT_LIMIT_4500_mA = 4500
}
 eFuse 5 Click current limit value data. More...
 
enum  efuse5_return_value_t { EFUSE5_OK = 0 , EFUSE5_ERROR = -1 }
 eFuse 5 Click return value data. More...
 

Functions

void efuse5_cfg_setup (efuse5_cfg_t *cfg)
 eFuse 5 configuration object setup function.
 
err_t efuse5_init (efuse5_t *ctx, efuse5_cfg_t *cfg)
 eFuse 5 initialization function.
 
err_t efuse5_default_cfg (efuse5_t *ctx)
 eFuse 5 default configuration function.
 
err_t efuse5_write_byte (efuse5_t *ctx, uint8_t inst, uint8_t data_in)
 eFuse 5 I2C writing function.
 
err_t efuse5_generic_read (efuse5_t *ctx, uint8_t *data_out)
 eFuse 5 I2C reading function.
 
err_t efuse5_write_rdac (efuse5_t *ctx, uint8_t rdac_data)
 eFuse 5 write RDAC function.
 
err_t efuse5_read_rdac (efuse5_t *ctx, uint8_t *rdac_data)
 eFuse 5 read RDAC function.
 
err_t efuse5_set_digi_pot (efuse5_t *ctx, uint8_t wiper_pos)
 eFuse 5 set the digital potentiometer function.
 
err_t efuse5_set_resistance (efuse5_t *ctx, uint16_t res_ohm)
 eFuse 5 set the resistance function.
 
err_t efuse5_set_current_limit (efuse5_t *ctx, efuse5_current_limit_t current_limit)
 eFuse 5 set the current limit function.
 
void efuse5_enable_device (efuse5_t *ctx)
 eFuse 5 enable the device function.
 
void efuse5_shutdown (efuse5_t *ctx)
 eFuse 5 disable the device function.
 
uint8_t efuse5_get_imon (efuse5_t *ctx)
 eFuse 5 get imon function.
 
uint8_t efuse5_get_pgood (efuse5_t *ctx)
 eFuse 5 gets power good state function.
 
uint8_t efuse5_get_fault (efuse5_t *ctx)
 eFuse 5 gets fault condition state function.
 

Detailed Description

This file contains API for eFuse 5 Click Driver.

Enumeration Type Documentation

◆ efuse5_current_limit_t

eFuse 5 Click current limit value data.

Predefined enum values for driver current limit values.

Enumerator
EFUSE5_CURRENT_LIMIT_600_mA 
EFUSE5_CURRENT_LIMIT_720_mA 
EFUSE5_CURRENT_LIMIT_865_mA 
EFUSE5_CURRENT_LIMIT_900_mA 
EFUSE5_CURRENT_LIMIT_1030_mA 
EFUSE5_CURRENT_LIMIT_1200_mA 
EFUSE5_CURRENT_LIMIT_1445_mA 
EFUSE5_CURRENT_LIMIT_1550_mA 
EFUSE5_CURRENT_LIMIT_2000_mA 
EFUSE5_CURRENT_LIMIT_4500_mA 

◆ efuse5_return_value_t

eFuse 5 Click return value data.

Predefined enum values for driver return values.

Enumerator
EFUSE5_OK 
EFUSE5_ERROR