KETCube
Macros | Enumerations | Functions
KETCube EEPROM driver

KETCube EEPROM driver for STM32L082. More...

Macros

#define KETCUBE_EEPROM_BASE_ADDR   ((uint32_t)0x08080000) /* Data EEPROM base address */
 
#define KETCUBE_EEPROM_END_ADDR   ((uint32_t)0x080807FF) /* Data EEPROM end address */
 
#define KETCUBE_EEPROM_TIMEOUT   0x1000 /*<! Value of Timeout for EEPROM operations */
 

Enumerations

enum  ketCube_EEPROM_Error_t { KETCUBE_EEPROM_OK = 0, KETCUBE_EEPROM_ERROR = 1, ketCube_EEPROM_Error_tIMEOUT = 2, KETCUBE_EEPROM_ERROR_MEMOVER = 3 }
 Error code type. More...
 

Functions

ketCube_EEPROM_Error_t ketCube_EEPROM_ReadBuffer (uint32_t addr, uint8_t *data, uint8_t len)
 Read Buffer to the EEPROM. More...
 
ketCube_EEPROM_Error_t ketCube_EEPROM_WriteBuffer (uint32_t addr, uint8_t *data, uint8_t len)
 Write Buffer to the EEPROM. More...
 
ketCube_EEPROM_Error_t ketCube_EEPROM_Erase (uint32_t addr, uint8_t len)
 Erase block of the EEPROM memory. More...
 

Detailed Description

KETCube EEPROM driver for STM32L082.

Macro Definition Documentation

◆ KETCUBE_EEPROM_BASE_ADDR

#define KETCUBE_EEPROM_BASE_ADDR   ((uint32_t)0x08080000) /* Data EEPROM base address */

◆ KETCUBE_EEPROM_END_ADDR

#define KETCUBE_EEPROM_END_ADDR   ((uint32_t)0x080807FF) /* Data EEPROM end address */

◆ KETCUBE_EEPROM_TIMEOUT

#define KETCUBE_EEPROM_TIMEOUT   0x1000 /*<! Value of Timeout for EEPROM operations */

Enumeration Type Documentation

◆ ketCube_EEPROM_Error_t

Error code type.

Enumerator
KETCUBE_EEPROM_OK 
KETCUBE_EEPROM_ERROR 
ketCube_EEPROM_Error_tIMEOUT 
KETCUBE_EEPROM_ERROR_MEMOVER 

Function Documentation

◆ ketCube_EEPROM_Erase()

ketCube_EEPROM_Error_t ketCube_EEPROM_Erase ( uint32_t  addr,
uint8_t  len 
)

Erase block of the EEPROM memory.

Parameters
addrEEPROM offset (from the base address)
lendata buffer length
Return values
errorcode, KETCUBE_EEPROM_OK if success

◆ ketCube_EEPROM_ReadBuffer()

ketCube_EEPROM_Error_t ketCube_EEPROM_ReadBuffer ( uint32_t  addr,
uint8_t *  data,
uint8_t  len 
)

Read Buffer to the EEPROM.

Parameters
addrEEPROM offset (from the base address)
databuffer to be written
lendata buffer length
Return values
errorcode, KETCUBE_EEPROM_OK if success

◆ ketCube_EEPROM_WriteBuffer()

ketCube_EEPROM_Error_t ketCube_EEPROM_WriteBuffer ( uint32_t  addr,
uint8_t *  data,
uint8_t  len 
)

Write Buffer to the EEPROM.

Parameters
addrEEPROM offset (from the base address)
databuffer to be written
lendata buffer length
Return values
errorcode, KETCUBE_EEPROM_OK if success