Hello, I didn't find a clear answer to my doubt:
after executing EEPROM.put( startAddress, myStruct ) is there any "easy" way to know the address of the last byte occupied by the struct itself?
I would write a couple of arrays just after the stored struct but... I don't know where it ends! Obviously I could calculate it by myself but I wonder why the put() function does not return just the number of byte used.
p.s.
As I know the sizeof operator is not always working 'cause of packing/padding actions of the compiler.
As I know the sizeof operator is not always working 'cause of packing/padding actions of the compiler.
Have you looked at the source code? The EEPROMClass struct (who the fuck decided that a struct should have class in the name?) contains the put() method. It uses sizeof() to determine the number of bytes to write.
PaulS:
Have you looked at the source code? The EEPROMClass struct (who the fuck decided that a struct should have class in the name?) contains the put() method. It uses sizeof() to determine the number of bytes to write.
:o
Ok, thanks to both of you. I will go with sizeof to know how many EEPROM bytes was used.