FreeRTOS: Common I/O
AWS IoT Common I/O library
Return to main page ↑
EFUSE Abstraction APIs.

Macros

#define IOT_EFUSE_SUCCESS   ( 0 )
 
#define IOT_EFUSE_INVALID_VALUE   ( 1 )
 
#define IOT_EFUSE_READ_FAIL   ( 2 )
 
#define IOT_EFUSE_WRITE_FAIL   ( 3 )
 
#define IOT_EFUSE_CLOSE_FAIL   ( 4 )
 
#define IOT_EFUSE_FUNCTION_NOT_SUPPORTED   ( 5 )
 
#define IOT_EFUSE_ERROR   ( 6 )
 

Typedefs

typedef struct IotEfuseDescriptor * IotEfuseHandle_t
 IotEfuseHandle_t is the handle type returned by calling iot_efuse_open(). This is initialized in open and returned to caller. The caller must pass this pointer to the rest of APIs.
 

Functions

IotEfuseHandle_t iot_efuse_open (void)
 iot_efuse_open is used to Initialize things needed to access efuse. More...
 
int32_t iot_efuse_close (IotEfuseHandle_t const pxEfuseHandle)
 iot_efuse_close is used to de Initialize things needed to disable efuse access. More...
 
int32_t iot_efuse_read_32bit_word (IotEfuseHandle_t const pxEfuseHandle, uint32_t ulIndex, uint32_t *ulValue)
 Read 32-bit efuse word from specified index. More...
 
int32_t iot_efuse_write_32bit_word (IotEfuseHandle_t const pxEfuseHandle, uint32_t ulIndex, uint32_t ulValue)
 Write 32-bit value to the 32-bit efuse word at specified index. More...
 
int32_t iot_efuse_read_16bit_word (IotEfuseHandle_t const pxEfuseHandle, uint32_t ulIndex, uint16_t *ulValue)
 Read 16-bit efuse word from specified index. More...
 
int32_t iot_efuse_write_16bit_word (IotEfuseHandle_t const pxEfuseHandle, uint32_t ulIndex, uint16_t value)
 Write 16-bit value to the 16-bit efuse word at specified index. More...
 

Detailed Description

Macro Definition Documentation

◆ IOT_EFUSE_SUCCESS

#define IOT_EFUSE_SUCCESS   ( 0 )

The return codes for the functions in EFUSE.Efuse operation completed successfully.

◆ IOT_EFUSE_INVALID_VALUE

#define IOT_EFUSE_INVALID_VALUE   ( 1 )

At least one parameter is invalid.

◆ IOT_EFUSE_READ_FAIL

#define IOT_EFUSE_READ_FAIL   ( 2 )

Error reading Efuse value.

◆ IOT_EFUSE_WRITE_FAIL

#define IOT_EFUSE_WRITE_FAIL   ( 3 )

Error writing Efuse value.

◆ IOT_EFUSE_CLOSE_FAIL

#define IOT_EFUSE_CLOSE_FAIL   ( 4 )

Error closing Efuse instance.

◆ IOT_EFUSE_FUNCTION_NOT_SUPPORTED

#define IOT_EFUSE_FUNCTION_NOT_SUPPORTED   ( 5 )

Efuse operation not supported.

◆ IOT_EFUSE_ERROR

#define IOT_EFUSE_ERROR   ( 6 )

Error performing Efuse operation.

Function Documentation

◆ iot_efuse_open()

IotEfuseHandle_t iot_efuse_open ( void  )

iot_efuse_open is used to Initialize things needed to access efuse.

Returns
  • Handle to IotEfuseHandle_t on success
  • NULL if the handle is already opened. handle must be closed before calling open again

◆ iot_efuse_close()

int32_t iot_efuse_close ( IotEfuseHandle_t const  pxEfuseHandle)

iot_efuse_close is used to de Initialize things needed to disable efuse access.

