I'm currently using the EEPROMex library to store Longs in eeprom. However even with 4k eeprom on the bigger chips I will run out of space quickly storing user color codes. So comes my conundrum of storing data. uint32_t and longs are 32bit variables but I only need 24bits of that... with the EEPROMex library I can tell it where to start and usually with 32bit values I space them 4 bytes apart.. When I store the long does it auto generate 4 bytes ? or only as many bytes as the value itself? aka would it store a 0xFF000000 if I told it to store 0x000000? or would it only use 3 bytes of the 4 bytes needed? and thus I could tell the eepromex library to only count 3 bytes apart saving me a huge chunk of space!
TLDR when creating variables does it store the entire byte size of the variable or only the actual byte value used of said variable?
example create a long and assign it 0xFF.. would the long be 1 byte big? or would it still be 4 bytes big just with crap??
TLDR when creating variables does it store the entire byte size of the variable or only the actual byte value used of said variable?
example create a long and assign it 0xFF.. would the long be 1 byte big? or would it still be 4 bytes big just with crap??