This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ARDUINO_SCL_PIN 27 // SCL signal pin ?

Dear Members,

I saw at G:\nRF5_SDK_17.0.2_d674dde\components\boards\pca10056.h

#define ARDUINO_SCL_PIN             27    // SCL signal pin

#define ARDUINO_SDA_PIN             26    // SDA signal pin

Does it mean SCL_PIN 27 = P0.27 ?

Thanks

Parents
  • It simply means that wherever in your 'C' source code you use ARDUINO_SCL_PIN, the preprocessor will replace it with 27;

    similarly, wherever in your 'C' source code you use ARDUINO_SDA_PIN, the preprocessor will replace it with 26.

    How the values 26 & 27 are interpreted depends on the context in which you use them - if you use them in places expecting them to be a pin number within P0, then that is what you'll get.

Reply
  • It simply means that wherever in your 'C' source code you use ARDUINO_SCL_PIN, the preprocessor will replace it with 27;

    similarly, wherever in your 'C' source code you use ARDUINO_SDA_PIN, the preprocessor will replace it with 26.

    How the values 26 & 27 are interpreted depends on the context in which you use them - if you use them in places expecting them to be a pin number within P0, then that is what you'll get.

Children
No Data
Related