14#ifndef __PAN_EFUSE_H__
15#define __PAN_EFUSE_H__
31#define EFUSE_CMD_READ (0X0)
32#define EFUSE_CMD_PROGRAM (0X1)
33#define EFUSE_CMD_INACTIVE (0X2)
39#define EFUSE_STATUS_OK (0x0)
40#define EFUSE_STATUS_FAIL (0x1)
53 efuse->EF_CTL = EFUSE_CTL_EFUSE_EN_Msk |
54 EFUSE_CTL_EFUSECTL_BANK1_Msk |
55 EFUSE_CTL_EFUSECTL_BANK2_Msk |
56 EFUSE_CTL_EFUSECTL_BANK3_Msk |
57 EFUSE_CTL_EFUSECTL_BANK4_Msk;
82 return efuse->EF_OP_ERROR;
94 efuse->EF_OP_ERROR = 1u;
132extern bool EFUSE_Read(EFUSE_T* efuse, uint32_t addr, uint8_t* data, uint16_t len);
146extern bool EFUSE_Write(EFUSE_T* efuse, uint32_t addr, uint8_t* data, uint16_t len);
160extern bool EFUSE_UserRead(EFUSE_T* efuse, uint32_t addr, uint8_t* data, uint16_t len);
174extern bool EFUSE_UserWrite(EFUSE_T* efuse, uint32_t addr, uint8_t* data, uint16_t len);
bool EFUSE_UserRead(EFUSE_T *efuse, uint32_t addr, uint8_t *data, uint16_t len)
Read multiple data from User Area of eFuse (Address 0xE9 ~ 0xFF).
__STATIC_INLINE uint32_t EFUSE_GetErrorStatus(EFUSE_T *efuse)
Get eFuse error status flag.
Definition: pan_efuse.h:80
bool EFUSE_UserWrite(EFUSE_T *efuse, uint32_t addr, uint8_t *data, uint16_t len)
Write multiple data to User Area of eFuse (Address 0xE9 ~ 0xFF).
__STATIC_INLINE void EFUSE_ClrErrorStatus(EFUSE_T *efuse)
Clear eFuse error status flag.
Definition: pan_efuse.h:91
__STATIC_INLINE void EFUSE_Init(EFUSE_T *efuse)
Init eFuse module.
Definition: pan_efuse.h:51
__STATIC_INLINE void EFUSE_UnInit(EFUSE_T *efuse)
Un-Init eFuse module.
Definition: pan_efuse.h:68
void EFUSE_WriteByte(EFUSE_T *efuse, uint32_t addr, uint8_t data)
Write one byte data to specified eFuse address.
uint8_t EFUSE_ReadByte(EFUSE_T *efuse, uint32_t addr)
Read specified one byte from eFuse.
bool EFUSE_Write(EFUSE_T *efuse, uint32_t addr, uint8_t *data, uint16_t len)
Write multiple data to eFuse.
bool EFUSE_Read(EFUSE_T *efuse, uint32_t addr, uint8_t *data, uint16_t len)
Read multiple data from eFuse.