diff --git a/firmware/CMakeLists.txt b/firmware/CMakeLists.txt index e1620d3..7ce0fc0 100644 --- a/firmware/CMakeLists.txt +++ b/firmware/CMakeLists.txt @@ -82,7 +82,7 @@ add_executable(remapper if(PICO_BOARD STREQUAL "pico") target_compile_definitions(remapper PUBLIC PICO_DEFAULT_UART_TX_PIN=16) target_compile_definitions(remapper PUBLIC PICO_DEFAULT_UART_RX_PIN=17) -target_compile_definitions(remapper PUBLIC PIO_USB_DP_PIN=0) +target_compile_definitions(remapper PUBLIC PICO_DEFAULT_PIO_USB_DP_PIN=0) endif() target_include_directories(remapper PRIVATE diff --git a/firmware/src/boards/feather_host.h b/firmware/src/boards/feather_host.h index 7513c7e..1f17e58 100644 --- a/firmware/src/boards/feather_host.h +++ b/firmware/src/boards/feather_host.h @@ -53,8 +53,26 @@ // --- PIO USB --- -#ifndef PIO_USB_DP_PIN -#define PIO_USB_DP_PIN 16 +// these are currently the defaults in tinyusb, but it has changed in the past + +#ifndef PICO_DEFAULT_PIO_USB_DP_PIN +#define PICO_DEFAULT_PIO_USB_DP_PIN 16 +#endif + +#ifndef PICO_DEFAULT_PIO_USB_VBUSEN_PIN +#define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 18 +#endif + +// note that tinyusb defines PICO_DEFAULT_PIO_USB_VBUSEN_STATE in board.h, +// but uses PIO_USB_VBUSEN_STATE in family.c + +#ifndef PIO_USB_VBUSEN_STATE +#define PIO_USB_VBUSEN_STATE 1 #endif +// note that tinyusb uses PICO_DEFAULT_PIO_USB_VBUSEN_PIN for the pin number, +// but PIO_USB_VBUSEN_PIN to decide whether to use it or not + +#define PIO_USB_VBUSEN_PIN + #endif diff --git a/firmware/tinyusb b/firmware/tinyusb index be1e13d..51dbd2f 160000 --- a/firmware/tinyusb +++ b/firmware/tinyusb @@ -1 +1 @@ -Subproject commit be1e13d04b544b3a1ef01e47c9acae02679e30ff +Subproject commit 51dbd2f03ab975a984ce19bba1de9c8532696e18