Parameters
[in]pxEfuseHandlehandle to efuse interface returned in iot_efuse_open()
Returns
  • IOT_EFUSE_SUCCESS if succeeded,
  • IOT_EFUSE_INVALID_VALUE on NULL pxEfuseHandle
  • IOT_EFUSE_INVALID_VALUE if instance not previously opened.
  • IOT_EFUSE_CLOSE_FAIL if the underneath HW deinit api returns fail.

◆ iot_efuse_read_32bit_word()

int32_t iot_efuse_read_32bit_word ( IotEfuseHandle_t const  pxEfuseHandle,
uint32_t  ulIndex,
uint32_t *  ulValue 
)

Read 32-bit efuse word from specified index.

Parameters
[in]pxEfuseHandlehandle to efuse interface returned in iot_efuse_open()
[in]ulIndexindex of efuse word to read. Caller must know the underlying efuse mechanism and make sure index is a valid one.
[out]ulValueThe receive buffer to read the data into
Returns
  • IOT_EFUSE_SUCCESS if read succeeded,
  • IOT_EFUSE_READ_FAIL if read failed,
  • IOT_EFUSE_INVALID_VALUE if pxEfuseHandle is NULL, index is invalid, or ulValue is NULL.
  • IOT_EFUSE_FUNCTION_NOT_SUPPORTED if 32-bit efuse word is not supported

◆ iot_efuse_write_32bit_word()

int32_t iot_efuse_write_32bit_word ( IotEfuseHandle_t const  pxEfuseHandle,
uint32_t  ulIndex,
uint32_t  ulValue 
)

Write 32-bit value to the 32-bit efuse word at specified index.

Parameters
[in]pxEfuseHandlehandle to efuse interface returned in iot_efuse_open()
[in]ulIndexindex of efuse word to write to. Caller must know the underlying efuse mechanism and make sure index is a valid one.
[in]ulValueThe 32-bit value to write.
Returns
  • IOT_EFUSE_SUCCESS if write succeeded,
  • IOT_EFUSE_WRITE_FAIL if write failed
  • IOT_EFUSE_INVALID_VALUE if pxEfuseHandle is NULL, or index is invalid.
  • IOT_EFUSE_FUNCTION_NOT_SUPPORTED if 32-bit efuse word is not supported

◆ iot_efuse_read_16bit_word()

int32_t iot_efuse_read_16bit_word ( IotEfuseHandle_t const  pxEfuseHandle,
uint32_t  ulIndex,
uint16_t *  ulValue 
)

Read 16-bit efuse word from specified index.

Parameters
[in]pxEfuseHandlehandle to efuse interface returned in iot_efuse_open()
[in]ulIndexindex of efuse word to read. Caller must know the underlying efuse mechanism and make sure index is a valid one.
[out]ulValueThe receive buffer to read the data into
Returns
  • IOT_EFUSE_SUCCESS if read succeeded,
  • IOT_EFUSE_READ_FAIL if read failed
  • IOT_EFUSE_INVALID_VALUE if pxEfuseHandle or ulValue is NULL, or index is invalid
  • IOT_EFUSE_FUNCTION_NOT_SUPPORTED if 16-bit efuse word is not supported

◆ iot_efuse_write_16bit_word()

int32_t iot_efuse_write_16bit_word ( IotEfuseHandle_t const  pxEfuseHandle,
uint32_t  ulIndex,
uint16_t  value 
)

Write 16-bit value to the 16-bit efuse word at specified index.

Parameters
[in]pxEfuseHandlehandle to efuse interface returned in iot_efuse_open()
[in]ulIndexindex of efuse word to write to. Caller must know the underlying efuse mechanism and make sure index is a valid one.
[in]ulValueThe 16-bit value to write.
Returns
  • IOT_EFUSE_SUCCESS if write succeeded,
  • IOT_EFUSE_WRITE_FAIL if write failed
  • IOT_EFUSE_INVALID_VALUE if index is invalid, or pxEfuseHandle is NULL.
  • IOT_EFUSE_FUNCTION_NOT_SUPPORTED if 16-bit efuse word is not supported