To me, the uint8_t could mean one of two things;
1) The address pointer is 8 bits in width, but that would mean you could only have 256 pointers (assuming they pointed to 8-bit data types)
2) The value returned by the address pointer is 8 bits in width, but that would mean the effective EE address could only access EE locations 0.255
Obviously neither of those is true. The value ultimately used as the EE address is actually 16 bits.
No, you're right with the second one -- the value the pointer points to is indeed 8 bits in width. However, you're making the mistake (quite reasonably) of thinking that the value it points to is going to be used as the EE address -- it isn't. The actual value
of the pointer, i.e. the address it represents, is what's going to be used as the EE address -- so it's actually a pointer
into the EEPROM address space (literally a pointer to the 8-bit value in the EEPROM), with 0 being the first byte of EEPROM, etc.
I'm sure it's just a case of moving from asm (and Delphi on PC) to C being in some ways be worse than starting from scratch. Some things in C seem so bat shit crazy compared to other languages.
To be honest, even as a seasoned C programmer I think your confusion is understandable -- I would usually expect the 'address' parameter of an EEPROM read/write routine to be an integral type, not a pointer to an object of the transaction size. However, from a quick glance at some of the library documentation (not having used any AVR chips myself), I get the impression that the EEPROM is actually mapped into the processor's address space, so using pointers may make some sense.
I still think it's a trifle weird, though, as surely you can't actually use them as pointers (otherwise why do you need the library functions?) It does let you do things like struct { uint8_t foo; unit16_t bar; } *p = 0x42; eeprom_write_word(&p->bar, 0x4242); though, I suppose.
I saw those examples, but they have one glaring problem; they only deal with literals that are within the 8-bit data size. For someone new to C, examples showing larger address ranges would be better.
Yes, there is that -- I don't know how large the EEPROM is on 'common' AVRs. Some of the popular PICs that people choose to get started with have <= 256 bytes, for instance, so perhaps people writing tutorial material stick to smaller addresses to make sure it all fits -- or they just pick numbers off the top of their head