Ring-Con: Difference between revisions
No edit summary  | 
				No edit summary  | 
				||
| Line 6: | Line 6: | ||
Commands (input data for EnableJoyPollingReceiveMode / SendAndReceive) start with the u32 cmd, there's generally no data after that. Data in the replies are at least 0x4-bytes, with fields being 4-byte aligned. Reply+0 is the u8 status. When the output size doesn't match the expected size, or status is non-zero, error 0xEDA is returned. When status is non-zero, a func is called with the status value which updates global state.  | Commands (input data for EnableJoyPollingReceiveMode / SendAndReceive) start with the u32 cmd, there's generally no data after that. Data in the replies are at least 0x4-bytes, with fields being 4-byte aligned. Reply+0 is the u8 status. When the output size doesn't match the expected size, or status is non-zero, error 0xEDA is returned. When status is non-zero, a func is called with the status value which updates global state.  | ||
The status field is not listed below since all replies have it.  | |||
= CRC =  | = CRC =  | ||
| Line 11: | Line 13: | ||
This CRC doesn't use Xor(In/Out)/Reflect(In/Out). The polynomial is 0x8D.  | This CRC doesn't use Xor(In/Out)/Reflect(In/Out). The polynomial is 0x8D.  | ||
= Commands =  | |||
{| class="wikitable" border="1"  | |||
|-  | |||
! Input cmd u32 || Input cmd size || Reply size  | |||
|-  | |||
| 0x020101 || 0x4 || 0x8  | |||
|}  | |||
== 0x020101 ==  | |||
This is used with EnableJoyPollingReceiveMode/GetJoyPollingReceivedData. Reply+0x4 is an u16 which is copied to an output struct, the [[HID_services#JoyPollingReceivedData|timestamp]] is also copied.  | |||