Board Support  Version 1.0
Functions available when using the Board Software Components

EEPROM Interface. More...

Functions

int32_t EEPROM_Initialize (void)
 Initialize EEPROM. More...
 
int32_t EEPROM_Uninitialize (void)
 De-initialize EEPROM. More...
 
uint32_t EEPROM_GetSize (void)
 Get EEPROM memory size in bytes. More...
 
int32_t EEPROM_ReadData (uint32_t addr, uint8_t *buf, uint32_t len)
 Read data from EEPROM. More...
 
int32_t EEPROM_WriteData (uint32_t addr, const uint8_t *buf, uint32_t len)
 Write data to EEPROM. More...
 

Description

EEPROM Interface.

Function Documentation

◆ EEPROM_GetSize()

uint32_t EEPROM_GetSize ( void  )

Get EEPROM memory size in bytes.

Returns
Memory size in bytes

The function returns the EEPROM size in bytes.

◆ EEPROM_Initialize()

int32_t EEPROM_Initialize ( void  )

Initialize EEPROM.

Returns
  • 0: function succeeded
  • -1: function failed

The function initializes the EEPROM memory. The function returns an integer value of 0 on success, and -1 on error.

◆ EEPROM_ReadData()

int32_t EEPROM_ReadData ( uint32_t  addr,
uint8_t *  buf,
uint32_t  len 
)

Read data from EEPROM.

Parameters
[in]addrEEPROM address
[in]bufPointer where data will be read from EEPROM
[in]lenNumber of data bytes to read
Returns
  • 0: function succeeded
  • -1: function failed

The function reads data from an EEPROM memory. The parameter addr is the address of the EEPROM. The parameter buf is a pointer to the location that stores the data read form the EEPROM. The parameter len is the number of bytes to read. The function returns an integer value of 0 on success, and -1 on error.

◆ EEPROM_Uninitialize()

int32_t EEPROM_Uninitialize ( void  )

De-initialize EEPROM.

Returns
  • 0: function succeeded
  • -1: function failed

The function de-initializes the EEPROM memory. The function returns an integer value of 0 on success, and -1 on error.

◆ EEPROM_WriteData()

int32_t EEPROM_WriteData ( uint32_t  addr,
const uint8_t *  buf,
uint32_t  len 
)

Write data to EEPROM.

Parameters
[in]addrEEPROM address
[in]bufPointer with data to write to EEPROM
[in]lenNumber of data bytes to write
Returns
  • 0: function succeeded
  • -1: function failed

The function writes data to EEPROM memory. The parameter addr is the address of the EEPROM. The parameter buf is a pointer to the data to be written to the EEPROM. The parameter len is the number of bytes to write. The function returns an integer value of 0 on success, and -1 on error.