Line 18: |
Line 18: |
| |} | | |} |
| | | |
− | Cmd0: No input, returns an [[#IDsService]]. | + | == Cmd0 == |
| + | No input. Returns an [[#IDsService]]. |
| | | |
| == IDsService == | | == IDsService == |
Line 57: |
Line 58: |
| | 12 || [8.0.0+] | | | 12 || [8.0.0+] |
| |} | | |} |
− |
| |
− | Cmd12: No input, returns an output u32.
| |
| | | |
| Initialization done by [[Manu Services|manu]]: | | Initialization done by [[Manu Services|manu]]: |
Line 238: |
Line 237: |
| | | |
| The last 3 blocks are ASCII strings. The data following each string is all-zero, for padding to size 0x20. | | The last 3 blocks are ASCII strings. The data following each string is all-zero, for padding to size 0x20. |
| + | |
| + | == Cmd12 == |
| + | No input. Returns an output u32. |
| | | |
| == IDsInterface == | | == IDsInterface == |
Line 246: |
Line 248: |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
| |- | | |- |
− | ! Cmd || Name || Notes | + | ! Cmd || Name |
| |- | | |- |
− | | 0 || [[#GetDsEndpoint]] || | + | | 0 || [[#GetDsEndpoint]] |
| |- | | |- |
− | | 1 || [[#GetSetupEvent]] || | + | | 1 || [[#GetSetupEvent]] |
| |- | | |- |
− | | 2 || || Takes a type-0x6 output buffer, no other output. Memcpys data to outbuf with outsize, uses size 0x8 if outsize is too large. | + | | 2 || |
| |- | | |- |
− | | 3 || [[#EnableInterface]] || | + | | 3 || [[#EnableInterface]] |
| |- | | |- |
− | | 4 || [[#DisableInterface]] || | + | | 4 || [[#DisableInterface]] |
| |- | | |- |
− | | 5 || [[#CtrlInPostBufferAsync]] || | + | | 5 || [[#CtrlInPostBufferAsync]] |
| |- | | |- |
− | | 6 || [[#CtrlOutPostBufferAsync]] || | + | | 6 || [[#CtrlOutPostBufferAsync]] |
| |- | | |- |
− | | 7 || [[#GetCtrlInCompletionEvent]] || | + | | 7 || [[#GetCtrlInCompletionEvent]] |
| |- | | |- |
− | | 8 || [[#GetCtrlInReportData]] || | + | | 8 || [[#GetCtrlInReportData]] |
| |- | | |- |
− | | 9 || [[#GetCtrlOutCompletionEvent]] || | + | | 9 || [[#GetCtrlOutCompletionEvent]] |
| |- | | |- |
− | | 10 || [[#GetCtrlOutReportData]] || | + | | 10 || [[#GetCtrlOutReportData]] |
| |- | | |- |
− | | 11 || [[#StallCtrl]] || | + | | 11 || [[#StallCtrl]] |
| |- | | |- |
− | | 12 || [5.0.0+] AppendConfigurationData || | + | | 12 || [5.0.0+] AppendConfigurationData |
| |} | | |} |
| | | |
− | Commands cmd2, [[#CtrlInPostBufferAsync]], [[#CtrlOutPostBufferAsync]], and [[#StallCtrl]], will throw an error if the interface is not [[#EnableInterface|enabled]]. [[#GetDsEndpoint]] will throw an error if the interface is [[#EnableInterface|enabled]]. | + | Commands Cmd2, [[#CtrlInPostBufferAsync]], [[#CtrlOutPostBufferAsync]], and [[#StallCtrl]], will throw an error if the interface is not [[#EnableInterface|enabled]]. [[#GetDsEndpoint]] will throw an error if the interface is [[#EnableInterface|enabled]]. |
| | | |
| === GetDsEndpoint === | | === GetDsEndpoint === |
Line 301: |
Line 303: |
| === GetSetupEvent === | | === GetSetupEvent === |
| Returns an event handle. Unknown what triggers signalling, not signalled during interface-enable / device<>host USB-comms init. | | Returns an event handle. Unknown what triggers signalling, not signalled during interface-enable / device<>host USB-comms init. |
| + | |
| + | === Cmd2 === |
| + | Takes a type-0x6 output buffer, no other output. Memcpys data to outbuf with outsize, uses size 0x8 if outsize is too large. |
| | | |
| === EnableInterface === | | === EnableInterface === |
Line 340: |
Line 345: |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
| |- | | |- |
− | ! Cmd || Name || Notes | + | ! Cmd || Name |
| |- | | |- |
− | | 0 || [[#PostBufferAsync]] || | + | | 0 || [[#PostBufferAsync]] |
| |- | | |- |
− | | 1 || || No input/output. | + | | 1 || |
| |- | | |- |
− | | 2 || [[#GetCompletionEvent]] || | + | | 2 || [[#GetCompletionEvent]] |
| |- | | |- |
− | | 3 || [[#GetReportData]] || | + | | 3 || [[#GetReportData]] |
| |- | | |- |
− | | 4 || [[#Stall]] || | + | | 4 || [[#Stall]] |
| |- | | |- |
− | | 5 || || Takes an input u8, no output. | + | | 5 || |
| |- | | |- |
− | | 6 || [7.0.0+] || No input, returns an output bool. | + | | 6 || [7.0.0+] |
| |- | | |- |
− | | 7 || [7.0.0+] || No input, returns an output handle. | + | | 7 || [7.0.0+] |
| |- | | |- |
− | | 8 || [11.0.0+] || Takes an input u64 and a handle, no output. Stubbed, just returns an error. | + | | 8 || [11.0.0+] |
| |- | | |- |
− | | 9 || [11.0.0+] || Takes an input u32 size, an u64 offset, returns an u32 urbId. Stubbed, just returns an error. | + | | 9 || [11.0.0+] |
| |} | | |} |
| | | |
Line 377: |
Line 382: |
| | | |
| For receiving data, if size is less than {actual received USB packet size} the rest of the packet will be discarded. Later PostBufferAsync cmd(s) will only return data from new packets, not the remainder of the earlier packet(s). | | For receiving data, if size is less than {actual received USB packet size} the rest of the packet will be discarded. Later PostBufferAsync cmd(s) will only return data from new packets, not the remainder of the earlier packet(s). |
| + | |
| + | ==== Cmd1 ==== |
| + | No input/output. |
| | | |
| ==== GetCompletionEvent ==== | | ==== GetCompletionEvent ==== |
Line 414: |
Line 422: |
| | | |
| Stops in-progress data-transfer done by [[#PostBufferAsync]]. | | Stops in-progress data-transfer done by [[#PostBufferAsync]]. |
| + | |
| + | ==== Cmd5 ==== |
| + | Takes an input u8, no output. |
| + | |
| + | ==== Cmd6 ==== |
| + | No input, returns an output bool. |
| + | |
| + | ==== Cmd7 ==== |
| + | No input, returns an output handle. |
| + | |
| + | ==== Cmd8 ==== |
| + | Takes an input u64 and a handle, no output. Stubbed, just returns an error. |
| + | |
| + | ==== Cmd9 ==== |
| + | Takes an input u32 size, an u64 offset, returns an u32 urbId. Stubbed, just returns an error. |
| | | |
| = usb:hs, usb:hs:a = | | = usb:hs, usb:hs:a = |
Line 725: |
Line 748: |
| | 1 || [[#AccessCradleVdoWithReadRequest]] | | | 1 || [[#AccessCradleVdoWithReadRequest]] |
| |- | | |- |
− | | 2 || Vdm20Init || No input/output. | + | | 2 || |
− | If Cradle or RelayBox is connected, caches result of VDM 0x20.
| |
| |- | | |- |
| | 3 || [2.0.0+] GetFwType | | | 3 || [2.0.0+] GetFwType |
Line 750: |
Line 772: |
| | | |
| '''UserId''' is translated to the actual [[#VdmCommand]] to send. | | '''UserId''' is translated to the actual [[#VdmCommand]] to send. |
| + | |
| + | === Cmd2 === |
| + | No input/output. |
| + | |
| + | Sends [[#VdmCommand|VdmCommands]] 32 and 30. |
| | | |
| === GetFwType === | | === GetFwType === |
Line 762: |
Line 789: |
| === GetDeviceId === | | === GetDeviceId === |
| No input. Returns an output u16. | | No input. Returns an output u16. |
| + | |
| + | === Cmd7 === |
| + | No input. Returns an output u8. |
| + | |
| + | === Cmd8 === |
| + | No input. Returns an output u8. |
| | | |
| = usb:pd:m = | | = usb:pd:m = |
Line 1,019: |
Line 1,052: |
| | 22 || 4 || DeviceStateRequest | | | 22 || 4 || DeviceStateRequest |
| |- | | |- |
− | | 23 || || DeviceStateReply | + | | 23 || - || DeviceStateReply |
| |- | | |- |
| | 24 || 5 || McuFwVerRequest | | | 24 || 5 || McuFwVerRequest |
| |- | | |- |
− | | 25 || || McuFwVerReply | + | | 25 || - || McuFwVerReply |
| |- | | |- |
| | 26 || 6 || McuFwUpdateRequest | | | 26 || 6 || McuFwUpdateRequest |
| |- | | |- |
− | | 27 || || McuFwUpdateReply | + | | 27 || - || McuFwUpdateReply |
| |- | | |- |
| | 28 || 7 || McuFwUpdateNotice | | | 28 || 7 || McuFwUpdateNotice |