The following functions act on all the memory cells and may overwrite the User Space.
Note that writing to a cell is only performed if the data inside this cell needs being updated.
Global set/clear
- HC_eeprom.setAll() => set all EEPROM values to 1
- HC_eeprom.clearAll() => set all EEPROM values to 0
Basic read/write
These functions let you read or write data in memory cells. The target cell address (unsigned int) must be specified. These functions are more difficult to handle than the User Space functions. Therefore, they are recommended only for advanced programmers.
Bit
- HC_eeprom.basic_writeBit(address, index, value) => write bit value (bool) at specified index
- HC_eeprom.basic_readBit(address, index) => read bit value (bool) at specified index
Byte
- HC_eeprom.basic_writeByte(address, value) => write value (byte)
- HC_eeprom.basic_readByte(address) => read value (byte)
Word
- HC_eeprom.basic_writeInteger(address, value) => write value (uint16_t)
- HC_eeprom.basic_readInteger(address) => read value (uint16_t)
DWord
- HC_eeprom.basic_writeDWord(address, value) => write value (uint32_t)
- HC_eeprom.basic_readDWord(address) => read value (uint32_t)
Float
- HC_eeprom.basic_writeFloat(address, value) => write value (float)
- HC_eeprom.basic_readFloat(address) => read value (float)
String
- HC_eeprom.basic_writeString(address, string) => write string (char*)
- HC_eeprom.basic_readString(address, length) => read string (char*) of specified length (unsigned int)
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article