Difference between revisions of "IR Services"
(Please don't use '0000' for cmd-hdr low 16bits when you don't know what the actual cmd-hdr low value is.) |
|||
Line 72: | Line 72: | ||
| InitializeIrnop | | InitializeIrnop | ||
|- | |- | ||
− | | | + | | 0x0002.... |
| | | | ||
| FinalizeIrnop | | FinalizeIrnop | ||
|- | |- | ||
− | | | + | | 0x0003.... |
| | | | ||
| ClearReceiveBuffer | | ClearReceiveBuffer | ||
|- | |- | ||
− | | | + | | 0x0004.... |
| | | | ||
| ClearSendBuffer | | ClearSendBuffer | ||
|- | |- | ||
− | | | + | | 0x0005.... |
| | | | ||
| WaitConnection | | WaitConnection | ||
|- | |- | ||
− | | | + | | 0x0006.... |
| | | | ||
| RequireConnection | | RequireConnection | ||
|- | |- | ||
− | | | + | | 0x0007.... |
| | | | ||
| AutoConnection | | AutoConnection | ||
|- | |- | ||
− | | | + | | 0x0008.... |
| | | | ||
| AnyConnection | | AnyConnection | ||
|- | |- | ||
− | | | + | | 0x0009.... |
| | | | ||
| Disconnect | | Disconnect | ||
|- | |- | ||
− | | | + | | 0x000A.... |
| | | | ||
| GetReceiveEvent | | GetReceiveEvent | ||
|- | |- | ||
− | | | + | | 0x000B.... |
| | | | ||
| GetSendEvent | | GetSendEvent | ||
|- | |- | ||
− | | | + | | 0x000C.... |
| | | | ||
| GetConnectionStatusEvent | | GetConnectionStatusEvent | ||
|- | |- | ||
− | | | + | | 0x000D.... |
| | | | ||
| SendIrnop | | SendIrnop | ||
|- | |- | ||
− | | | + | | 0x000E.... |
| | | | ||
| SendIrnopLarge | | SendIrnopLarge | ||
|- | |- | ||
− | | | + | | 0x000F.... |
| | | | ||
| ReceiveIrnop | | ReceiveIrnop | ||
|- | |- | ||
− | | | + | | 0x0010.... |
| | | | ||
| ReceiveIrnopLarge | | ReceiveIrnopLarge | ||
|- | |- | ||
− | | | + | | 0x0011.... |
| | | | ||
| GetLatestReceiveErrorResult | | GetLatestReceiveErrorResult | ||
|- | |- | ||
− | | | + | | 0x0012.... |
| | | | ||
| GetLatestSendErrorResult | | GetLatestSendErrorResult | ||
|- | |- | ||
− | | | + | | 0x0013.... |
| | | | ||
| GetConnectionStatus | | GetConnectionStatus | ||
|- | |- | ||
− | | | + | | 0x0014.... |
| | | | ||
| GetTryingToConnectStatus | | GetTryingToConnectStatus | ||
|- | |- | ||
− | | | + | | 0x0015.... |
| | | | ||
| GetReceiveSizeFreeAndUsed | | GetReceiveSizeFreeAndUsed | ||
|- | |- | ||
− | | | + | | 0x0016.... |
| | | | ||
| GetSendSizeFreeAndUsed | | GetSendSizeFreeAndUsed | ||
|- | |- | ||
− | | | + | | 0x0017.... |
| Unknown, >[[2.0.0-2]] | | Unknown, >[[2.0.0-2]] | ||
| GetConnectionRole | | GetConnectionRole | ||
Line 168: | Line 168: | ||
| ReleaseReceivedData | | ReleaseReceivedData | ||
|- | |- | ||
− | | | + | | 0x001A.... |
| Unknown, >[[2.0.0-2]] | | Unknown, >[[2.0.0-2]] | ||
| SetOwnMachineId | | SetOwnMachineId |
Revision as of 17:36, 27 November 2014
IR Service "ir:u"
Command Header | Description |
---|---|
0x00010000 | Initialize |
0x00020000 | Shutdown |
0x00030042 | StartSendTransfer |
0x00040000 | WaitSendTransfer |
0x000500C2 | StartRecvTransfer |
0x00060000 | WaitRecvTransfer |
0x00070000 | GetRecvTransferCount |
0x00080000 | GetSendState |
0x00090040 | SetBitRate |
0x000A0000 | GetBitRate |
0x000B0040 | SetIRLEDState |
0x000C0000 | GetIRLEDRecvState |
0x000D0000 | GetSendFinishedEvent |
0x000E0000 | GetRecvFinishedEvent |
0x000F0000 | GetTransferState |
0x00100000 | GetErrorStatus |
0x00110040 | SetSleepModeActive |
0x00120040 | SetSleepModeState |
IR Service "ir:USER"
Command Header | Available since system version | Description |
---|---|---|
0x00010182 | InitializeIrnop | |
0x0002.... | FinalizeIrnop | |
0x0003.... | ClearReceiveBuffer | |
0x0004.... | ClearSendBuffer | |
0x0005.... | WaitConnection | |
0x0006.... | RequireConnection | |
0x0007.... | AutoConnection | |
0x0008.... | AnyConnection | |
0x0009.... | Disconnect | |
0x000A.... | GetReceiveEvent | |
0x000B.... | GetSendEvent | |
0x000C.... | GetConnectionStatusEvent | |
0x000D.... | SendIrnop | |
0x000E.... | SendIrnopLarge | |
0x000F.... | ReceiveIrnop | |
0x0010.... | ReceiveIrnopLarge | |
0x0011.... | GetLatestReceiveErrorResult | |
0x0012.... | GetLatestSendErrorResult | |
0x0013.... | GetConnectionStatus | |
0x0014.... | GetTryingToConnectStatus | |
0x0015.... | GetReceiveSizeFreeAndUsed | |
0x0016.... | GetSendSizeFreeAndUsed | |
0x0017.... | Unknown, >2.0.0-2 | GetConnectionRole |
0x00180182 | Unknown, >2.0.0-2 | InitializeIrnopShared |
0x00190040 | Unknown, >2.0.0-2 | ReleaseReceivedData |
0x001A.... | Unknown, >2.0.0-2 | SetOwnMachineId |
IR Service "ir:rst"
Command Header | Available since system-version | Description |
---|---|---|
0x00010000 | 8.0.0-18 | GetHandles |
0x00020080 | 8.0.0-18 | Initialize |
0x00030000 | 8.0.0-18 | Shutdown |
0x00040000 | 8.0.0-18 | This writes an unknown u8 to index-word cmdreply[2], from data loaded from an I2C device register. |
0x00050000 | 8.0.0-18 | This writes an unknown u8 from IR-module state to index-word cmdreply[2]. |
0x00060000 | 8.0.0-18 | This writes two unknown u8 fields from IR-module state to index-word cmdreply[2] and cmdreply[3]. |
0x00070080 | 9.0.0-20 | (u8 unk0, u8 unk1) ? |
0x00080000 | 9.0.0-20 | (u8 unk0, u8 unk1) ? |
0x00090000 | 9.0.0-20 | This writes two unknown u8 fields to index-word cmdreply[2] and cmdreply[3]. |
This service was added with 8.0.0-18. Unlike the other IR services, this uses I2C deviceid 17(this deviceid isn't actually handled by the 8.0.0-18 I2C module). This is for the additional New 3DS HID hardware, this HID data is stored in shared-memory. Even with 9.0.0-20 IR module still registers+handles this service on both Old3DS+New3DS.
IR Services
Only one session(two sessions starting with 8.0.0-18) to any of these services can be open at a time, thus only one/two process(es) can use any of these services at once. These services interface with hardware services gpio::IR and i2c::IR. The i2c::IR service is used for sending/receiving data.
IRU is for regular IR comms. IRUSER uses a custom IR protocol(above the physical layer). Both of these services use IrDA-SIR. The IR hardware seems to only support IrDA-SIR, other physical protocols such as the one for TV-remotes are not supported(going by the datasheet linked here for a different IC at least).
The protocol used with IRUSER involves encryption(?) implemented in software. IRUSER is used for the Circle Pad Pro. This same IRUSER service uses the New3DS HID hardware when running on New3DS(note that the main service for New3DS HID is ir:rst).