diff --git a/CMakeLists.txt b/CMakeLists.txt index bd9fd12..bc4aa4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,13 @@ else() endif() set(USB_ITF_HID 1) + +option(WAVESHARE_RP2350_ONE "Enable Waveshare RP2350-One LED support" OFF) +if(WAVESHARE_RP2350_ONE) + add_definitions(-DWAVESHARE_RP2350_ONE=1) + message(STATUS "Waveshare RP2350-One: \t enabled") +endif() + include(pico-keys-sdk/pico_keys_sdk_import.cmake) if(NOT ESP_PLATFORM) @@ -115,7 +122,7 @@ set(SOURCES ${SOURCES} ) endif() -SET_VERSION(ver_major ver_minor "${CMAKE_CURRENT_LIST_DIR}/src/fido/version.h" 2) +SET_VERSION(ver_major ver_minor "${CMAKE_CURRENT_LIST_DIR}/src/fido/version.h" 3) if(ESP_PLATFORM) project(pico_fido) endif() diff --git a/README.md b/README.md index fd92c56..0e48e7a 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ PICO_SDK_PATH=/path/to/pico-sdk cmake .. -DPICO_BOARD=board_type -DUSB_VID=0x123 make ``` Note that `PICO_BOARD`, `USB_VID` and `USB_PID` are optional. If not provided, `pico` board and VID/PID `FEFF:FCFD` will be used. +For Waveshare RP2350-One board, add `-DWAVESHARE_RP2350_ONE=ON` to enable RGB LED support on GPIO 16. Additionally, you can pass the `VIDPID=value` parameter to build the firmware with a known VID/PID. The supported values are: @@ -118,6 +119,18 @@ While processing, the Pico FIDO is busy and cannot receive additional commands u ![Processing](https://user-images.githubusercontent.com/55573252/162009007-df45111e-2473-4a92-97c5-15c3cd19babd.gif) +### Waveshare RP2350-One RGB LED + +The Waveshare RP2350-One uses a WS2812 RGB LED on GPIO 16. Different colors indicate different states: + +| State | Color | Pattern | +| ---------------- | --------- | ------------------------------- | +| Not mounted | 🔴 Red | 500ms on / 500ms off | +| Mounted (active) | 🟢 Green | 500ms on / 500ms off | +| Suspended (idle) | 🔵 Blue | 1000ms on / 2000ms off | +| Processing | 🟢 Green | 50ms on / 50ms off (fast blink) | +| Press to confirm | 🟡 Yellow | 1000ms on / 100ms off | + ## Driver Pico FIDO uses the `HID` driver, which is present in all operating systems. It should be detected by all OS and browser/applications just like normal USB FIDO keys. diff --git a/build_pico_fido.sh b/build_pico_fido.sh index 497d70d..d120690 100755 --- a/build_pico_fido.sh +++ b/build_pico_fido.sh @@ -1,7 +1,7 @@ #!/bin/bash VERSION_MAJOR="7" -VERSION_MINOR="2" +VERSION_MINOR="4" SUFFIX="${VERSION_MAJOR}.${VERSION_MINOR}" #if ! [[ -z "${GITHUB_SHA}" ]]; then # SUFFIX="${SUFFIX}.${GITHUB_SHA}" diff --git a/pico-keys-sdk b/pico-keys-sdk index 668b1ac..8075611 160000 --- a/pico-keys-sdk +++ b/pico-keys-sdk @@ -1 +1 @@ -Subproject commit 668b1ac1dd2fdd0934ae1f92bea8e266e8319f4f +Subproject commit 8075611f1565a12de6326e18afbc212d3d3c8548 diff --git a/src/fido/version.h b/src/fido/version.h index f8625ce..dbf1962 100644 --- a/src/fido/version.h +++ b/src/fido/version.h @@ -18,7 +18,7 @@ #ifndef __VERSION_H_ #define __VERSION_H_ -#define PICO_FIDO_VERSION 0x0702 +#define PICO_FIDO_VERSION 0x0704 #define PICO_FIDO_VERSION_MAJOR ((PICO_FIDO_VERSION >> 8) & 0xff) #define PICO_FIDO_VERSION_MINOR (PICO_FIDO_VERSION & 0xff)