Skip to content

Conversation

@Grazfather
Copy link
Collaborator

  • Make pins.apply() match other HALs, where it returns the pins
    • Update examples as necessary
    • Update docs
  • Fix some errors in the adafruit_metro_rp2350 pin config.
    • We were never building this, so the errors weren't caught
  • Comment out most of the pin config: With board_blinky it writes all that config, which is both a waste, but also makes the branch evaluator blow up.
  • Move blinky_core1 out of rp2040_only: I tested it on rp2350
  • Add adafruit_feather_rp2350 board
  • Add board_blinky example, which is like blinky, but it uses the board's configured GPIO named led to toggle.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Lint Results

ℹ️ Additional issues on unchanged lines
The following 5 issue(s) exist but are not on lines changed in this PR:

port/raspberrypi/rp2xxx/build.zig:92: TODO style comments need to have a linked microzig issue on the same line.
port/raspberrypi/rp2xxx/build.zig:143: TODO style comments need to have a linked microzig issue on the same line.
port/raspberrypi/rp2xxx/build.zig:308: Suggestion: Rename `BootROM` to `Boot_ROM`, it _should_ be more in line with our [style guidelines](https://microzig.tech/docs/contributing/). This automation is not perfect so take it with a grain of salt.
port/raspberrypi/rp2xxx/src/boards/adafruit_metro_rp2350.zig:5: TODO style comments need to have a linked microzig issue on the same line.
port/raspberrypi/rp2xxx/src/hal/pins.zig:878: TODO style comments need to have a linked microzig issue on the same line.

@Grazfather Grazfather requested a review from vesim987 January 10, 2026 19:47
- Change hal.pins.apply(comptime config) to return PinsType(), matching
  consensus across HALs (WCH, STM32, GD32).
- Keep pins() API for compatibility with existing code.
- Add @Hasfield guard in pins() to only assign fields that exist in
  PinsType; avoids "no field named ... " when configs define only
  non-SIO/PWM/ADC functions or use custom names.
- Update rp2xxx examples to use "const pins = pin_config.apply();" (or
  discard when unused).
- Update getting-started docs snippet to the consensus pattern.
- Built representative examples successfully (SIO, PWM, UART/I2C,
  watchdog, RP2040/RP2350).
@mattnite mattnite merged commit d18581b into main Jan 13, 2026
56 checks passed
@mattnite mattnite deleted the rp2xxx_pins_apply branch January 13, 2026 07: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.

4 participants