arduino / Arduino

Arduino IDE 1.x
https://www.arduino.cc/en/software
Other
14.11k stars 7k forks source link

Duplicate definition of "BIN" [imported] #829

Closed cmaglie closed 7 years ago

cmaglie commented 11 years ago

This is Issue 829 moved from a Google Code project. Added by 2012-02-24T08:22:58.000Z by pe...@stairways.com.au. Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

For a variety of ATtiny chips (x4, x5, x61 and ATmega161), the respective avr iot define files define BIN to 7 for Bipolar Input Mode in ADCSRB.

The core Print.h defines BIN to be 2.

This leads to spurious warnings and potential errors depending on which the compiler choses to use.

Since the BIN pin in the ADCSRB is probably the lesser, I'd suggest you change the #define BIN to #define BIPOLAR or BIPOLARIM in the files:

iotn167.h:#define BIN 7 iotnx4.h:#define BIN 7 iotnx5.h:#define BIN 7 iotnx61.h:#define BIN 7

There doesn't appear to be any way to avoid the potential confusion of the issue.

per1234 commented 7 years ago

Closed by https://github.com/arduino/Arduino/commit/c6bac064065b667bf8099ed0131742b1f111cb94