avrdudes / avr-libc

The AVR-LibC package provides a subset of the standard C library for AVR 8-bit RISC microcontrollers.
https://avrdudes.github.io/avr-libc/
Other
267 stars 57 forks source link

[bug #37627] #define PA0_DDR DDRADC without ever defining DDRADC #539

Open avrs-admin opened 2 years ago

avrs-admin commented 2 years ago

Wed 24 Oct 2012 05:13:11 PM CEST

A number of header files contains macros definitions like:

define PA0_DDR   DDRADC

define PA0_PORT  PORTADC

define PA0_PIN   PINADC

define PA0_BIT   ADC0

or

define PCINT1_DDR   DDRADC

define PCINT1_PORT  PORTADC

define PCINT1_PIN   PINADC

define PCINT1_BIT   ADC1

without ever defining DDRADC, PORTADC, ADC0...

I assume these lines were supposed to read:

define PA0_DDR   DDRA

define PA0_PORT  PORTA

define PA0_PIN   PINA

define PA0_BIT   0

??

This applies to all device pin definitions in: avr/iotn861a.h avr/iom88pa.h avr/iotn20.h avr/iotn461a.h avr/iotn40.h avr/iotn261a.h

This issue was migrated from https://savannah.nongnu.org/bugs/?37627

avrs-admin commented 2 years ago

Wed 24 Oct 2012 07:40:17 PM CEST

I have found some more...

In avr/iom16hva2.h:

define NV_DDR   DDRNV

define NV_PORT  PORTNV

define NV_PIN   PINNV

define NV_BIT   NV

and following lines don't seem right to me either.

Also: avr/iom16hvb.h avr/iom16hvbrevb.h avr/iom32hvb.h avr/iom64hve.h