[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] SPI pinout in avrlibc

From: Aurélien Vallée
Subject: Re: [avr-gcc-list] SPI pinout in avrlibc
Date: Thu, 22 Nov 2018 10:13:01 +0800

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 <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]