Store arrays of both uint8_t and uint32_t in emulated EEPROM

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
josc_1234441
Level 1
Level 1
First like received

I am looking at the code example PSOC4 EmEEPROM, where the size allocated to em EEPROM is defined by:

const uint8_t Em_EEPROM_em_EepromStorage[Em_EEPROM_PHYSICAL_SIZE]

How could one store both uint8_t and uint32_t variables in em EEPROM?

0 Likes
1 Solution
Anonymous
Not applicable

Split the unit32 variables into four uint8 variables and store it into the eeprom. The only difference is the size; And of course you would need to keep track of which locations were part of the multi-byte variable.

View solution in original post

0 Likes
1 Reply
Anonymous
Not applicable

Split the unit32 variables into four uint8 variables and store it into the eeprom. The only difference is the size; And of course you would need to keep track of which locations were part of the multi-byte variable.

0 Likes