GPIO Services: Difference between revisions

TimmSkiller (talk | contribs)
 
(13 intermediate revisions by 6 users not shown)
Line 41: Line 41:
!  Uses [[GPIO_Registers|GPIO Regs]]
!  Uses [[GPIO_Registers|GPIO Regs]]
|-
|-
| 0x0001....
| 0x00010040
| ?(u32 unk1,u32* ret)
| u32 GetRegPart1(u32 mask)
| 0x10147010, 0x10147020
| 0x10147010, 0x10147020
|-
|-
| 0x00020080
| 0x00020080
| ?(u32 unk1,u32 unk2)
| void SetRegPart1(u32 value, u32 mask)
| 0x10147010, 0x10147020
| 0x10147010, 0x10147020
|-
|-
| 0x0003....
| 0x00030040
| ?(u32 unk1,u32* ret)
| u32 GetRegPart2(u32 mask)
| 0x10147010, 0x10147024
| 0x10147010, 0x10147024
|-
|-
| 0x00040080
| 0x00040080
| ?(u32 unk1,u32 unk2)
| u32 SetRegPart2(u32 value, u32 mask)
| 0x10147010, 0x10147024
| 0x10147010, 0x10147024
|-
|-
| 0x0005....
| 0x00050040
| ?(u32 unk1,u32* ret)
| u32 GetInterruptMask(u32 mask)
| 0x10147010, 0x10147024
| 0x10147010, 0x10147024
|-
|-
| 0x00060080
| 0x00060080
| ?(u32 unk1,u32 unk2)
| void SetInterruptMask(u32 value, u32 mask)
| 0x10147010, 0x10147024
| 0x10147010, 0x10147024
|-
|-
| 0x00070040
| 0x00070040
| GetIRGPIO(u32 bitmask) Output u32 is written to cmdreply[2].
| [[GPIO:GetGPIOData|GetGPIOData]]
| 0x10147000, 0x10147010, 0x10147014, 0x10147020, 0x10147028
| 0x10147000, 0x10147010, 0x10147014, 0x10147020, 0x10147028
|-
|-
| 0x00080080
| 0x00080080
| SetIRGPIO(u32 unk1,u32 unk2)
| [[GPIO:SetGPIOData|SetGPIOData]]
| 0x10147010, 0x10147014, 0x10147020, 0x10147028
| 0x10147010, 0x10147014, 0x10147020, 0x10147028
|-
|-
Line 83: Line 83:


=GPIO Bitmask=
=GPIO Bitmask=
The bitmask used by GetIRGPIO(and likely others) determines which bits in the GPIO registers to access. The output value from GetIRGPIO uses the same format as the bitmask: the values of bits in the output field are set to the value of GPIO data when those bits are set in the input bitmask.
The bitmask used by the service commands determines which bits in the GPIO registers to access. The output value from [[GPIO:GetGPIOData|GetGPIOData]] uses the same format as the bitmask: the values of bits in the output field are set to the value of GPIO data when those bits are set in the input bitmask.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 90: Line 90:
!  Register
!  Register
!  Bits from register
!  Bits from register
!  Handled with [[GPIO:SetGPIOData]]
|-
|-
| 0-2 (0x7)
| 0-2 (0x7)
| 0x10147000
| 0x10147000
| 0-2
| 0-2
| No
|-
|-
| 3-4 (0x18)
| 3-4 (0x18)
| 0x10147010
| 0x10147010
| 0-1
| 0-1
| Yes
|-
|-
| 5 (0x20)
| 5 (0x20)
| 0x10147014
| 0x10147014
| 0
| 0
| Yes
|-
|-
| 6-17 (0x3FFC0)
| 6-17 (0x3FFC0)
| 0x10147020
| 0x10147020
| 0-11
| 0-11
| Yes
|-
|-
| 18 (0x40000)
| 18 (0x40000)
| 0x10147028
| 0x10147028
| 0
| 0
| Yes
|}
|}


Line 124: Line 130:
| 0x1
| 0x1
| gpio:HID
| gpio:HID
| ?
| HID-sysmodule
| ?
| Used with [[HID_Shared_Memory|HID]] PAD state.
|-
|-
| 1
| 1
Line 131: Line 137:
| None
| None
|  
|  
|  
| Not known to be used by ''anything'', with the latest system-version at least.
|-
|-
| 2
| 2
Line 137: Line 143:
| None
| None
|  
|  
|  
| Not known to be used by ''anything'', with the latest system-version at least.
|-
|-
| 3
| 3
Line 149: Line 155:
| None
| None
|  
|  
|  
| Not known to be used by ''anything'', with the latest system-version at least.
|-
|-
| 5
| 5
| 0x20
| 0x20
| gpio:MCU, gpio:NWM
| gpio:MCU, gpio:NWM
| ?
| NWM-sysmodule, MCU-sysmodule
| ?
| WiFi mode. 0 = CTR, 1 = "MP" (DS WiFi?)
|-
|-
| 6
| 6
Line 166: Line 172:
| 0x80
| 0x80
| gpio:IR
| gpio:IR
| ?
| Boot11
| ?
| ?
|-
|-
Line 172: Line 178:
| 0x100
| 0x100
| gpio:HID
| gpio:HID
| ?
| HID sysmodule
| ?
| Used with gyroscope
|-
|-
| 9
| 9
| 0x200
| 0x200
| gpio:HID, gpio:IR
| gpio:HID, gpio:IR
| ?
| HID-sysmodule and IR-sysmodule
| ?
| Unknown, used with ir:rst.
|-
|-
| 10
| 10
| 0x400
| 0x400
| gpio:IR
| gpio:IR
| ?
| IR-sysmodule, Boot11
| ?
| IR [[IRU:SetIRLEDState|send]]. 1 = IR LED enable, 0 = IR LED disable.
|-
|-
| 11
| 11
| 0x800
| 0x800
| gpio:IR
| gpio:IR
| ?
| IR-sysmodule
| ?
| IR [[IRU:GetIRLEDRecvState|receive]]
|-
|-
| 12
| 12
Line 208: Line 214:
| 0x4000
| 0x4000
| gpio:HID
| gpio:HID
| ?
| HID-sysmodule
| ?
| Used with [[HID_Shared_Memory|HID]]  PAD state.
|-
|-
| 15
| 15
| 0x8000
| 0x8000
| gpio:MCU
| gpio:MCU
| ?
| MCU-sysmodule
| ?
| MCU Interrupt.
|-
|-
| 16
| 16
Line 232: Line 238:
| 0x40000
| 0x40000
| gpio:MCU, gpio:NWM
| gpio:MCU, gpio:NWM
| ?
| NWM-sysmodule, MCU-sysmodule
| ?
| Wifi enable. 1=Enabled, 0=Disabled.
|}
|}