USB services: Difference between revisions
No edit summary |
No edit summary |
||
Line 187: | Line 187: | ||
| 4 || [[#DisableInterface]] || | | 4 || [[#DisableInterface]] || | ||
|- | |- | ||
| 5 || || | | 5 || [[#CtrlInPostBufferAsync]] || | ||
|- | |- | ||
| 6 || || | | 6 || [[#CtrlOutPostBufferAsync]] || | ||
|- | |- | ||
| 7 || [[#GetCtrlInCompletionEvent]] || | | 7 || [[#GetCtrlInCompletionEvent]] || | ||
|- | |- | ||
| 8 || || | | 8 || [[#GetCtrlInReportData]] || | ||
|- | |- | ||
| 9 || [[#GetCtrlOutCompletionEvent]] || | | 9 || [[#GetCtrlOutCompletionEvent]] || | ||
|- | |- | ||
| 10 || || | | 10 || [[#GetCtrlOutReportData]] || | ||
|- | |- | ||
| 11 || [[#StallCtrl]] || | | 11 || [[#StallCtrl]] || | ||
|} | |} | ||
Commands [[#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 223: | Line 225: | ||
=== DisableInterface === | === DisableInterface === | ||
Takes no arguments. Disables the current interface. | Takes no arguments. Disables the current interface. | ||
=== CtrlInPostBufferAsync === | |||
Same as [[#PostBufferAsync]](with same input/output), except this uses control input endpoint 0x80. | |||
=== CtrlOutPostBufferAsync === | |||
Same as [[#PostBufferAsync]](with same input/output), except this uses control output endpoint 0x00. | |||
=== GetCtrlInCompletionEvent === | === GetCtrlInCompletionEvent === | ||
Returns an event handle for polling the completion of input control commands. | Returns an event handle for polling the completion of input control commands. Same as [[#GetCompletionEvent]], except this uses control input endpoint 0x80. | ||
=== GetCtrlInReportData === | |||
Same as [[#GetReportData]](with same input/output), except this uses control input endpoint 0x80. | |||
=== GetCtrlOutCompletionEvent === | === GetCtrlOutCompletionEvent === | ||
Returns an event handle for polling the completion of output control commands. | Returns an event handle for polling the completion of output control commands. Same as [[#GetCompletionEvent]], except this uses control output endpoint 0x00. | ||
=== GetCtrlOutReportData === | |||
Same as [[#GetReportData]](with same input/output), except this uses control output endpoint 0x00. | |||
=== StallCtrl === | === StallCtrl === | ||
Line 244: | Line 258: | ||
| 1 || || No input/output. | | 1 || || No input/output. | ||
|- | |- | ||
| 2 || || | | 2 || [[#GetCompletionEvent]] || | ||
|- | |- | ||
| 3 || [[#GetReportData]] || | | 3 || [[#GetReportData]] || | ||
Line 255: | Line 269: | ||
==== PostBufferAsync ==== | ==== PostBufferAsync ==== | ||
Takes an u32 ('''size''') and an u64 ('''buffer'''). Returns an output u32. | Takes an u32 ('''size''') and an u64 ('''buffer'''). Returns an output u32. | ||
The buffer address must be 0x1000-byte aligned. | |||
Used for data-transfer with input/output endpoints. | |||
==== GetCompletionEvent ==== | |||
No input. Returns an output event handle for polling the completion of [[#PostBufferAsync]](?). | |||
==== GetReportData ==== | ==== GetReportData ==== | ||
Returns 0x84 bytes of report data from the endpoint. | No input. Returns 0x84 bytes of report data from the endpoint. | ||
==== Stall ==== | ==== Stall ==== |