feat(wake): add USB-triggered Switch 2 wake with Windows interface support
Queue correlated, volatile wake requests for the BTstack owner and expose read-only completion state. Keep the controller chord, captured identity, pairings, profiles, HD settings and existing wake burst unchanged. Add Python API and wake CLI with bounded waits, explicit failure outcomes and no automatic broadcast retries. Avoid importing SDL just to obtain fixed sensor IDs so USB automation has clean output and no SDL dependency. Windows libusb cannot control hub roots. Expose only INFO/WAKE on each native child's existing vendor Interface 1 with isolated control state; retain hub/HID drivers, descriptors and identities. Add safe sibling-aware Windows discovery and a packaged Windows libusb runtime. Document manual WinUSB binding to Interface 1 only and migrate examples to find_wake_pico. Validate with 713 tests, 10 firmware/probe builds, Windows x64 wheel resolution on Python 3.9/3.11, and a real child-interface wake burst on Linux (2.03 s, no controller, no failures). Device/configuration descriptors, serials and persistent state matched before/after. Physical Windows hardware/driver operation remains unverified on this Linux workstation.
This commit is contained in:
parent
80b788099b
commit
19358a0fff
20 changed files with 2152 additions and 85 deletions
|
|
@ -36,6 +36,12 @@ bool probe_management_vendor_control(uint8_t rhport, uint8_t stage,
|
|||
transfer.pending = false;
|
||||
transfer.validated = false;
|
||||
}
|
||||
#endif
|
||||
#if SWITCH2_PROBE_HUB && !SWITCH2_PROBE_NEUTRAL_INPUT
|
||||
if (rhport != 0 &&
|
||||
usb_configuration_management_child_vendor_control(rhport, stage, request)) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
if (request == nullptr || request->bmRequestType != 0x40 ||
|
||||
request->bRequest != static_cast<uint8_t>(Operation::kBootselReboot) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue