Restore profile editor management on the native Joy-Con hub
This commit is contained in:
parent
26a25a66af
commit
dd69f3d487
30 changed files with 1849 additions and 348 deletions
|
|
@ -26,8 +26,8 @@ uint32_t bootsel_deadline_ms;
|
|||
#endif
|
||||
}
|
||||
|
||||
bool probe_bootsel_vendor_control(uint8_t rhport, uint8_t stage,
|
||||
const tusb_control_request_t* request) {
|
||||
bool probe_management_vendor_control(uint8_t rhport, uint8_t stage,
|
||||
const tusb_control_request_t* request) {
|
||||
using namespace UsbConfigurationManagement;
|
||||
#if SWITCH2_PROBE_HUB
|
||||
if (rhport > PROBE_CONTROLLER_COUNT) return false;
|
||||
|
|
@ -41,7 +41,12 @@ bool probe_bootsel_vendor_control(uint8_t rhport, uint8_t stage,
|
|||
request->bRequest != static_cast<uint8_t>(Operation::kBootselReboot) ||
|
||||
request->wValue != kRequestValue || request->wIndex != kRequestIndex ||
|
||||
request->wLength != kRequestHeaderSize) {
|
||||
#if SWITCH2_PROBE_HUB
|
||||
return rhport == 0 &&
|
||||
usb_configuration_management_vendor_control(rhport, stage, request);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
#if SWITCH2_PROBE_HUB
|
||||
if (stage == CONTROL_STAGE_SETUP) {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,10 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Core 0: expose only the existing private BOOTSEL command, not configuration.
|
||||
bool probe_bootsel_vendor_control(uint8_t rhport, uint8_t stage,
|
||||
const tusb_control_request_t* request);
|
||||
// Core 0: native root management plus private BOOTSEL on root and children.
|
||||
// Non-hub probes retain their private BOOTSEL-only management surface.
|
||||
bool probe_management_vendor_control(uint8_t rhport, uint8_t stage,
|
||||
const tusb_control_request_t* request);
|
||||
// Core 0: service the existing reboot delay only after a validated status ACK.
|
||||
void probe_bootsel_task(uint32_t now_ms);
|
||||
|
||||
|
|
|
|||
|
|
@ -669,7 +669,7 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage,
|
|||
if (stage == CONTROL_STAGE_SETUP)
|
||||
log_packet("VENDOR_CONTROL", rhport, 0, (const uint8_t*)request, sizeof(*request));
|
||||
#ifdef SWITCH_PICO_SWITCH2_USB_BRIDGE
|
||||
if (probe_bootsel_vendor_control(rhport, stage, request))
|
||||
if (probe_management_vendor_control(rhport, stage, request))
|
||||
return true;
|
||||
#endif
|
||||
#if SWITCH2_PROBE_HUB
|
||||
|
|
|
|||
|
|
@ -369,12 +369,12 @@ function(switch2_usb_probe_configure target)
|
|||
endif()
|
||||
if(SWITCH2_PROBE_HUB AND SWITCH2_BRIDGE_FULL_INPUT)
|
||||
if(SWITCH2_PROBE_TRACE_NATIVE_INPUT)
|
||||
pico_set_program_version(${target} "0.71-native-gamepad-trace")
|
||||
pico_set_program_version(${target} "0.72-native-gamepad-trace")
|
||||
else()
|
||||
pico_set_program_version(${target} "0.71-native-gamepad")
|
||||
pico_set_program_version(${target} "0.72-native-gamepad")
|
||||
endif()
|
||||
elseif(SWITCH2_PROBE_HUB)
|
||||
pico_set_program_version(${target} "0.67-native-hub-latency")
|
||||
pico_set_program_version(${target} "0.72-native-hub-editor")
|
||||
elseif(SWITCH2_PROBE_JOIN_CHORD_GATE)
|
||||
if(SWITCH2_PROBE_TRACE_NATIVE_INPUT)
|
||||
pico_set_program_version(${target} "0.37-pair-chord-trace")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue