I wondered if the SPI pinout is available somewhere in avrlibc headers. The reason is that I need some code initializing SPI that should be portable across AVRs with different pins for SPI, e.g. atmega328 and atmega2560.
It looks to me that these pins are partially mapped currently, as I can find things like: /usr/avr/include/avr/iom324pa.h:#define MOSI_DDR DDRB /usr/avr/include/avr/iom324pa.h:#define MOSI_PORT PORTB /usr/avr/include/avr/iom324pa.h:#define MOSI_PIN PINB /usr/avr/include/avr/iom324pa.h:#define MOSI_BIT 5 But that does not seems to be defined for all cores. Are these macros what I think they are? Is it expected that they are not defined for all cores? Should we map the missing ones?
_______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-gcc-list