Skip to content

Symbol inconsistanties for I2C between ARM, AVR cores... #4755

Closed
@WestfW

Description

@WestfW
Contributor

The AVR Arduino variants define symbols SCL and SDA for access to the Arduino Pin numbers associated with those functions:

static const uint8_t SDA = 18;
static const uint8_t SCL = 19;

The ARM Arduino variants (Due AND zero) define symbols PIN_WIRE_SDA and PIN_WIRE_SCL instead:

#define PIN_WIRE_SDA         (20u)
#define PIN_WIRE_SCL         (21u)

This makes it difficult to write libraries or sketches that will compile for both types of platforms.
Probably, both platforms should define both sets of symbols, but at least the AVR platforms should get the new-style (and better) PIN_xxx #defines.

(In fact, there are a lot of nice PIN_xxx defines that show up in the ARM platforms/variants that should probably be back-ported to the AVRs...)

Activity

sandeepmistry

sandeepmistry commented on Apr 4, 2016

@sandeepmistry
Contributor

This can be closed once #4814, #4813, and arduino/ArduinoCore-samd#130 have been merged.

@WestfW let me know if I've missed anything.

agdl

agdl commented on Jul 7, 2016

@agdl
Member

I'm closing this thank you!

added this to the Release 1.6.10 milestone on Jul 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @WestfW@sandeepmistry@agdl

        Issue actions

          Symbol inconsistanties for I2C between ARM, AVR cores... · Issue #4755 · arduino/Arduino