Skip to content

Conversation

@maribu
Copy link
Member

@maribu maribu commented Jun 23, 2023

Contribution description

  • Rename all arduino_pinmap.h to arduino_iomap.h
    • An empty arduino_pinmap.h that just includes arduino_iomap.h is provided for backward compatibility
    • Move all info from arduino_board.h into the new file as trivial macros, so that they can also be used outside of sketches
    • The new name reflects the fact not just pin mappings, but also other I/O features such as PWMs are mapped
  • Drop all arduino_board.h
    • arduino_board.h and arduino_iomap.h now provide the exact same information, just in a different format
    • a generic arduino_board.h is provided instead that just uses the info in arduinio_iomap.h and provides them in the format the code in sys/arduino expects it
  • Add fine grained features to indicate for mappings
    • availability of mappings for analog pins, DAC pins, PWM pins, UART devices, SPI/I2C buses to the corresponding RIOT identification can now be expressed:
      • arduino_pins: ARDUINO_PIN_0 etc. are available
      • arduino_analog: ARDUINO_A0 etc. are available
      • arduino_pwm: ARDUINO_PIN_13_PWM_DEV etc. are available
      • arduino_dac: ARDUINO_DAC0 etc. are available
      • arduino_uart: ARDUINO_UART_D0D1 or similar are available
      • arduino_spi: ARDUINO_SPI_ISP or similar are available
      • arduino_i2c: ARDUINO_I2C_UNO or similar are available
    • mechanical/electrical compatibility with specific form factors can now be expressed as features:
      • aruino_shield_nano: Arduino NANO compatible headers
      • aruino_shield_uno: Arduino UNO compatible headers
      • aruino_shield_mega: Arduino MEGA compatible headers
      • aruino_shield_isp: ISP header is available

This provides the groundwork to implement shield support as modules that can rely on the I/O mappings, rather than having to provide a configuration per board.

Testing procedure

CI + lots of code review ...

In the long term the peripheral self testing shield will allow automatic testing for some of the I/O mappings for Arduino UNO compatible boards. But this PR would be required first for any soft of meaningful shield support in RIOT first.

Issues/PRs references

None

@maribu maribu added State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Type: new feature The issue requests / The PR implemements a new feature for RIOT Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jun 23, 2023
@github-actions github-actions bot added Area: doc Area: Documentation Area: drivers Area: Device drivers Area: arduino API Area: Arduino wrapper API Area: boards Area: Board ports Area: sys Area: System labels Jun 23, 2023
@riot-ci
Copy link

riot-ci commented Jun 23, 2023

Murdock results

✔️ PASSED

efb3a32 dist/tools/doccheck: update exclude patterns

Success Failures Total Runtime
6930 0 6930 11m:00s

Artifacts

@maribu maribu force-pushed the arduino-features branch from c9627a1 to 395d8eb Compare June 24, 2023 20:33
@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: Kconfig Area: Kconfig integration labels Jun 24, 2023
@maribu maribu force-pushed the arduino-features branch 2 times, most recently from b783a36 to 63d4fd7 Compare June 24, 2023 21:52
@maribu maribu added CI: full build disable CI build filter CI: low priority If set, builds of this PR will be queued behind others CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet labels Jun 24, 2023
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 14, 2025
`arduino_pinmap` and `arduino__analog_map` are not defined any longer by the board but as a common approach in `sys/arduino/include/arduino_board*.h`. Their definition in `boards/common/esp32x` were just a leftover and forgotten in PR RIOT-OS#19759.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
Migration to the new Arduino I/O mapping, which was not fully covered in PR RIOT-OS#19759 when the new Arduino I/O mapping was introduced and the feature handling was changed.
gschorcht added a commit to gschorcht/RIOT-Xtensa-ESP that referenced this pull request May 19, 2025
`arduino_pinmap` and `arduino__analog_map` are not defined any longer by the board but as a common approach in `sys/arduino/include/arduino_board*.h`. Their definition in `boards/common/esp32x` were just a leftover and forgotten in PR RIOT-OS#19759.
@gschorcht
Copy link
Contributor

@maribu Was there any reason why the features arduino_i2c and arduino_spi were not added to boards/common/nucleo144 with this PR?

@maribu
Copy link
Member Author

maribu commented Aug 15, 2025

Just to avoid growing the PRs scope. But if seems I never came back to adding those later on 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: arduino API Area: Arduino wrapper API Area: boards Area: Board ports Area: doc Area: Documentation Area: drivers Area: Device drivers Area: Kconfig Area: Kconfig integration Area: sys Area: System Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants