As Dmitry K. wrote: > Is the __AVR_3_BYTE_PC__ macro the best for this purpose?
That should probably be only applied in situations where you are interested in knowing how many bytes have been pushed onto the stack by a CALL instruction. > I have find 2 another methods in Avr-libc: > a) if (__AVR_ARCH__ == 6) That will just cover the ATmega2560/2561 devices. There might be more devices with 3-byte PC in future. Well, not even future anymore... Eric just committed the first Xmega support a few hours ago. I didn't look into the changes, but I'm almost sure Xmega support will involve devices with a 3-byte PC in future that don't belong to avr6. > b) if defined(EIND) That should only be used if your code would access EIND if it is present. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev