I am using AVR-GCC on an ATmega16, and want to do EEPROM accesses using the routines in the GCC libraries (referenced in #include avr/eeprom.h).
I have 2 questions which I didn't see answered in the docs:
1) The include file defines eeprom_read_byte as:
uint8_t eeprom_read_byte ( uint8_t * addr )
Does this mean I need to cast all of my eeprom addresses (which run from 0x00 to 0x1FF) to a pointer type? In the past they have just been uint8_t, not uint8_t *. Does this function want addresses from (uint8_t *)0x00 to (uint8_t *)0x1FF?
2) The include file defines eeprom_read_word as:
uint16_t eeprom_read_byte ( uint16_t * addr )
Are the address ranges for this function the same as for the byte read function, even though the type is uint16_t *? In other words, is the word data at (uint16_t *)0x13 the same as the 2 byte data at (uint8_t *)0x13 and (uint8_t *)0x14, or is the uint16_t * address multiplied by 2 (like word vs byte addressing of data) ?