I am working on a project that randomly reads and writes large blocks of data from EEPROM, based on user input. I have used the EEPROM before, but I never really thought about this. In the operations described in the standard eeprom.h file (documentation), you always have to add a typecast to a known address location. For example:
DATA_BYTE = eeprom_read_byte((uint8_t*)LOCATION);
This makes sense, but what i don't understand is its use for larger data, such as the following:
DATA_DWORD = eeprom_read_dword((uint32_t*)LOCATION);
Is the typecast (unit32_t) describing the pointer size, or the size of data being pointed to? I know the ATmega328p has 1kBytes of EEPROM, meaning it would take a 16 bit pointer to hold the address to a single data byte. So I'm guessing this means the typecast has nothing to do with the pointer size, but the size of the data being written/read... I know it works, I would just like to understand it better.
I hope that makes sense. Thanks in advance!