I2C Services: Difference between revisions

TimmSkiller (talk | contribs)
Rework table to link to command pages
TimmSkiller (talk | contribs)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Services]]
[[Category:Services]]
= I2C Service Names =
__FORCETOC__
== I2C Service Names ==
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
!  Service names
!  Service names
!  Notes
!  Accessible [[I2C_Registers#I2C_Devices|deviceIDs]]
!  Accessible [[I2C_Registers|deviceIDs]]
!  Service used by sysmodule
!  Service used by sysmodule
|-
|-
| "i2c::MCU"
| "i2c::MCU"
|
| 0, 3
| 0, 3
| [[MCU_Services|MCU]]
| [[MCU_Services|MCU]]
|-
|-
| "i2c::CAM"
| "i2c::CAM"
|
| 1, 2, 4
| 1, 2, 4
| [[Camera_Services|Camera]]
| [[Camera_Services|Camera]]
|-
|-
| "i2c::LCD"
| "i2c::LCD"
|
| 5, 6
| 5, 6
| [[GSP_Services|GSP]]
| [[GSP_Services|GSP]]
|-
|-
| "i2c::DEB"
| "i2c::DEB"
|
| 7, 8
| 7, 8
| Unknown
| dmnt
|-
|-
| "i2c::HID"
| "i2c::HID"
|
| 9, 10, 11, 12
| 9, 10, 11, 12
| [[HID_Services|HID]]
| [[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]]
| [[IR_Services|IR]]
|-
|-
| "i2c::EEP"
| "i2c::EEP"
|
| 14
| 14
| [[Config_Services|Cfg]]
| [[Config_Services|Cfg]]
|-
| colspan="3" |
New3DS-sysmodule specific services:
|-
|-
| "i2c::NFC"
| "i2c::NFC"
| Only available via the New3DS i2c sysmodule.
| 15
| 15
| New3DS [[NFC_Services|NFC]]
| New3DS [[NFC_Services|NFC]]
|-
|-
| "i2c::QTM"
| "i2c::QTM"
| Only available via the New3DS i2c sysmodule.
| 16
| 16
| New3DS [[QTM_Services|QTM]]
| New3DS [[QTM_Services|QTM]]
|}
|}


Each I2C service can only access certain I2C [[I2C_Registers|device(s)]]. When the specified deviceid isn't accessible, error 0xE0A02FEA is returned.
Each I2C service can only access certain I2C [[I2C_Registers|device(s)]].


= I2C Service =
== Commands ==
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
!  Command Header !! Description !! Available since system-version
!  Command Header !! Description !! Available since system-version
|-
|-
| 0x00010100 || [[I2C:SetRegisterBits8|SetRegisterBits8]] || All
| 0x00010100 || [[I2C:ReplaceRegisterBits8|ReplaceRegisterBits8]] || All
|-
|-
| 0x000200C0 || [[I2C:EnableRegisterBits8|EnableRegisterBits8]] || All
| 0x000200C0 || [[I2C:SetRegisterBits8|SetRegisterBits8]] || All
|-
|-
| 0x000300C0 || [[I2C:DisableRegisterBits8|DisableRegisterBits8]] || All
| 0x000300C0 || [[I2C:ClearRegisterBits8|ClearRegisterBits8]] || All
|-
|-
| 0x00040102 || [[I2C:MultiSetRegisterBits16|MultiSetRegisterBits16]] || All
| 0x00040102 || [[I2C:MultiReplaceRegisterBits16|MultiReplaceRegisterBits16]] || All
|-
|-
| 0x000500C0 || [[I2C:WriteRegister8|WriteRegister8]] || All
| 0x000500C0 || [[I2C:WriteRegister8|WriteRegister8]] || All
|-
|-
| 0x00060080 || [[I2C:WriteCommand8|WriteCommand8]] || All
| 0x00060080 || [[I2C:WriteDeviceRaw8|WriteDeviceRaw8]] || All
|-
|-
| 0x000700C0 || [[I2C:WriteRegister16|WriteRegister16]] || All
| 0x000700C0 || [[I2C:WriteRegister16|WriteRegister16]] || All
Line 87: Line 82:
| 0x000D00C0 || [[I2C:ReadRegisters8|ReadRegisters8]] || All
| 0x000D00C0 || [[I2C:ReadRegisters8|ReadRegisters8]] || All
|-
|-
| 0x000E00C2 || [[I2C:WriteRegisterBuffer|WriteRegisterBuffer]] || All
| 0x000E00C2 || [[I2C:WriteRegisters8_2|WriteRegisters8_2]] || All
|-
| 0x000F00C0 || [[I2C:LegacyReadRegisters8|LegacyReadRegisters8]] || All
|-
|-
| 0x000F00C0 || [[I2C:ReadRegisterBuffer|ReadRegisterBuffer]] || All
| 0x001000C0 || [[I2C:ReadRegisters16|ReadRegisters16]] || All
|-
|-
| 0x001000C0 || [[I2C:ReadEEPROM|ReadEEPROM]] || All
| 0x001100C2 || [[I2C:WriteRegistersBuffer8|WriteRegistersBuffer8]] || All
|-
|-
| 0x001100C2 || [[I2C:WriteRegisterBuffer|WriteRegisterBuffer]] || All
| 0x001200C2 || [[I2C:ReadRegistersBuffer8|ReadRegistersBuffer8]] || All
|-
|-
| 0x001200C2 || [[I2C:ReadRegisterBuffer|ReadRegisterBuffer]] || All
| colspan="3" |
and, for the New3DS-specific version of the sysmodule (though technically the Old3DS supports these commands as well):
 
|-
|-
| 0x00130040 || [[I2C:ReadDeviceRaw8|ReadDeviceRaw8]] || [[8.0.0-18]]  
| 0x00130040 || [[I2C:ReadDeviceRaw8|ReadDeviceRaw8]] || [[8.0.0-18]]  
Line 104: Line 103:
|}
|}


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]].
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]].
 
== Common Result Values ==
{| class="wikitable" border="1"
|-
! Result code !! Description
|-
| 0xE0A02FEA || The current session is not permitted to access the specified device ID.
|-
| 0xF9602FEF || Communication error. Device may not be connected.
|}