Re: SPI pinout in avrlibc
Aurélien Vallée <[email protected]> Thu, 22 Nov 2018 10:13:01 +0800
| Newsgroups | gmane.comp.hardware.avr.gcc |
|---|---|
| Message-ID | <CAFVgj0ZeDnABZV_Ph2GsmPKA_tCtYiN+OntKMOsarY4wf3eaRw@mail.gmail.com> |
I create the mappings and submit the patch if necessary. Just want to be sure that’s the way to go. On Wed, 21 Nov 2018 at 11:59 AM, Aurélien Vallée <[email protected]> wrote: > 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? > > -- Aurélien Vallée Phone +33 9 77 19 85 61 _______________________________________________ AVR-GCC-list mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avr-gcc-list