Line 1,923: |
Line 1,923: |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
| |- | | |- |
− | ! Cmd || Name || Notes | + | ! Cmd || Name |
| |- | | |- |
− | | 0 || AcquireDevice || Takes an input s32, no output. | + | | 0 || [[#AcquireDevice]] |
| |- | | |- |
− | | 1 || ReleaseDevice || Takes an input s32, no output. | + | | 1 || [[#ReleaseDevice]] |
| |- | | |- |
− | | 2 || GetCtrlSession || Takes an input u32, returns an [[#ICtrlSession]]. | + | | 2 || [[#GetCtrlSession]] |
| |- | | |- |
− | | 3 || GetReadSession || Takes an input u32, returns an [[#IReadSession]]. | + | | 3 || [[#GetReadSession]] |
| |- | | |- |
− | | [1.0.0-2.3.0] 4 || GetWriteSession || Takes an input u32, returns an [[#IWriteSession]]. | + | | 4 || [1.0.0-2.3.0] [[#GetWriteSession]] |
| |} | | |} |
| + | |
| + | == AcquireDevice == |
| + | Takes an input s32, no output. |
| + | |
| + | == ReleaseDevice == |
| + | Takes an input s32, no output. |
| + | |
| + | == GetCtrlSession == |
| + | Takes an input u32, returns an [[#ICtrlSession]]. |
| + | |
| + | == GetReadSession == |
| + | Takes an input u32, returns an [[#IReadSession]]. |
| + | |
| + | == GetWriteSession == |
| + | Takes an input u32, returns an [[#IWriteSession]]. |
| | | |
| == ICtrlSession == | | == ICtrlSession == |
Line 1,943: |
Line 1,958: |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
| |- | | |- |
− | ! Cmd || Name || Notes | + | ! Cmd || Name |
| |- | | |- |
− | | 0 || GetString || | + | | 0 || GetString |
| |- | | |- |
− | | 1 || GetCodeBook || | + | | 1 || GetCodeBook |
| |- | | |- |
− | | 2 || GetReport || | + | | 2 || GetReport |
| |- | | |- |
− | | 3 || SetReport || | + | | 3 || SetReport |
| |- | | |- |
− | | 4 || GetIdle || | + | | 4 || GetIdle |
| |- | | |- |
− | | 5 || SetIdle || | + | | 5 || SetIdle |
| |- | | |- |
− | | 6 || GetProtocol || | + | | 6 || GetProtocol |
| |- | | |- |
− | | 7 || SetProtocol || | + | | 7 || SetProtocol |
| |- | | |- |
− | | 8 || GetDescriptor || | + | | 8 || GetDescriptor |
| |- | | |- |
− | | 9 || SetDescriptor || | + | | 9 || SetDescriptor |
| |- | | |- |
− | | 10 || GetStateChangeEvent || | + | | 10 || GetStateChangeEvent |
| |- | | |- |
− | | 11 || SignalStateChangeEvent || | + | | 11 || SignalStateChangeEvent |
| |- | | |- |
− | | 12 || [3.0.0+] Write || | + | | 12 || [3.0.0+] Write |
| |} | | |} |
| | | |
− | All of these use USB [[USB_services|CtrlXfer]], except for cmd10-11 which are event(?) related, and cmd1 which copies 0x4000-bytes from state to output. | + | All of these use USB [[USB_services|CtrlXfer]], except for GetStateChangeEvent and SignalStateChangeEvent, and GetCodeBook which copies 0x4000-bytes from state to output. |
| | | |
| == IReadSession == | | == IReadSession == |
Line 1,981: |
Line 1,996: |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
| |- | | |- |
− | ! Cmd || Name || Notes | + | ! Cmd || Name |
| |- | | |- |
− | | 0 || Read || | + | | 0 || [[#Read]] |
| |} | | |} |
| | | |
− | Cmd0 uses [[USB_services|PostBufferAsync]] etc with the INPUT endpoint. The size must be <=0x1000. The actual transfer size is returned in an output u64. The data is copied from the tmpbuf to the output buffer using the actual-transfer-size.
| + | === Read === |
| + | Uses [[USB_services|PostBufferAsync]] etc with the INPUT endpoint. The size must be <=0x1000. The actual transfer size is returned in an output u64. The data is copied from the tmpbuf to the output buffer using the actual-transfer-size. |
| | | |
− | [3.0.0+] Cmd0 now takes a total of 8-bytes of input. | + | [3.0.0+] Now takes a total of 8-bytes of input. |
| | | |
| == IWriteSession == | | == IWriteSession == |
Line 1,997: |
Line 2,013: |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
| |- | | |- |
− | ! Cmd || Name || Notes | + | ! Cmd || Name |
| |- | | |- |
− | | 0 || Write || This is the inverse of [[#IReadSession]] cmd0. Uses the OUTPUT endpoint with an input buffer. | + | | 0 || [[#Write]] |
| |} | | |} |
| + | |
| + | === Write === |
| + | This is the inverse of [[#IReadSession]] cmd0. Uses the OUTPUT endpoint with an input buffer. |
| | | |
| = ahid:hdr = | | = ahid:hdr = |