Add support for RP2350-One LED driver. #239

Open
daimiaopeng wants to merge 6 commits from daimiaopeng/main into main
daimiaopeng commented 2026-01-02 02:09:03 +08:00 (Migrated from github.com)

Summary

This PR adds support for the Waveshare RP2350-One development board, specifically enabling its onboard Waveshare RP2350-One LED for status indication.

  • Type: New Feature
  • Problem Solved: The Waveshare RP2350-One board uses a WS2812 LED on GPIO 16, which requires a specific driver and RGB color ordering. Previously, only standard LED or Pimoroni drivers were supported.

Details / Impact

  • Hardware / board(s) tested: Waveshare RP2350-One
  • Firmware / commit/base version: Based on latest main branch.
  • Security impact: None. Only affects LED status display.
  • Behavior changes:
    • Adds a new CMake option WAVESHARE_RP2350_ONE to enable the specific driver.
    • Implements a new LED driver (led_rp2350_one.c) that handles WS2812 initialization and color control.
    • Uses specific colors to indicate FIDO states (Idle, Active, Processing, Confirmation) leveraging the RGB capabilities.

Testing

I have tested this change on a physical Waveshare RP2350-One board.

  • Steps to reproduce / validate:
    1. Build with cmake .. -DPICO_BOARD=pico2 -DWAVESHARE_RP2350_ONE=ON.
    2. Flash the pico_fido.uf2 to the board.
    3. Observe LED behavior in different states.
  • Expected Results:
    • Not mounted: Red blinking (500ms/500ms).
    • Mounted (Active): Green blinking (500ms/500ms).
    • Suspended (Idle): Blue blinking (1000ms/2000ms).
    • Processing (e.g. during Registration): Green fast blinking (50ms/50ms).
    • Confirm (Touch needed): Yellow blinking (1000ms/100ms).

Licensing confirmation (required)

I confirm the above licensing terms:

  • Yes, I agree

Anything else?

  • The driver uses the PIO0 SM0 for driving the WS2812 LED.
  • Documentation has been updated in README.md to include build instructions and LED state descriptions for this board.

微信图片_20260102020644_25_388
微信图片_20260102020649_26_388

## Summary This PR adds support for the **Waveshare RP2350-One** development board, specifically enabling its onboard **Waveshare RP2350-One LED** for status indication. - **Type**: New Feature - **Problem Solved**: The Waveshare RP2350-One board uses a WS2812 LED on GPIO 16, which requires a specific driver and RGB color ordering. Previously, only standard LED or Pimoroni drivers were supported. ## Details / Impact - **Hardware / board(s) tested**: Waveshare RP2350-One - **Firmware / commit/base version**: Based on latest `main` branch. - **Security impact**: None. Only affects LED status display. - **Behavior changes**: - Adds a new CMake option `WAVESHARE_RP2350_ONE` to enable the specific driver. - Implements a new LED driver (`led_rp2350_one.c`) that handles WS2812 initialization and color control. - Uses specific colors to indicate FIDO states (Idle, Active, Processing, Confirmation) leveraging the RGB capabilities. ## Testing I have tested this change on a physical Waveshare RP2350-One board. - **Steps to reproduce / validate**: 1. Build with `cmake .. -DPICO_BOARD=pico2 -DWAVESHARE_RP2350_ONE=ON`. 2. Flash the `pico_fido.uf2` to the board. 3. Observe LED behavior in different states. - **Expected Results**: - **Not mounted**: Red blinking (500ms/500ms). - **Mounted (Active)**: Green blinking (500ms/500ms). - **Suspended (Idle)**: Blue blinking (1000ms/2000ms). - **Processing** (e.g. during Registration): Green fast blinking (50ms/50ms). - **Confirm** (Touch needed): Yellow blinking (1000ms/100ms). ## Licensing confirmation (required) **I confirm the above licensing terms:** - [X] Yes, I agree ## Anything else? - The driver uses the PIO0 SM0 for driving the WS2812 LED. - Documentation has been updated in `README.md` to include build instructions and LED state descriptions for this board. - ![微信图片_20260102020644_25_388](https://github.com/user-attachments/assets/492e7ec4-e599-4027-9f1a-b93b66815676) ![微信图片_20260102020649_26_388](https://github.com/user-attachments/assets/ba963114-9cf2-40ce-a533-73bf5e661694)
daimiaopeng commented 2026-01-02 02:09:28 +08:00 (Migrated from github.com)
https://github.com/polhenarejos/pico-keys-sdk/pull/19
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2026-01-02 02:12:35 +08:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull request overview

