fix(native-usb): isolate two-pair transport and hand off read status in IRQ

This commit is contained in:
Joey Yakimowich-Payne 2026-09-17 20:24:32 -06:00
commit 9f8678af96
51 changed files with 8159 additions and 815 deletions

View file

@ -5,6 +5,14 @@ project(switch2_usb_probe C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
include(${CMAKE_CURRENT_LIST_DIR}/probe_build.cmake)
if(SWITCH2_PROBE_NEUTRAL_INPUT)
# Match the proven hub clock/flash timing without enabling the radio.
add_compile_definitions(
SWITCH_PICO_SYS_CLOCK_MHZ=240 SWITCH_PICO_OVERCLOCK_MV=1300
PICO_FLASH_SPI_CLKDIV=4 PICO_EMBED_XIP_SETUP=1
PICO_STACK_SIZE=16384 PICO_CORE1_STACK_SIZE=4096
CYW43_PIO_CLOCK_DIV_INT=0 CYW43_PIO_CLOCK_DIV_FRAC8=0)
endif()
pico_sdk_init()
add_executable(switch2-usb-probe
../../src/firmware/configuration/configuration_storage.cpp
@ -12,4 +20,11 @@ add_executable(switch2-usb-probe
target_compile_definitions(switch2-usb-probe PRIVATE
PICO_FLASH_ASSUME_CORE1_SAFE=1 PICO_FLASH_ASSERT_ON_UNSAFE=0)
switch2_usb_probe_configure(switch2-usb-probe)
if(SWITCH2_PROBE_NEUTRAL_INPUT)
target_sources(switch2-usb-probe PRIVATE
bootsel.cpp
../../src/firmware/usb/usb_configuration_management.cpp
../../src/firmware/platform/pico/system_clock.cpp)
target_link_libraries(switch2-usb-probe PRIVATE hardware_adc hardware_vreg hardware_powman)
endif()
pico_add_extra_outputs(switch2-usb-probe)