crosspad_usb_mode
Read or switch the CrossPad USB profile to get CDC control ports for crosspad_cdc calls or enable UAC2 audio capture without CDC.
Instructions
[ESP HW] Read or switch the CrossPad's USB profile through the crosspad-hil daemon. action='get' returns the current profile and the ports that exist in it (cdc, console, uac2, esp_midi). action='set' mode='default' is MIDI + CDC, the control port every crosspad_cdc / crosspad_console call needs; mode='audio' is MIDI + UAC2 capture with NO CDC, so crosspad_cdc fails with NO_CDC_IN_AUDIO_MODE until you switch back. The STM32 bridge console survives both profiles. wait=true (default) blocks until the device re-enumerates and reports the refreshed ports.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "crosspad_usb_mode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Required for action='set'. 'default' = MIDI + CDC (control port available); 'audio' = MIDI + UAC2 (NO CDC — crosspad_cdc stops working until you switch back). | |
| wait | No | action='set': wait for the device to re-enumerate in the new profile before returning (default true). false returns immediately and the reported ports are the pre-switch ones. | |
| action | Yes | 'get' reads the current profile from devices.list; 'set' switches it. | |
| device | No | Device id (dev_xxxx) or one of its port paths; omit when exactly one CrossPad is connected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ts | No | ||
| docs | No | ||
| hint | No | ||
| mode | No | ||
| next | No | ||
| tool | No | ||
| error | No | ||
| ports | No | ||
| action | No | ||
| device | No | ||
| notice | No | ||
| details | No | ||
| outcome | No | ||
| success | Yes | ||
| elicitation | No | ||
| confirmation | No | ||
| requested_mode | No |