This PR adds support for the Waveshare RP2350-One development board by enabling its onboard WS2812 RGB LED on GPIO 16 for FIDO status indication. The implementation uses different colors to represent various device states (idle, active, processing, confirmation).

Key Changes:

  • Adds a new CMake option WAVESHARE_RP2350_ONE to enable board-specific LED support
  • Documents RGB LED states with color-coded patterns for different FIDO operations
  • Provides build instructions specific to the Waveshare RP2350-One board

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
README.md Adds build instructions for Waveshare RP2350-One and documents RGB LED color/pattern states for different FIDO operations
CMakeLists.txt Introduces WAVESHARE_RP2350_ONE CMake option to conditionally enable the board-specific LED driver

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Pull request overview This PR adds support for the Waveshare RP2350-One development board by enabling its onboard WS2812 RGB LED on GPIO 16 for FIDO status indication. The implementation uses different colors to represent various device states (idle, active, processing, confirmation). **Key Changes:** - Adds a new CMake option `WAVESHARE_RP2350_ONE` to enable board-specific LED support - Documents RGB LED states with color-coded patterns for different FIDO operations - Provides build instructions specific to the Waveshare RP2350-One board ### Reviewed changes Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment. | File | Description | | ---- | ----------- | | README.md | Adds build instructions for Waveshare RP2350-One and documents RGB LED color/pattern states for different FIDO operations | | CMakeLists.txt | Introduces `WAVESHARE_RP2350_ONE` CMake option to conditionally enable the board-specific LED driver | --- 💡 <a href="/polhenarejos/pico-fido/new/main/.github/instructions?filename=*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-01-02 02:12:35 +08:00

The color for "Processing" state is inconsistent with the PR description. The PR description states "Processing (e.g. during Registration): Yellow fast blinking (50ms/50ms)", but the table shows Green. This should be updated to Yellow to match the intended design and PR description.

| Processing       | 🟡 Yellow | 50ms on / 50ms off (fast blink) |
The color for "Processing" state is inconsistent with the PR description. The PR description states "Processing (e.g. during Registration): Yellow fast blinking (50ms/50ms)", but the table shows Green. This should be updated to Yellow to match the intended design and PR description. ```suggestion | Processing | 🟡 Yellow | 50ms on / 50ms off (fast blink) | ```
daimiaopeng (Migrated from github.com) reviewed 2026-01-02 02:15:11 +08:00
daimiaopeng (Migrated from github.com) commented 2026-01-02 02:15:11 +08:00

| Processing | 🟢 Green | 50ms on / 50ms off (fast blink) |

| Processing | 🟢 Green | 50ms on / 50ms off (fast blink) |
kri164 commented 2026-01-20 20:40:29 +08:00 (Migrated from github.com)

@daimiaopeng
Where to obtain led_rp2350_one.c file? I cannt find it.
Thanks

@daimiaopeng Where to obtain led_rp2350_one.c file? I cannt find it. Thanks
daimiaopeng commented 2026-01-20 20:43:18 +08:00 (Migrated from github.com)

@kri164

@daimiaopeng Where to obtain led_rp2350_one.c file? I cannt find it. Thanks

pico-keys-sdk:https://github.com/polhenarejos/pico-keys-sdk/pull/19/files

https://github.com/daimiaopeng/pico-keys-sdk
https://github.com/daimiaopeng/pico-fido

@kri164 > @daimiaopeng Where to obtain led_rp2350_one.c file? I cannt find it. Thanks pico-keys-sdk:https://github.com/polhenarejos/pico-keys-sdk/pull/19/files https://github.com/daimiaopeng/pico-keys-sdk https://github.com/daimiaopeng/pico-fido
This pull request has changes conflicting with the target branch.
  • pico-keys-sdk
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin daimiaopeng/main:daimiaopeng/main
git checkout daimiaopeng/main
Sign in to join this conversation.