Robert von Knobloch <[EMAIL PROTECTED]> wrote: > Code like "x = eeprom_read_byte(&eevalue)" appears to work, > but "uint8_t * ptr; x=eeprom_read_byte(ptr)" does not.
Can you get us some more of the code, preferrably something that can be compiled to demonstrate the problem? > It appears to be a problem in that these functions pass a 16-bit > address to the asm call for the function, whreas the hardware only > supports an 8-bit address (I conclude). It's correct that the library always handles all addresses as 16-bit values (as does the compiler itself). However, this is harmless, because all AVRs so far have an empty register where the larger ones have their EEARH, so even writing the 0 to that non-existent register doesn't do any harm. This is effectively caused by the simplified library approach where there's one library for an entire class of AVRs, rather than a single one for each individual AVR. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-chat mailing list AVR-chat@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-chat