I2C Services: Difference between revisions

No edit summary
add link between 0x00150080 , IR service, and ZL + ZR + Cstick
 
(6 intermediate revisions by 6 users not shown)
Line 6: Line 6:
!  Notes
!  Notes
!  Accessible [[I2C_Registers|deviceIDs]]
!  Accessible [[I2C_Registers|deviceIDs]]
!  Service used by sysmodule
|-
|-
| "i2c::MCU"
| "i2c::MCU"
|  
|  
| 0, 3
| 0, 3
| [[MCU_Services|MCU]]
|-
|-
| "i2c::CAM"
| "i2c::CAM"
|  
|  
| 1, 2, 4
| 1, 2, 4
| [[Camera_Services|Camera]]
|-
|-
| "i2c::LCD"
| "i2c::LCD"
|  
|  
| 5, 6
| 5, 6
| [[GSP_Services|GSP]]
|-
|-
| "i2c::DEB"
| "i2c::DEB"
|  
|  
| 7, 8
| 7, 8
| Unknown
|-
|-
| "i2c::HID"
| "i2c::HID"
|  
|  
| 9, 10, 11, 12
| 9, 10, 11, 12
| [[HID_Services|HID]]
|-
|-
| "i2c::IR"
| "i2c::IR"
|  
|  
| 13, and additionally for New3DS i2c module: 17
| 13, and additionally for New3DS i2c module: 17
| [[IR_Services|IR]]
|-
|-
| "i2c::EEP"
| "i2c::EEP"
|  
|  
| 14
| 14
| [[Config_Services|Cfg]]
|-
|-
| "i2c::NFC"
| "i2c::NFC"
| Only available via the New3DS i2c sysmodule.
| Only available via the New3DS i2c sysmodule.
| 15
| 15
| New3DS [[NFC_Services|NFC]]
|-
|-
| "i2c::QTM"
| "i2c::QTM"
| Only available via the New3DS i2c sysmodule.
| Only available via the New3DS i2c sysmodule.
| 16
| 16
| New3DS [[QTM_Services|QTM]]
|}
|}


Line 73: Line 83:
| WriteRegister8 (u8 devid, u8 regid, u8 regdata)
| WriteRegister8 (u8 devid, u8 regid, u8 regdata)
|-
|-
| 0x0006....
| 0x00060080
|  
|  
| WriteCommand8 (u8 devid, u8 cmdid)
| WriteCommand8 (u8 devid, u8 cmdid)
|-
|-
| 0x0007....
| 0x000700C0
|  
|  
| WriteRegister16 (u8 devid, u16 regid, u16 regdata)
| WriteRegister16 (u8 devid, u8 regid, u16 regdata)
|-
|-
| 0x000800C2
| 0x000800C2
Line 85: Line 95:
| MultiWriteRegister16 (u16 regid, u16 regdata, devcount, u8* devidlistptr)
| MultiWriteRegister16 (u16 regid, u16 regdata, devcount, u8* devidlistptr)
|-
|-
| 0x0009....
| 0x00090080
|  
|  
| u8 ReadRegister8 (u8 devid, u8 regid)
| u8 ReadRegister8 (u8 devid, u8 regid)
|-
|-
| 0x000A....
| 0x000A0080
|  
|  
| u16 ReadRegister16 (u8 devid, u16 regid)
| u16 ReadRegister16 (u8 devid, u8 regid)
|-
|-
| 0x000B00C2
| 0x000B00C2
Line 107: Line 117:
| 0x000E00C2
| 0x000E00C2
|  
|  
| WriteRegisterBuffer8_again? (u8 devid, u8 regid, buffersize, u8* bufferptr)
| WriteRegisterBuffer (u8 devid, u8 regid, unused (bufsize?), (bufsize << 14) <nowiki>|</nowiki> 0x402, void* buffer)
|-
|-
| 0x000F....
| 0x000F00C0
|
|  
|  
| ReadRegisterBuffer (u8 devid, u8 regid, min(bufsize, 0x20)), +0x180: (bufsize << 14) <nowiki>|</nowiki> 2, void* buffer
|-
|-
| 0x0010....
| 0x001000C0
|
|  
|  
| ReadEEPROM (u8 devid = 14, u16 blockid, min(bufsize >> 1, 0x10)), +0x180: (bufsize << 15) <nowiki>|</nowiki> 2, u16* buffer
|-
|-
| 0x001100C2
| 0x001100C2
|  
|  
| ReadRegisterBuffer(u8 devid, u16 regid, buffersize, u8 *buff)
| WriteRegisterBuffer(u8 devid, u8 regid, buffersize, u8 *buff)
|-
|-
| 0x001200C2
| 0x001200C2
|  
|  
| WriteRegisterBuffer(u8 devid, u16 regid, buffersize, u8 *buff)
| ReadRegisterBuffer(u8 devid, u8 regid, buffersize, u8 *buff)
|-
|-
| 0x00130040
| 0x00130040
Line 138: Line 148:
|}
|}


Commands 0x00130040..0x00150080 are only usable with the New3DS i2c module: on Old3DS the actual command-handler function for each of these commands just return an error. Commands 0x00140082 and 0x00150080 are used by [[NFC_Services|NFC]] module.
Commands 0x00130040..0x00150080 are only usable with the New3DS i2c module: on Old3DS the actual command-handler function for each of these commands just return an error. Commands 0x00140082 and 0x00150080 are used by [[NFC_Services|NFC]] module. Command 0x00150080 is also used for reading ZL, ZR, and C-stick data by [[IR Services]].