Skip to content

Uart shared variant emitter#390

Open
crabel99 wants to merge 2 commits into
adafruit:masterfrom
crabel99:uart-shared-variant-emitter
Open

Uart shared variant emitter#390
crabel99 wants to merge 2 commits into
adafruit:masterfrom
crabel99:uart-shared-variant-emitter

Conversation

@crabel99

Copy link
Copy Markdown

Summary

Refactors UART variant setup so Uart.cpp owns the common Serial* object and interrupt-handler emission, matching the structure already used by Wire and SPI.

Changes

  • Adds shared UART emitters for Serial, Serial1 through Serial5, and SerialUART.
  • Derives UART SERCOM interrupt handlers from each variant's PERIPH_SERIAL* macro.
  • Removes duplicated Uart Serial* object definitions from variant .cpp files.
  • Removes duplicated SERIAL*_IT_HANDLER definitions from variant headers where the core can derive them.
  • Keeps variant-owned UART opt-outs for special cases such as gemma_m0.

Validation

  • git diff --check -- cores/arduino/Uart.cpp variants
  • python3 tools/build_all.py metro_m0
  • python3 tools/build_all.py metro_m4
  • python3 tools/build_all.py matrixportal_m4

@crabel99 crabel99 force-pushed the uart-shared-variant-emitter branch from 06cdc4a to 230b3ed Compare June 20, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants