GPIO Services

GPIO Services

GPIO Service Names #

Service namePermitted GPIO bitmasks
gpio:CDC0x48
gpio:MCU0x48020
gpio:HID0x4301
gpio:NWM0x40020
gpio:IR0xEC0
gpio:NFC0x13000
gpio:QTM0x20000

For the mapping between GPIO bitmasks and IRQs see: GPIO:BindInterrupt#Supported_values.

The commands for these services are identical.

The input bitmask for each command is masked with the above permission bitmask, if the result is non-zero an error is occurred.

GPIO Services #

Command HeaderDescriptionUses GPIO Regs
0x00010040u32 GetRegPart1(u32 mask)0x10147010, 0x10147020
0x00020080void SetRegPart1(u32 value, u32 mask)0x10147010, 0x10147020
0x00030040u32 GetRegPart2(u32 mask)0x10147010, 0x10147024
0x00040080u32 SetRegPart2(u32 value, u32 mask)0x10147010, 0x10147024
0x00050040u32 GetInterruptMask(u32 mask)0x10147010, 0x10147024
0x00060080void SetInterruptMask(u32 value, u32 mask)0x10147010, 0x10147024
0x00070040GetGPIOData0x10147000, 0x10147010, 0x10147014, 0x10147020, 0x10147028
0x00080080SetGPIOData0x10147010, 0x10147014, 0x10147020, 0x10147028
0x00090082BindInterruptNone
0x000A0042UnbindInterruptNone

GPIO Bitmask #

The bitmask used by the service commands determines which bits in the GPIO registers to access. The output value from 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.

Bits in the bitmaskRegisterBits from registerHandled with GPIO:SetGPIOData
0-2 (0x7)0x101470000-2No
3-4 (0x18)0x101470100-1Yes
5 (0x20)0x101470140Yes
6-17 (0x3FFC0)0x101470200-11Yes
18 (0x40000)0x101470280Yes

GPIO Bits #

BitBitmaskAccessible via GPIO serviceUsed byDescription
00x1gpio:HIDHID-sysmoduleUsed with HID PAD state.
10x2NoneNot known to be used by anything, with the latest system-version at least.
20x4NoneNot known to be used by anything, with the latest system-version at least.
30x8gpio:CDC??
40x10NoneNot known to be used by anything, with the latest system-version at least.
50x20gpio:MCU, gpio:NWM??
60x40gpio:CDC, gpio:IR??
70x80gpio:IRBoot11?
80x100gpio:HIDHID sysmoduleUsed with gyroscope
90x200gpio:HID, gpio:IRHID-sysmodule and IR-sysmoduleUnknown, used with ir:rst.
100x400gpio:IRIR-sysmodule, Boot11IR send. 1 = IR LED enable, 0 = IR LED disable.
110x800gpio:IRIR-sysmoduleIR receive
120x1000gpio:NFC??
130x2000gpio:NFC??
140x4000gpio:HIDHID-sysmoduleUsed with HID PAD state.
150x8000gpio:MCU??
160x10000gpio:NFC??
170x20000gpio:QTM??
180x40000gpio:MCU, gpio:NWMNWM-sysmoduleWifi enable. 1=Enabled, 0=Disabled.

Category:Services