You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Arduino.cc core platforms have macros in their pins_arduino.h header file to represent the Arduino digital pins used by the Wire library Wire object.
This core platform uses names that are inconsistent with the symbol names defined and used by Arduino.cc in the variant pins_arduino.h header files.
When two i2c buses exist, Arduino.cc uses symbol names Wire and Wire1 to represent the two Wire library objects for the two different i2c buses.
This core does the same.
However there is an inconsistency when it comes to the macro symbol names of the digital pins used for each for the Wire objects
Arduino.cc uses:
SDA and PIN_WIRE_SDA are used for the Arduino digital pin number for the Wire object sda pin
SCL and PIN_WIRE_SCL are used for the Arduino digital pin number for the Wire object scl pin
SDA1 and PIN_WIRE1_SDA are used for the Arduino digital pin number for the Wire1 object sda pin
SCL1 and PIN_WIRE1_SCL are used for the Arduino digital pin number for the Wire1 object scl pin
This core uses:
PIN_WIRE0_SDA is used for the Arduino digital pin number for the Wire object sda pin
PIN_WIRE0_SCL is used for the Arduino digital pin number for the Wire object scl pin
PIN_WIRE1_SDA is used for the Arduino digital pin number for the Wire1 object sda pin
PIN_WIRE1_SCL is used for the Arduino digital pin number for the Wire1 object scl pin
And this core does not provide the symbols SDA and SCL
Note that Arduino.cc does not use "WIRE0" in its macro names for the first i2c bus but rather just "WIRE"
This is to provide a consistency between the Wire library object name and the macro symbol name.
i.e. Wire object uses PIN_WIRE_XXX and Wire1 uses PIN_WIRE1_XXX
Also note that ALL Arduino.cc variants provide the symbols SDA and SCL which are the names of the digital pins used by the first Wire object or the only Wire object should there only be a single Wire library object.
SDA and SCL symbols exist for backward compatibility with years of existing code since SDA and SCL existed LONG before PIN_WIRE_SDA and PIN_WIRE_SCL
This core could provide better comparability by following the naming conventions provided by Arduino.cc
Nearly all 3rd party cores have SDA and SCL symbols.
i.e. some code breaks from the missing symbols.
In the case of this core, for compatibility purposes of existing Longan code, it may need to preserver the PIN_WIRE0_SDA and PIN_WIRE0_SCL symbols.
For compatibility with Arduino.cc and other 3rd party cores, and existing code that may use their Wire library symbols, this core should create the SDA, SCL, PIN_WIRE_SDA, and PIN_WIRE_SCL symbols.
The text was updated successfully, but these errors were encountered:
The Arduino.cc core platforms have macros in their pins_arduino.h header file to represent the Arduino digital pins used by the Wire library Wire object.
This core platform uses names that are inconsistent with the symbol names defined and used by Arduino.cc in the variant pins_arduino.h header files.
When two i2c buses exist, Arduino.cc uses symbol names Wire and Wire1 to represent the two Wire library objects for the two different i2c buses.
This core does the same.
However there is an inconsistency when it comes to the macro symbol names of the digital pins used for each for the Wire objects
Arduino.cc uses:
This core uses:
And this core does not provide the symbols SDA and SCL
Note that Arduino.cc does not use "WIRE0" in its macro names for the first i2c bus but rather just "WIRE"
This is to provide a consistency between the Wire library object name and the macro symbol name.
i.e. Wire object uses PIN_WIRE_XXX and Wire1 uses PIN_WIRE1_XXX
Also note that ALL Arduino.cc variants provide the symbols SDA and SCL which are the names of the digital pins used by the first Wire object or the only Wire object should there only be a single Wire library object.
SDA and SCL symbols exist for backward compatibility with years of existing code since SDA and SCL existed LONG before PIN_WIRE_SDA and PIN_WIRE_SCL
This core could provide better comparability by following the naming conventions provided by Arduino.cc
Nearly all 3rd party cores have SDA and SCL symbols.
i.e. some code breaks from the missing symbols.
In the case of this core, for compatibility purposes of existing Longan code, it may need to preserver the PIN_WIRE0_SDA and PIN_WIRE0_SCL symbols.
For compatibility with Arduino.cc and other 3rd party cores, and existing code that may use their Wire library symbols, this core should create the SDA, SCL, PIN_WIRE_SDA, and PIN_WIRE_SCL symbols.
The text was updated successfully, but these errors were encountered: