Difference between revisions of "Bus services"

From Nintendo Switch Brew
Jump to navigation Jump to search
 
(99 intermediate revisions by 7 users not shown)
Line 12: Line 12:
 
| 2 || [[#OpenSessionForTest]]
 
| 2 || [[#OpenSessionForTest]]
 
|-
 
|-
| 3 || IsWakeEventActive  
+
| 3 || [1.0.0-6.2.0] [[#IsWakeEventActive]]
 
|-
 
|-
| 4 || GetWakeEventActiveFlagSet
+
| 4 || [1.0.0-6.2.0] GetWakeEventActiveFlagSet
 
|-
 
|-
| 5 || SetWakeEventActiveFlagSetForDebug
+
| 5 || [1.0.0-6.2.0] SetWakeEventActiveFlagSetForDebug
 
|-
 
|-
| 6 || SetWakePinDebugMode
+
| 6 || [[#SetWakePinDebugMode]]
 
|-
 
|-
 
| 7 || [5.0.0+] [[#OpenSession2]]
 
| 7 || [5.0.0+] [[#OpenSession2]]
 
|-
 
|-
| 8 || [5.0.0+] IsWakeEventActive2
+
| 8 || [5.0.0+] [[#IsWakeEventActive2]]
 
|-
 
|-
 
| 9 || [5.0.0+] SetWakeEventActiveFlagSetForDebug2
 
| 9 || [5.0.0+] SetWakeEventActiveFlagSetForDebug2
 +
|-
 +
| 10 || [6.0.0+] [[#SetRetryValues]]
 
|}
 
|}
  
== Known Devices ==
+
== OpenSessionForDev ==
{| class="wikitable sortable" border="1"
+
Takes a raw [[#GpioPadDescriptor]] and returns an [[#IPadSession]].
 +
 
 +
== OpenSession ==
 +
Same as [[#OpenSessionForDev]] except it takes a [[#GpioPadName]] which is then converted to a [[#GpioPadDescriptor]]. Returns an [[#IPadSession]].
 +
 
 +
== OpenSessionForTest ==
 +
Same as [[#OpenSession]] but panics on failure.
 +
 
 +
== IsWakeEventActive ==
 +
Takes a [[#GpioPadName]] and returns a bool.
 +
 
 +
== SetWakePinDebugMode ==
 +
Takes an u32 '''WakePinDebugMode'''. No output.
 +
 
 +
== OpenSession2 ==
 +
Same as [[#OpenSession]] but takes a [[#GpioPadName|DeviceCode]] and an input u32 [[#AccessMode]].
 +
 
 +
== IsWakeEventActive2 ==
 +
Same as [[#IsWakeEventActive]] but takes a [[#GpioPadName|DeviceCode]].
 +
 
 +
== SetRetryValues ==
 +
Stubbed. Returns 0.
 +
 
 +
== IPadSession ==
 +
This is "nn::gpio::IPadSession".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
! GpioPadName || GpioPadDescriptor || Tegra (port, pin) || Usage || Direction || Used by
+
! Cmd || Name
 
|-
 
|-
| 0x01 || 0xCC || Z, 4 || Audio Codec (ALC5639) Power || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[Audio services]], [[Fatal services]])
+
| 0 || SetDirection
 
|-
 
|-
| 0x02 || 0x24 || E, 4 || SDCard Power || Out || Icosa, Copper, Hoag, [5.0.0+] Mariko <br>([[Filesystem services]])
+
| 1 || GetDirection
 
|-
 
|-
| 0x03 || 0x3C || H, 4 || BT_RST_PH4 || Out || Icosa, Copper, Hoag, [5.0.0+] Mariko <br>([[Bluetooth Driver services]])
+
| 2 || SetInterruptMode
 
|-
 
|-
| 0x04 || 0xDA || BB, 2 || || In || Icosa, Hoag, [5.0.0+] Mariko
+
| 3 || GetInterruptMode
 
|-
 
|-
| 0x05 || 0xDB || BB, 3 || GcAsic Power || Out || Icosa, Copper, Hoag, [5.0.0+] Mariko <br>([[Filesystem services]])
+
| 4 || SetInterruptEnable
 
|-
 
|-
| 0x06 || 0xDC || BB, 4 || Headphone Detect || In || Icosa, Hoag, [5.0.0+] Mariko <br>([[Audio services]])
+
| 5 || GetInterruptEnable
 
|-
 
|-
| 0x07 || 0x25 || E, 5 || || Out || Icosa, Copper, Hoag
+
| 6 || GetInterruptStatus
 
|-
 
|-
| 0x08 || 0x90 || S, 0 || DebugPadDriver || In || Icosa, Hoag, [5.0.0+] Mariko <br>([[HID services]])
+
| 7 || ClearInterruptStatus
 
|-
 
|-
| 0x09 || 0x91 || S, 1 || || In || Icosa, Hoag, [5.0.0+] Mariko
+
| 8 || SetValue
 
|-
 
|-
| 0x0A || 0x96 || S, 6 || Charger IC (BQ24193) Charge Enable || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[PTM services]])
+
| 9 || GetValue
 
|-
 
|-
| 0x0B || 0x97 || S, 7 || CPU fan sampling || In || Icosa, Hoag, [5.0.0+] Mariko
+
| 10 || BindInterrupt
 
|-
 
|-
| 0x0C || 0x26 || E, 6 || Joy-Con(L) IsAttached (insertion, Joy-Con pin 5/console TX, pulled low on insert?) || In || Icosa, Hoag, [5.0.0+] Mariko <br>([[HID services]])
+
| 11 || UnbindInterrupt
 
|-
 
|-
| 0x0D || 0x05 || A, 5 || Fan enable (normal) || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[PTM services]])
+
| 12 || SetDebounceEnabled
 
|-
 
|-
| 0x0E || 0x78 || P, 0 || SDMMC3_CLK_PP0? || In || Icosa, Hoag, [5.0.0+] Mariko
+
| 13 || GetDebounceEnabled
 
|-
 
|-
| 0x0F || 0x93 || S, 3 || GcAsic IRQ || In || Icosa, Copper, Hoag, [5.0.0+] Mariko <br>([[Filesystem services]])
+
| 14 || SetDebounceTime
 
|-
 
|-
| 0x10 || 0x7D || P, 5 || SDMMC3_DAT0_PP5? || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 15 || GetDebounceTime
 
|-
 
|-
| 0x11 || 0x7C || P, 4 || SDMMC3_DAT1_PP4? || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 16 || [4.0.0+] SetValueForSleepState
 
|-
 
|-
| 0x12 || 0x7B || P, 3 || SDMMC3_DAT2_PP3? || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 17 || [6.0.0+] GetValueForSleepState
 +
|}
 +
 
 +
= i2c, i2c:pcv =
 +
This is "nn::i2c::IManager".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x13 || 0x7A || P, 2 || SDMMC3_DAT3_PP2? || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
! Cmd || Name
 
|-
 
|-
| 0x14 || 0xBC || X, 4 || Temperature Sensor || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 0 || [[#OpenSessionForDev_2|OpenSessionForDev]]
 
|-
 
|-
| 0x15 || 0xAE || V, 6 || || In || Icosa, Hoag, [5.0.0+] Mariko <br>([[Audio services]])
+
| 1 || [[#OpenSession_2|OpenSession]]
 
|-
 
|-
| 0x16 || 0xBA || X, 2 || MOTION_INT_PX2? || In || Icosa, Hoag, [5.0.0+] Mariko
+
| 2 || [1.0.0-5.1.0] [[#HasDevice|HasDevice]]
 
|-
 
|-
| 0x17 || 0xB9 || X, 1 || TouchPanel IRQ (TOUCH_INT_PX1) (unused - polled instead) || In || Icosa, Hoag, [5.0.0+] Mariko <br>([[HID services]])
+
| 3 || [1.0.0-5.1.0] [[#HasDeviceForDev|HasDeviceForDev]]
 
|-
 
|-
| 0x18 || 0xBD || X, 5 || Power Button (BUTTON_POWER_ON_PX5) || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 4 || [6.0.0+] [[#OpenSession2_2|OpenSession2]]
 +
|}
 +
 
 +
== OpenSessionForDev ==
 +
Takes an input u32 '''BusIdx''', an input u16 '''SlaveAddress''', and 2 input u32s [[#AddressingMode]] and [[#SpeedMode]]. Returns an [[#II2cSession]].
 +
 
 +
== OpenSession ==
 +
Takes an input u32 [[#I2cDevice]]. Returns an output [[#II2cSession]].
 +
 
 +
== HasDevice ==
 +
Takes an input u32 [[#I2cDevice]]. Returns an output boolean success value.
 +
 
 +
== HasDeviceForDev ==
 +
Takes an input u32 '''BusIdx''', an input u16 '''SlaveAddress''', and 2 input u32s [[#AddressingMode]] and [[#SpeedMode]]. Returns an output boolean success value.
 +
 
 +
== OpenSession2 ==
 +
Same as [[#OpenSession_2|OpenSession]] but takes an input u32 [[#I2cDevice|DeviceCode]].
 +
 
 +
== II2cSession ==
 +
This is "nn::i2c::ISession".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x19 || 0xBE || X, 6 || Volume Up (BUTTON_VOL_UP_PX6) || In || Icosa, Copper, Hoag, [5.0.0+] Mariko <br>([[Boot2]], [[Audio services]])
+
! Cmd || Name
 
|-
 
|-
| 0x1A || 0xBF || X, 7 || Volume Down (BUTTON_VOL_DOWN_PX7) || In || Icosa, Copper, Hoag, [5.0.0+] Mariko <br>([[Boot2]], [[Audio services]])
+
| 0 || [1.0.0-5.1.0] SendOld
 
|-
 
|-
| 0x1B || 0xC0 || Y, 0 || Fuel Gauge IC (MAX17050) IRQ || In || Icosa, Hoag, [5.0.0+] Mariko <br>([[PTM services]])
+
| 1 || [1.0.0-5.1.0] ReceiveOld
 
|-
 
|-
| 0x1C || 0xC1 || Y, 1 || BUTTON_HOME_PY1 || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 2 || [1.0.0-5.1.0] ExecuteCommandListOld
 
|-
 
|-
| 0x1D || 0xA9 || V, 1 || Backlight Enable (LCD_BL_EN_PV1) || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[NV services]], [[Backlight services]])
+
| 10 || [[#Send]]
 
|-
 
|-
| 0x1E || 0xAA || V, 2 || Backlight Reset (LCD_RST_PV2) || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[NV services]])
+
| 11 || [[#Receive]]
 
|-
 
|-
| 0x1F || 0x55 || K, 5 || Charger IC (BQ24193) OTG charge select || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[PTM services]], [[USB services]])
+
| 12 || [[#ExecuteCommandList]]
 
|-
 
|-
| 0x20 || 0xAD || V, 5 || USB-PD controller (RHOM BM92T30MWV) related || Out || Icosa, Copper, Hoag, [5.0.0+] Mariko <br>([[USB services]])
+
| 13 || [6.0.0+] [[#SetRetryValues]]
 +
|}
 +
 
 +
== Send ==
 +
Takes a type-0x21 input buffer '''InData''' and an input u32 [[#TransactionOption]]. No output.
 +
 
 +
== Receive ==
 +
Takes a type-0x22 output buffer '''OutData''' and an input u32 [[#TransactionOption]]. No output.
 +
 
 +
== ExecuteCommandList ==
 +
Takes a type-0x22 output buffer '''ReceiveBuffer''' and a type-0x9 input buffer '''CommandList'''. No output.
 +
 
 +
=== Commands ===
 +
This is "nn::i2c::I2cCommand".
 +
 
 +
{| class=wikitable
 +
! Bits || Name
 
|-
 
|-
| 0x21 || 0xC8 || Z, 0 || Charger IC (BQ24193) IRQ || In || Icosa, Hoag, [5.0.0+] Mariko <br>([[PTM services]])
+
| 0-5 || [[#CommandId]]
 
|-
 
|-
| 0x22 || 0xCA || Z, 2 || || In || Icosa, Hoag, [5.0.0+] Mariko
+
| 6-7 || [[#TransactionOption]]
 +
|}
 +
 
 +
A send command will write bytes to the device using the format: [u8 cmd_send] [u8 len] <bytes>
 +
 
 +
A receive command will read bytes from the device using the format: [u8 cmd_receive] [u8 len]
 +
 
 +
An extension sleep command will stall the device using the format: [u8 cmd_extension] [u8 ms]
 +
 
 +
== SetRetryValues ==
 +
Takes 2 input u32s '''MaxRetries''' and '''RetryDelay'''. No output.
 +
 
 +
= uart =
 +
This is "nn::uart::IManager".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x23 || 0xCB || Z, 3 || || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
! Cmd || Name
 
|-
 
|-
| 0x24 || 0x4F || J, 7 || TouchPanel reset || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[HID services]])
+
| 0 || [[#HasPort]]
 
|-
 
|-
| 0x25 || 0x50 || K, 0 || || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 1 || [[#HasPortForDev]]
 
|-
 
|-
| 0x26 || 0x51 || K, 1 || || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 2 || [[#IsSupportedBaudRate]]
 
|-
 
|-
| 0x27 || 0x52 || K, 2 || || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 3 || [[#IsSupportedBaudRateForDev]]
 
|-
 
|-
| 0x28 || 0x54 || K, 4 || USB-PD controller (RHOM BM92T30MWV) IRQ || In || Icosa, Copper, Hoag, [5.0.0+] Mariko <br>([[USB services]])
+
| 4 || [[#IsSupportedFlowControlMode]]
 
|-
 
|-
| 0x29 || 0x56 || K, 6 || || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 5 || [[#IsSupportedFlowControlModeForDev]]
 
|-
 
|-
| 0x2A || 0x57 || K, 7 || || In || Icosa, Copper, Hoag
+
| 6 || [[#CreatePortSession]]
 
|-
 
|-
| 0x2B || 0x53 || K, 3 || Joy-Con(R) NwcpDriver1.NwcpCharger || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[HID services]])
+
| 7 || [[#IsSupportedPortEvent]]
 
|-
 
|-
| 0x2C || 0xE3 || CC, 3 || Joy-Con(L) NwcpDriver0.NwcpCharger || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[HID services]])
+
| 8 || [[#IsSupportedPortEventForDev]]
 
|-
 
|-
| 0x2D || 0x38 || H, 0 || WIFI_EN_PH0? || Out || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 9 || [7.0.0+] [[#IsSupportedDeviceVariation]]
 
|-
 
|-
| 0x2E || 0x39 || H, 1 || WIFI_RST_PH1 || Out || Icosa, Copper, Hoag, [5.0.0+] Mariko <br>([[Wlan services]], [[PCIe services]])
+
| 10 || [7.0.0+] [[#IsSupportedDeviceVariationForDev]]
 +
|}
 +
 
 +
== HasPort ==
 +
Takes an input [[#UartPort]]. Returns an output boolean success value.
 +
 
 +
== HasPortForDev ==
 +
Takes an input [[#UartPortForDev]]. Returns an output boolean success value.
 +
 
 +
== IsSupportedBaudRate ==
 +
Takes 2 input u32s [[#UartPort]] and '''BaudRate'''. Returns an output boolean success value.
 +
 
 +
Supported baud rates are 57600, 115200, 1000000 and 3000000.
 +
 
 +
== IsSupportedBaudRateForDev ==
 +
Takes 2 input u32s [[#UartPortForDev]] '''BaudRate'''. Returns an output boolean success value.
 +
 
 +
Supported baud rates are 57600, 115200, 1000000 and 3000000.
 +
 
 +
== IsSupportedFlowControlMode ==
 +
Takes 2 input u32s [[#UartPort]] and [[#FlowControlMode]]. Returns an output boolean success value.
 +
 
 +
== IsSupportedFlowControlModeForDev ==
 +
Takes 2 input u32s [[#UartPortForDev]] and [[#FlowControlMode]]. Returns an output boolean success value.
 +
 
 +
== CreatePortSession ==
 +
No input. Returns an output [[#IPortSession]].
 +
 
 +
== IsSupportedPortEvent ==
 +
Takes 2 input u32s [[#UartPort]] and [[#PortEventType]]. Returns an output boolean success value.
 +
 
 +
== IsSupportedPortEventForDev ==
 +
Takes 2 input u32s [[#UartPortForDev]] and [[#PortEventType]]. Returns an output boolean success value.
 +
 
 +
== IsSupportedDeviceVariation ==
 +
Takes 2 input u32s [[#UartPort]] and '''DeviceVariation'''. Returns an output boolean success value.
 +
 
 +
Supported device variations are 0 (Bluetooth) for UART-D, 0 (Joy-Con(R)) for UART-B, 0 (Joy-Con(L)) and 1 (MCU) for UART-C.
 +
 
 +
== IsSupportedDeviceVariationForDev ==
 +
Takes 2 input u32s [[#UartPortForDev]] and '''DeviceVariation'''. Returns an output boolean success value.
 +
 
 +
Supported device variations are 0 (Bluetooth) for UART-D, 0 (Joy-Con(R)) for UART-B, 0 (Joy-Con(L)) and 1 (MCU) for UART-C.
 +
 
 +
== IPortSession ==
 +
This is "nn::uart::IPortSession".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x2F || 0x3B || H, 3 || AP_WAKE_BT_PH3 || Out || Icosa, Copper, Hoag, [5.0.0+] Mariko <br>([[Bluetooth Driver services]])
+
! Cmd || Name
 
|-
 
|-
| 0x30 || 0x3D || H, 5 || || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 0 || [[#OpenPort]]
 
|-
 
|-
| 0x31 || 0x3F || H, 7 || || Out || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 1 || [[#OpenPortForDev]]
 
|-
 
|-
| 0x32 || 0x40 || I, 0 || Backlight +5V || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[NV services]])
+
| 2 || [[#GetWritableLength]]
 
|-
 
|-
| 0x33 || 0x41 || I, 1 || Backlight -5V || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[NV services]])
+
| 3 || [[#Send]]
 
|-
 
|-
| 0x34 || 0x3E || H, 6 || Joy-Con(R) IsAttached (insertion, Joy-Con pin 5/console TX, pulled low on insert?) || In || Icosa, Hoag, [5.0.0+] Mariko <br>([[HID services]])
+
| 4 || [[#GetReadableLength]]
 
|-
 
|-
| 0x35 || 0xE2 || CC, 2 || || In || Icosa, Hoag, [5.0.0+] Mariko
+
| 5 || [[#Receive]]
 
|-
 
|-
| 0x36 || 0xE4 || CC, 4 || Fan enable (high power) || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[PTM services]])
+
| 6 || [[#BindPortEvent]]
 
|-
 
|-
| 0x37 || 0x3A || H, 2 || || In || Icosa, Copper, Hoag, [5.0.0+] Mariko
+
| 7 || [[#UnbindPortEvent]]
 +
|}
 +
 
 +
=== OpenPort ===
 +
Takes 3 input u32s [[#UartPort]], '''BaudRate''' and [[#FlowControlMode]], 2 input u64s '''SendBufferLength''' and '''ReceiveBufferLength''' and 2 input TransferMemory handles '''SendHandle''' and '''ReceiveHandle'''. Returns an output boolean success value.
 +
 
 +
[6.0.0+] Takes 4 input u8s (padded as u32) '''IsInvertTx''', '''IsInvertRx''', '''IsInvertRts''' and '''IsInvertCts''', 3 input u32s [[#UartPort]], '''BaudRate''' and [[#FlowControlMode]], 2 input u64s '''SendBufferLength''' and '''ReceiveBufferLength''' and 2 input TransferMemory handles '''SendHandle''' and '''ReceiveHandle'''. Returns an output boolean success value.
 +
 
 +
[7.0.0+] Takes 4 input u8s (padded as u32) '''IsInvertTx''', '''IsInvertRx''', '''IsInvertRts''' and '''IsInvertCts''', 4 input u32s [[#UartPort]], '''BaudRate''', [[#FlowControlMode]] and '''DeviceVariation''', 2 input u64s '''SendBufferLength''' and '''ReceiveBufferLength''' and 2 input TransferMemory handles '''SendHandle''' and '''ReceiveHandle'''. Returns an output boolean success value.
 +
 
 +
This will Abort when the specified [[#UartPort]] is already being used, due to a [[SVC]] failing.
 +
 
 +
=== OpenPortForDev ===
 +
Same as [[#OpenPort]], but takes an input [[#UartPortForDev]] instead.
 +
 
 +
=== GetWritableLength ===
 +
No input. Returns an output u64 '''WritableLength'''.
 +
 
 +
=== Send ===
 +
Takes a type-0x21 input buffer '''InData'''. Returns an output u64 size.
 +
 
 +
=== GetReadableLength ===
 +
No input. Returns an output u64 '''ReadableLength'''.
 +
 
 +
=== Receive ===
 +
Takes a type-0x22 output buffer '''OutData'''. Returns an output u64 size.
 +
 
 +
=== BindPortEvent ===
 +
Takes an input u32 [[#PortEventType]] and an input s64 '''Threshold'''. Returns an output boolean success value and an Event handle with EventClearMode=0.
 +
 
 +
=== UnbindPortEvent ===
 +
Takes an input u32 [[#PortEventType]]. Returns an output boolean success value.
 +
 
 +
= pwm =
 +
This is "nn::pwm::IManager".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x38 || 0xC9 || Z, 1 || SDCard Card Detect || In || Icosa, Copper, Hoag, [5.0.0+] Mariko <br>([[Filesystem services]])
+
! Cmd || Name
 
|-
 
|-
| 0x39 || 0x4D || J, 5 || Charger IC (BQ24193) OTG charge select || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[PTM services]], [[USB services]])
+
| 0 || OpenSessionForDev
 
|-
 
|-
| 0x3A || 0x58 || L, 0 || Charger IC (BQ24193) OTG charge select || Out || Icosa, Hoag, [5.0.0+] Mariko <br>([[PTM services]], [[USB services]])
+
| 1 || OpenSession
 
|-
 
|-
| 0x3B || 0x3E || H, 6 || Joy-Con(R) NwcpDriver1.GpioMonitorTask0 duplicate? || In || Icosa, Hoag, [5.0.0+] Mariko
+
| 2 || [6.0.0+] [[#OpenSession2_3|OpenSession2]]
 +
|}
 +
 
 +
== OpenSession2 ==
 +
Takes a [[#ChannelName|DeviceCode]] and returns an [[#IChannelSession]].
 +
 
 +
== IChannelSession ==
 +
This is "nn::pwm::IChannelSession".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x3C || 0x26 || E, 6 || Joy-Con(L) NwcpDriver1.GpioMonitorTask0 duplicate? || In || Icosa, Hoag, [5.0.0+] Mariko
+
! Cmd || Name
 
|-
 
|-
| 0x3D || -1 || || || ||
+
| 0 || SetPeriod
 
|-
 
|-
| 0x3E || 0x33 || G, 3 || Joy-Con(R) CTS (checked low) || In || None <br>([[HID services]])
+
| 1 || GetPeriod
 
|-
 
|-
| 0x3F || 0x1C || D, 4 || Joy-Con(L) CTS (checked low) || In || None <br>([[HID services]])
+
| 2 || SetDuty
 
|-
 
|-
| 0x40 || 0xD9 || BB, 1 || || Out || [2.0.0+] Copper
+
| 3 || GetDuty
 
|-
 
|-
| 0x41 || 0x0C || B, 4 || Lid Closed (unused) || In || [2.0.0+] Copper
+
| 4 || SetEnabled
 
|-
 
|-
| 0x42 || 0x0D || B, 5 || || In || [2.0.0+] Copper
+
| 5 || GetEnabled
 
|-
 
|-
| 0x43 || 0x21 || E, 1 || USB power || Out || [2.0.0+] Copper <br>([[USB services]])
+
| 6 || [6.0.0+] SetScale
 
|-
 
|-
| 0x44 || 0x27 || E, 7 || || In || [2.0.0+] Copper
+
| 7 || [6.0.0+] GetScale
 +
|}
 +
 
 +
= pinmux =
 +
This is "nn::pinmux::IManager".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x45 || 0x92 || S, 2 || || In || [2.0.0+] Copper
+
! Cmd || Name
 
|-
 
|-
| 0x46 || 0x95 || S, 5 || USB root port 4 power || Out || [2.0.0+] Copper <br>([[USB services]])
+
| 0 || [[#OpenSession_3|OpenSession]]
 +
|}
 +
 
 +
== OpenSession ==
 +
Takes an [[#AssignablePinGroupName]] or an [[#AssignablePinGroupNameForHardwareTest]] and returns an [[#ISession|ISession]].
 +
 
 +
== ISession ==
 +
This is "nn::pinmux::ISession".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x47 || 0x98 || T, 0 || USB root port 3 power || Out || [2.0.0+] Copper <br>([[USB services]])
+
! Cmd || Name
 
|-
 
|-
| 0x48 || 0x10 || C, 0 || HdmiHotplug || Out || [2.0.0+] Copper <br>([[NV services]])
+
| 0 || [[#SetPinAssignment]]
 
|-
 
|-
| 0x49 || 0x11 || C, 1 || USB root port 2 power || Out || [2.0.0+] Copper <br>([[USB services]])
+
| 1 || [[#GetPinAssignment]]
 
|-
 
|-
| 0x4A || 0x12 || C, 2 || HdmiHotplug || Out || [2.0.0+] Copper <br>([[NV services]])
+
| 2 || [[#SetPinAssignmentForHardwareTest]]
 +
|}
 +
 
 +
=== SetPinAssignment ===
 +
Takes a [[#PinAssignment]]. No output.
 +
 
 +
=== GetPinAssignment ===
 +
No input. Returns a [[#PinAssignment]].
 +
 
 +
=== SetPinAssignmentForHardwareTest ===
 +
Takes a [[#PinAssignmentForHardwareTest]]. No output.
 +
 
 +
= sasbus =
 +
This is "nn::sasbus::IManager".
 +
 
 +
This was added with [3.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x4B || 0x42 || I, 2 || || Out || [2.0.0+] Copper
+
! Cmd || Name
 
|-
 
|-
| 0x4C || 0xE6 || CC, 6 || || In || [2.0.0+] Copper
+
| 0 || [[#OpenSession_4|OpenSession]]
 +
|}
 +
 
 +
== OpenSession ==
 +
Takes a [[#SasbusPort]] and returns an [[#ISession_2|ISession]].
 +
 
 +
== ISession ==
 +
This is "nn::sasbus::ISession".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| [2.0.0+] 0x4D || 0xAC || V, 4 || || Out || [2.0.0+] Copper
+
! Cmd || Name
 
|-
 
|-
| [2.0.0+] 0x4E || 0xE1 || CC, 1 || HdmiHotplug (HDMI_INT_DP_HPD_PCC1) || In || [2.0.0+] Copper <br>([[NV services]])
+
| 0 || [[#Write]]
 
|-
 
|-
| [5.0.0+] 0x4F || 0x56 || K, 6 || || || None
+
| 1 || [[#Read]]
 
|-
 
|-
| - || 0x32 || G, 2 || Joy-Con(R) RTS || || None
+
| 2 || [[#StartPeriodicReceiveMode]]
 
|-
 
|-
| - || 0x1B || D, 3 || Joy-Con(L) RTS || || None
+
| 3 || [[#StopPeriodicReceiveMode]]
 
|}
 
|}
  
== GpioPadDescriptor ==
+
=== Write ===
 +
Takes a type-0x21 input buffer and an u8 '''SpiCommand'''. No output.
 +
 
 +
=== Read ===
 +
Takes a type-0x22 output buffer and an u8 '''SpiCommand'''. No output.
 +
 
 +
=== StartPeriodicReceiveMode ===
 +
Takes an u8 '''SpiCommand''' (padded to u32), an u32, two u64s and a copy handle. No output.
 +
 
 +
=== StopPeriodicReceiveMode ===
 +
No input/output.
 +
 
 +
= led =
 +
This is "nn::led::detail::IManager".
 +
 
 +
This was added with [8.1.1+].
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Bits || Description
+
! Cmd || Name
|-
 
| 7-5 || Controller index
 
 
|-
 
|-
| 4-3 || Port index
+
| 0 || [[#OpenController]]
|-
 
| 2-0 || Pin number
 
 
|}
 
|}
  
== OpenSessionForDev ==
+
== OpenController ==
Takes a raw [[#GpioPadDescriptor]] and returns a [[#IPadSession]] session for it.
+
Takes a '''DeviceCode''' (which must be 0x35000065) and returns an [[#IController]] session for it.
 
 
== OpenSession ==
 
Same thing as [[#OpenSessionForDev]] except it takes a '''GpioPadName''' which is then converted to a [[#GpioPadDescriptor]]. Returns an [[#IPadSession]] session.
 
  
== OpenSessionForTest ==
+
== IController ==
Same as [[#OpenSession]] but panics on failure.
+
This is "nn::led::detail::IController".
 
 
== OpenSession2 ==
 
Same as [[#OpenSession]] but takes a '''DeviceCode''' instead of a '''GpioPadName'''.
 
  
== IPadSession ==
+
This was added with [8.1.1+].
This is "nn::gpio::IPadSession".
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 226: Line 450:
 
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || SetDirection
+
| 0 ||  
 +
|-
 +
| 1 ||
 +
|-
 +
| 2 ||
 +
|-
 +
| 3 ||
 +
|-
 +
| 4 ||
 +
|-
 +
| 5 ||
 
|-
 
|-
| 1 || GetDirection
+
| 6 ||
 
|-
 
|-
| 2 || SetInterruptMode
+
| 7 ||
 
|-
 
|-
| 3 || GetInterruptMode
+
| 8 ||
 
|-
 
|-
| 4 || SetInterruptEnable
+
| 9 ||
 
|-
 
|-
| 5 || GetInterruptEnable
+
| 10 ||
 
|-
 
|-
| 6 || GetInterruptStatus
+
| 11 ||
 
|-
 
|-
| 7 || ClearInterruptStatus
+
| 12 ||
 
|-
 
|-
| 8 || SetValue
+
| 13 ||
 
|-
 
|-
| 9 || GetValue
+
| 14 ||
 
|-
 
|-
| 10 || BindInterrupt
+
| 15 ||
 
|-
 
|-
| 11 || UnbindInterrupt
+
| 16 ||
 
|-
 
|-
| 12 || SetDebounceEnabled
+
| 17 ||
 
|-
 
|-
| 13 || GetDebounceEnabled
+
| 18 ||
 
|-
 
|-
| 14 || SetDebounceTime
+
| 19 ||
 
|-
 
|-
| 15 || GetDebounceTime
+
| 20 ||
 
|-
 
|-
| 16 || [4.0.0+] SetValueForSleepState
+
| 21 || [8.1.1-9.2.0]
 
|}
 
|}
  
= i2c, i2c:pcv =
+
= GpioPadName =
This is "nn::i2c::IManager".
+
This is "nn::gpio::GpioPadName".
  
{| class="wikitable" border="1"
+
{| class="wikitable sortable" border="1"
 +
|-
 +
! Value || Name || [[#GpioPadDescriptor|GpioPadDescriptor]] || DeviceCode || Tegra (port, pin) || Description || Direction || Used by (services) || Used by (hardware)
 +
|-
 +
| 0x01 || CodecLdoEnTemp || 0xCC || 0x33000002 || Z, 4 || Audio Codec (ALC5639) Power || Out || [[Audio services]], [[Fatal services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x02 || PowSdEn || 0x24 || 0x3C000001 || E, 4 || SDCard Power || Out || [[PCV services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x03 || BtRst || 0x3C || 0x37000002 || H, 4 || Bluetooth Reset || Out || [[Bluetooth Driver services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x04 || RamCode3 || 0xDA || 0xC9000402 || BB, 2 || Secondary Boot Device Configration || In || || Icosa, Iowa
 +
|-
 +
| 0x05 || GameCardReset || 0xDB || 0x3C000402 || BB, 3 || Gamecard Reset || Out || [[Filesystem services]] || Icosa, Copper, Hoag, Iowa, Unknown
 +
|-
 +
| 0x06 || CodecAlert || 0xDC || 0x33000003 || BB, 4 || Audio Codec (ALC5639) Alert || In || [[Audio services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x07 || PowGc || 0x25 || 0x3C000401 || E, 5 || Gamecard Power || Out || || Icosa, Copper
 +
|-
 +
| 0x08 || DebugControllerDet || 0x90 || 0x350000CA || S, 0 || Debug Pad Detect || In || [[HID services]] || Icosa, Iowa
 +
|-
 +
| 0x09 || BattChgStatus || 0x91 || 0x39000407 || S, 1 || Battery Charge Status || In || || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x0A || BattChgEnableN || 0x96 || 0x39000003 || S, 6 || Charger IC (BQ24193) Charge Enable || Out || [[PTM services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x0B || FanTach || 0x97 || 0x3D000002 || S, 7 || Fan Tachometer || In || || Icosa, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x0C || ExtconDetS || 0x26 || 0x3500040B || E, 6 || Joy-Con(L) IsAttached (insertion, Joy-Con pin 5/console TX, pulled low on insert)  || In || [[HID services]], [[AM services]] || Icosa, Iowa, Unknown
 +
|-
 +
| 0x0D || Vdd50AEn || 0x05 || 0x39000401 || A, 5 || Fan and Joy-Con Rails Power (Battery - BQ24193 5V) || Out || [[PTM services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x0E || SdevCoaxSel1 || 0x78 || 0xCA000402 || P, 0 || SDEV Coax Select || In || || Icosa, Iowa
 +
|-
 +
| 0x0F || GameCardCd || 0x93 || 0x3C000403 || S, 3 || Gamecard Card Detect || In || [[Filesystem services]], [[AM services]] || Icosa, Copper, Hoag, Iowa, Unknown
 +
|-
 +
| 0x10 || ProdType0 || 0x7D || 0xC900040B || P, 5 || || In || || Icosa, Copper, Iowa
 +
|-
 +
| 0x11 || ProdType1 || 0x7C || 0xC900040C || P, 4 || || In || || Icosa, Copper, Iowa
 +
|-
 +
| 0x12 || ProdType2 || 0x7B || 0xC900040D || P, 3 || || In || || Icosa, Copper, Iowa
 +
|-
 +
| 0x13 || ProdType3 || 0x7A || 0xC900040E || P, 2 || || In || || Icosa, Copper, Iowa
 +
|-
 +
| 0x14 || TempAlert || 0xBC || 0x3E000002 || X, 4 || Temperature Sensor || In || || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x15 || CodecHpDetIrq || 0xAE || 0x33000004 || V, 6 || Audio Codec (ALC5639) Headphone Detect || In || [[Audio services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x16 || MotionInt || 0xBA || 0x35000041 || X, 2 || || In || || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x17 || TpIrq || 0xB9 || 0x35000036 || X, 1 || TouchPanel IRQ || In || [[HID services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x18 || ButtonSleep2 || 0xBD || 0x35000001 || X, 5 || Power Button || In || || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x19 || ButtonVolUp || 0xBE || 0x35000002 || X, 6 || Volume Up || In || [[Boot2]], [[Audio services]], [[Fatal services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x1A || ButtonVolDn || 0xBF || 0x35000003 || X, 7 || Volume Down || In || [[Boot2]], [[Audio services]] || Icosa, Copper, Hoag, Iowa, Calcio , Unknown
 +
|-
 +
| 0x1B || BattMgicIrq || 0xC0 || 0x39000034 || Y, 0 || Fuel Gauge IC (MAX17050) IRQ || In || [[PTM services]], [[AM services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x1C || RecoveryKey || 0xC1 || 0x35000004 || Y, 1 || Recovery Mode Key || In || || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x1D || PowLcdBlEn || 0xA9 || 0x3400003E || V, 1 || Backlight Enable || Out || [[NV services]], [[Backlight services]] || Icosa, Hoag, Iowa
 +
|-
 +
| 0x1E || LcdReset || 0xAA || 0x34000033 || V, 2 || Backlight Reset || Out || [[NV services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x1F || PdVconnEn || 0x55 || 0x040000CC || K, 5 || USB-PD Controller (RHOM BM92T30MWV) VCONN Power || Out || [[PTM services]], [[USB services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x20 || PdRstN || 0xAD || 0x040000CA || V, 5 || USB-PD Controller (RHOM BM92T30MWV) Reset || Out || [[USB services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x21 || Bq24190Irq || 0xC8 || 0x39000002 || Z, 0 || Charger IC (BQ24193) IRQ || In || [[PTM services]], [[AM services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x22 || SdevCoaxSel0 || 0xCA || 0xCA000401 || Z, 2 || SDEV Coax Select || In || || Icosa, Iowa
 +
|-
 +
| 0x23 || SdWp || 0xCB || 0x3C000003 || Z, 3 || SDCard Write Protect || In || || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x24 || TpReset || 0x4F || 0x35000035 || J, 7 || TouchPanel Reset || Out || [[HID services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x25 || BtGpio2 || 0x50 || 0x37000401 || K, 0 || || In || || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x26 || BtGpio3 || 0x51 || 0x37000402 || K, 1 || || In || || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x27 || BtGpio4 || 0x52 || 0x37000403 || K, 2 || || In || || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x28 || CradleIrq || 0x54 || 0x040000CB || K, 4 || USB-PD Controller (RHOM BM92T30MWV) IRQ || In || [[USB services]], [[AM services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x29 || PowVcpuInt || 0x56 || 0x3E000003 || K, 6 || || In || ||  Icosa, Copper, Unknown
 +
|-
 +
| 0x2A || Max77621GpuInt || 0x57 || 0x3E000004 || K, 7 || || In || || Icosa, Copper
 +
|-
 +
| 0x2B || ExtconChgU || 0x53 || 0x35000402 || K, 3 || Joy-Con(R) Charge || Out || [[HID services]] || Icosa, Iowa, Unknown
 +
|-
 +
| 0x2C || ExtconChgS || 0xE3 || 0x3500040C || CC, 3 || Joy-Con(L) Charge || Out || [[HID services]] || Icosa, Iowa, Unknown
 +
|-
 +
| 0x2D || WifiRfDisable || 0x38 || 0x38000003 || H, 0 || || Out || || Icosa, Copper, Hoag, Iowa, Calcio
 +
|-
 +
| 0x2E || WifiReset || 0x39 || 0x38000002 || H, 1 || WiFi Reset || Out || [[WLAN services]], [[PCIe services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x2F || ApWakeBt || 0x3B || 0x37000003 || H, 3 || || Out || [[Bluetooth Driver services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x30 || BtWakeAp || 0x3D || 0x37000004 || H, 5 || || In || [[AM services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x31 || BtGpio5 || 0x3F || 0x37000404 || H, 7 || || Out || || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x32 || PowLcdVddPEn || 0x40 || 0x34000034 || I, 0 || Backlight +5V || Out || [[NV services]] || Icosa, Hoag, Iowa
 +
|-
 +
| 0x33 || PowLcdVddNEn || 0x41 || 0x34000035 || I, 1 || Backlight -5V || Out || [[NV services]] || Icosa, Hoag, Iowa
 +
|-
 +
| 0x34 || ExtconDetU || 0x3E || 0x35000401 || H, 6 || Joy-Con(R) IsAttached (insertion, Joy-Con pin 5/console TX, pulled low on insert)  || In || [[HID services]], [[AM services]] || Icosa, Iowa, Unknown
 +
|-
 +
| 0x35 || RamCode2 || 0xE2 || 0xC9000401 || CC, 2 || Secondary Boot Device Configration || In || || Icosa, Iowa
 +
|-
 +
| 0x36 || Vdd50BEn || 0xE4 || 0x39000402 || CC, 4 || Fan and Joy-Con Rails Power (USB 5V) || Out || [[PTM services]] || Icosa, Iowa
 +
|-
 +
| 0x37 || WifiWakeHost || 0x3A || 0x38000004 || H, 2 || || In || [[AM services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x38 || SdCd || 0xC9 || 0x3C000002 || Z, 1 || SDCard Card Detect || In || [[Filesystem services]], [[AM services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 0x39 || OtgFet1ForSdev || 0x4D || 0x39000404 || J, 5 || Charger IC (BQ24193) OTG Charge Select || Out || [[PTM services]], [[USB services]] || Icosa, Iowa
 +
|-
 +
| 0x3A || OtgFet2ForSdev || 0x58 || 0x39000405 || L, 0 || Charger IC (BQ24193) OTG Charge Select || Out || [[PTM services]], [[USB services]] || Icosa, Iowa
 +
|-
 +
| 0x3B || ExtConWakeU || 0x3E || 0x35000403 || H, 6 || Joy-Con(R) Wake Detect || In || || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x3C || ExtConWakeS || 0x26 || 0x3500040D || E, 6 || Joy-Con(L) Wake Detect || In || || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 0x3D || PmuIrq || -1 || 0x39000406 || || || || ||
 +
|-
 +
| 0x3E || ExtUart2Cts || 0x33 || 0x35000404 || G, 3 || Joy-Con(R) CTS (checked low) || In || [[HID services]], [[AM services]] ||
 +
|-
 +
| 0x3F || ExtUart3Cts || 0x1C || 0x3500040E || D, 4 || Joy-Con(L) CTS (checked low) || In || [[HID services]], [[AM services]] ||
 +
|-
 +
| 0x40 || 5VStepDownEn || 0xD9 || 0x39000408 || BB, 1 || 5V Step-Down Regulator Power || Out || || Copper
 +
|-
 +
| 0x41 || UsbSwitchB2Oc || 0x0C || 0x04000401 || B, 4 || USB Root Port 2 Over Current || In || [[USB services]] || Copper
 +
|-
 +
| 0x42 || 5VStepDownPg || 0x0D || 0x39000409 || B, 5 || 5V Step-Down Regulator Power Good Flag || In || || Copper
 +
|-
 +
| 0x43 || UsbSwitchAEn || 0x21 || 0x04000402 || E, 1 || USB Power || Out || [[USB services]] || Copper
 +
|-
 +
| 0x44 || UsbSwitchAFlag || 0x27 || 0x04000403 || E, 7 || USB Power Flag || In || [[USB services]] || Copper
 
|-
 
|-
! Cmd || Name
+
| 0x45 || UsbSwitchB3Oc || 0x92 || 0x04000404 || S, 2 || USB Root Port 3 Over Current || In || [[USB services]] || Copper
 
|-
 
|-
| 0 || [[#OpenSessionForDev_2|OpenSessionForDev]]
+
| 0x46 || UsbSwitchB3En || 0x95 || 0x04000405 || S, 5 || USB Root Port 3 Power || Out || [[USB services]] || Copper
 
|-
 
|-
| 1 || [[#OpenSession_2|OpenSession]]
+
| 0x47 || UsbSwitchB2En || 0x98 || 0x04000406 || T, 0 || USB Root Port 2 Power || Out || [[USB services]] || Copper
 
|-
 
|-
| 2 || [[#HasDevice|HasDevice]]
+
| 0x48 || Hdmi5VEn || 0x10 || 0x34000004 || C, 0 || HDMI 5V || Out || [[NV services]] || Copper, Calcio
 
|-
 
|-
| 3 || [[#HasDeviceForDev|HasDeviceForDev]]
+
| 0x49 || UsbSwitchB1En || 0x11 || 0x04000407 || C, 1 || USB Root Port 1 Power || Out || [[USB services]] || Copper, Calcio
|}
 
 
 
== Known Devices ==
 
{| class="wikitable sortable" border="1"
 
 
|-
 
|-
! I2cDevice || Port:Addr || Is10bit || Speed || Max Retries || Retry Delay || Usage || Used by
+
| 0x4A || HdmiPdTrEn || 0x12 || 0x34000005 || C, 2 || HDMI/Power Delivery Switch || Out || [[NV services]] || Copper, Calcio
 
|-
 
|-
| 0 || 0:52 || N || 100000 || 0 ||       0 || DebugPadDriver || [[HID services]]
+
| 0x4B || FanEn || 0x42 || 0x3D000003 || I, 2 || Fan Enable || Out || [[PTM services]] || Copper
 
|-
 
|-
| 1 || 2:49 || N || 400000 || 0 ||       0 || TouchPanel || [[HID services]]
+
| 0x4C || UsbSwitchB1Oc || 0xE6 || 0x04000408 || CC, 6 || USB Root Port 1 Over Current || In || [[USB services]] || Copper, Calcio
 
|-
 
|-
| 2 || 0:4c || N || 100000 || 0 ||       0 || Temperature Sensor (TMP451 or NCT72) || [[PTM services]]
+
| [2.0.0+] 0x4D || PwmFan || 0xAC || 0x3D000001 || V, 4 || Pulse-Width Modulation Fan Control || Out || [[PTM services]] || Copper
 
|-
 
|-
| 3 || 0:4c || N || 100000 || 0 ||       0 || Temperature Sensor (TMP451 or NCT72) (duplicate) ||
+
| [2.0.0+] 0x4E || HdmiHpd || 0xE1 || 0x34000006 || CC, 1 || HDMI Hot Plug Detect || In || [[NV services]] || Copper, Calcio
 
|-
 
|-
| 4 || 0:1c || N || 100000 || 0 ||       0 || Audio Codec (ALC5639) || [[Audio services]], [[Fatal services]]
+
| [5.0.0+] 0x4F || Max77812Irq || 0x56 || 0x3E000003 || K, 6 || || In || || Hoag, Iowa, Calcio
 
|-
 
|-
| 5 || 4:68 || N || 400000 || 3 || 5000000 || PMIC RTC (max77620_rtc0), max77620_irq0 || [[PCV services]]
+
| [6.0.0+] 0x50 || || 0x20 || 0xCA000001 || E, 0 || || Out || || Hoag, Calcio, Unknown
 
|-
 
|-
| 6 || 4:3c || N || 400000 || 3 || 5000000 || PMIC (MAX77620), max77620_irq0 || [[PCV services]]
+
| [6.0.0+] 0x51 || || 0x21 || 0xCA000002 || E, 1 || || Out || || Hoag, Calcio, Unknown
 
|-
 
|-
| 7 || 4:1b || N || 400000 || 3 || 5000000 || Sub-PMIC for CPU (max77621_cpu) || [[PCV services]]
+
| [6.0.0+] 0x52 || || 0x22 || 0xCA000003 || E, 2 || || Out || || Hoag, Calcio, Unknown
 
|-
 
|-
| 8 || 4:1c || N || 400000 || 3 || 5000000 || Sub-PMIC for GPU (max77621_gpu) || [[PCV services]]
+
| [6.0.0+] 0x53 || || 0x23 || 0xCA000004 || E, 3 || || Out || || Hoag, Calcio, Unknown
 
|-
 
|-
| 9 || 0:6b || N || 100000 || 3 || 5000000 || Charger IC (BQ24193) || [[PTM services]]
+
| [6.0.0+] 0x54 || NfcIrq || 0x4C || 0x36000004 || J, 4 || || In || [[NFC services]] || Hoag
 
|-
 
|-
| 10 || 0:36 || N || 100000 || 3 || 5000000 || Fuel Gauge IC (MAX17050) || [[PCV services]], [[PTM services]]
+
| [6.0.0+] 0x55 || NfcRst || 0x57 || 0x36000003 || K, 7 || || Out || [[NFC services]] || Hoag
 
|-
 
|-
| 11 || 0:18 || N || 100000 || 3 || 5000000 || USB-PD controller (RHOM BM92T30MWV) || [[USB services]]
+
| [6.0.0+] 0x56 || McuIrq || 0x27 ([6.0.0-8.0.0] 0x94) || 0x35000415 || S, 4 || || In || || Hoag
 
|-
 
|-
| 12 || 1:40 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VDD15V0-HB) || Factory testing
+
| [6.0.0+] 0x57 || McuBoot || 0x98 || 0x35000416 || T, 0 || || Out || [[HID services]] || Hoag
 
|-
 
|-
| 13 || 1:41 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VSYS-CPU-DS) || Factory testing
+
| [6.0.0+] 0x58 || McuRst || 0x99 || 0x35000417 || T, 1 || || Out || [[HID services]] || Hoag
 
|-
 
|-
| 14 || 1:44 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VSYS-GPU-DS) || Factory testing
+
| [6.0.0+] 0x59 || Vdd5V3En || 0xBB || 0x39000403 || X, 3 || 5V3 Fan Power || Out || [[PTM services]] || Hoag, Iowa, Unknown
 
|-
 
|-
| 15 || 1:45 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VSYS-DDR-DS) || Factory testing
+
| [6.0.0+] 0x5A || McuPor || 0xE5 || 0x35000418 || CC, 5 || || Out || [[HID services]] || Hoag
 
|-
 
|-
| 16 || 1:46 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VSYS-AP) || Factory testing
+
| [6.0.0+] 0x5B || || 0xAB || 0x35000005 || V, 3 || SioH Input || In || [[HID services]], [[AM services]] || Hoag
 
|-
 
|-
| 17 || 1:47 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VSYS-BL-DS) || Factory testing
+
| [6.0.0+] 0x5C || NfcEn || 0x4E || 0x36000002 || J, 6 || || Out || [[NFC services]] || Hoag
 
|-
 
|-
| 18 || 1:29 || N || 400000 || 3 || 5000000 || Ambient Light Sensor (BH1730) || [[Backlight services]]
+
| [7.0.0+] - || ExtUart2Rts || 0x32 || 0x35000406 || G, 2 || Joy-Con(R) RTS || In || ||  
 
|-
 
|-
| 19 || 1:48 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_CORE) || Factory testing
+
| [7.0.0+] - || ExtUart3Rts || 0x1B || 0x35000410 || D, 3 || Joy-Con(L) RTS || In || ||  
 
|-
 
|-
| 20 || 1:49 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_Soc-1V8) || Factory testing
+
| [7.0.0+] - || || 0x17 || 0x3500041B || C, 7 || || In || || Hoag
 
|-
 
|-
| 21 || 1:4a || N || 400000 || 3 || 5000000 || Power Monitor (ina226_LPDDR4-1V8) || Factory testing
+
| [7.0.0+] - || || 0x18 || 0x3500041C || D, 0 || || In || || Hoag
 
|-
 
|-
| 22 || 1:4b || N || 400000 || 3 || 5000000 || Power Monitor (ina226_REG1V32) || Factory testing
+
| [7.0.0+] - || || 0x15 || 0x3500041D || C, 5 || || In || || Hoag
 
|-
 
|-
| 23 || 1:4d || N || 400000 || 3 || 5000000 || Power Monitor (ina226_VDD3V3-SYS) || Factory testing
+
| [7.0.0+] - || || 0x16 || 0x3500041E || C, 6 || || In || || Hoag
 
|-
 
|-
| 24 || 3:50 || N || 100000 || 0 ||       0 || HDMI DDC || [[NV services]]
+
| [10.0.0+] - || || 0xC5 || 0x35000065 || Y, 5 || || Out || || Hoag
 
|-
 
|-
| 25 || 3:54 || N || 100000 || 0 ||       0 || HDMI SCDC || [[NV services]]
+
| [10.0.0+] - || || 0x29 || 0x04000409 || F, 1 || || Out || || Calcio
 
|-
 
|-
| 26 || 3:3a || N || 100000 || 0 ||       0 || DisplayHdmiHotplugHandler || [[NV services]]
+
| [10.0.0+] - || || 0x38 || 0x34000401 || H, 0 || || In || || Unknown
 
|}
 
|}
  
== OpenSessionForDev ==
+
= GpioPadDescriptor =
Takes an u32 '''port''', an u16 '''addr''', an '''AddressingMode''' (1 for 10-bit, 0 otherwise) and a '''SpeedMode''' (400000 or 100000). Returns a [[#II2cSession]] session.
+
{| class="wikitable" border="1"
 +
|-
 +
! Bits || Description
 +
|-
 +
| 7-5 || Controller index
 +
|-
 +
| 4-3 || Port index
 +
|-
 +
| 2-0 || Pin number
 +
|}
  
== OpenSession ==
+
= I2cDevice =
Takes an '''I2cDevice''' and returns a [[#II2cSession]] session for it.
+
This is "nn::i2c::I2cDevice".
  
== HasDevice ==
+
{| class="wikitable sortable" border="1"
Takes an '''I2cDevice''' and returns true if the device exists or false otherwise.
+
|-
 
+
! Value || Name || DeviceCode || Port:Addr || Is10bit || Speed || Max Retries || Retry Delay || Description || Used by (services) || Used by (hardware)
== HasDeviceForDev ==
+
|-
Takes an u32 '''port''', an u16 '''addr''', an '''AddressingMode''' (1 for 10-bit, 0 otherwise) and a '''SpeedMode''' (400000 or 100000). Returns true if the device exists or false otherwise.
+
|  0 || ClassicController || 0x350000C9 || 0:52 || N || 100000 || 0 ||      0 || DebugPad Driver || [[HID services]] || Icosa, Iowa, Unknown
 
+
|-
== II2cSession ==
+
1 || Ftm3bd56 || 0x35000033 || 2:49 || N || 400000 || 0 ||      0 || TouchPanel || [[HID services]] || Icosa, Hoag, Iowa, Unknown
This is "nn::i2c::ISession".
+
|-
 
+
|  2 || Tmp451 || 0x3E000001 || 0:4C || N || 100000 || 0 ||      0 || Temperature Sensor || [[PTM services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
{| class="wikitable" border="1"
+
|-
 +
|  3 || Nct72 || 0x3E000001 || 0:4C || N || 100000 || 0 ||      0 || Temperature Sensor || [[PTM services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
|  4 || Alc5639 || 0x33000001 || 0:1C || N || 100000 || 0 ||      0 || Audio Codec || [[Audio services]], [[Fatal services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
|  5 || Max77620Rtc || 0x3B000001 || 4:68 || N || 400000 || 3 || 5000000 || PMIC RTC || [[PCV services]] || Icosa, Copper
 +
|-
 +
|  6 || Max77620Pmic || 0x3A000001 || 4:3C || N || 400000 || 3 || 5000000 || PMIC || [[PCV services]] || Icosa, Copper
 +
|-
 +
|  7 || Max77621Cpu || 0x3A000003 || 4:1B || N || 400000 || 3 || 5000000 || Sub-PMIC for CPU || [[PCV services]] || Icosa, Copper
 +
|-
 +
|  8 || Max77621Gpu || 0x3A000004 || 4:1C || N || 400000 || 3 || 5000000 || Sub-PMIC for GPU || [[PCV services]] || Icosa, Copper
 +
|-
 +
|  9 || Bq24193 || 0x39000001 || 0:6B || N || 100000 || 3 || 5000000 || Charger IC || [[PTM services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 10 || Max17050 || 0x39000033 || 0:36 || N || 100000 || 3 || 5000000 || Fuel Gauge IC || [[PTM services]], [[PCV services]] || Icosa, Hoag, Iowa, Unknown
 +
|-
 +
| 11 || Bm92t30mwv || 0x040000C9 || 0:18 || N || 100000 || 3 || 5000000 || USB-PD controller || [[USB services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
 +
|-
 +
| 12 || Ina226Vdd15v0Hb || 0x3F000401 || 1:40 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
 +
|-
 +
| 13 || Ina226VsysCpuDs or Ina226VddCpuAp (SdevMariko) || 0x3F000001 || 1:41 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
 +
|-
 +
| 14 || Ina226VsysGpuDs or Ina226VddGpuAp (SdevMariko) || 0x3F000002 || 1:44 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
 
|-
 
|-
! Cmd || Name
+
| 15 || Ina226VsysDdrDs or Ina226VddDdr1V1Pmic (SdevMariko) || 0x3F000003 || 1:45 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
 
|-
 
|-
| 0 || Send
+
| 16 || Ina226VsysAp || 0x3F000402 || 1:46 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
 
|-
 
|-
| 1 || Receive
+
| 17 || Ina226VsysBlDs || 0x3F000403 || 1:47 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
 
|-
 
|-
| 2 || ExecuteCommandList
+
| 18 || Bh1730 || 0x35000047 || 1:29 || N || 400000 || 3 || 5000000 || Ambient Light Sensor || [[Backlight services]] || Icosa, Hoag, Iowa, Unknown
 
|-
 
|-
| 10 || SendAuto
+
| 19 || Ina226VsysCore or Ina226VddCoreAp (SdevMariko) || 0x3F000404 || 1:48 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
 
|-
 
|-
| 11 || ReceiveAuto
+
| 20 || Ina226Soc1V8 or Ina226VddSoc1V8 (SdevMariko) || 0x3F000405 || 1:49 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
 
|-
 
|-
| 12 || ExecuteCommandListAuto
+
| 21 || Ina226Lpddr1V8 or Ina226Vdd1V8 (SdevMariko) || 0x3F000406 || 1:4A || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|}
 
 
 
= uart =
 
This is "nn::uart::IManager".
 
 
 
{| class="wikitable" border="1"
 
 
|-
 
|-
! Cmd || Name
+
| 22 || Ina226Reg1V32 || 0x3F000407 || 1:4B || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
 
|-
 
|-
| 0 || [[#DoesUartExist]]
+
| 23 || Ina226Vdd3V3Sys || 0x3F000408 || 1:4D || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
 
|-
 
|-
| 1 || DoesUartExistForTest
+
| [2.0.0+] 24 || || 0x34000001 || 3:50 || N || 100000 || 0 ||      0 || HDMI DDC || [[NV services]] || Copper, Calcio
 
|-
 
|-
| 2 || [[#SetUartBaudrate]]
+
| [2.0.0+] 25 || || 0x34000002 || 3:54 || N || 100000 || 0 ||      0 || HDMI SCDC || [[NV services]] || Copper, Calcio
 
|-
 
|-
| 3 || SetUartBaudrateForTest
+
| [2.0.0+] 26 || || 0x34000003 || 3:3A || N || 100000 || 0 ||      0 || HDMI HDCP || [[NV services]] || Copper, Calcio
 
|-
 
|-
| 4 || [[#IsSomethingUartValid]]
+
| [4.0.0+] 27 || Fan53528 || 0x3A000005 || 4:52 ([4.0.0-8.0.0] 4:A4) || N || 400000 || 0 ||      0 || Buck Regulator || || Hoag, Iowa, Calcio, Unknown
 
|-
 
|-
| 5 || IsSomethingUartValidForTest
+
| [4.0.0+] 28 || Max77812Pmic || 0x3A000002 || 4:31 ([8.0.0-9.2.0] 4:33, [4.0.0-8.0.0] 4:31) || N || 400000 || 0 ||      0 || PMIC || [[PCV services]] || Hoag, Iowa, Calcio, Unknown
 
|-
 
|-
| 6 || [[#GetSession]]
+
| [4.0.0+] 29 || Max77812Pmic || 0x3A000006 ([4.0.0-9.2.0] 0x3A000002) || 4:33 ([4.0.0-8.0.0] 4:31) || N || 400000 || 0 ||      0 || PMIC || [[PCV services]] || Hoag, Iowa, Calcio, Unknown
 
|-
 
|-
| 7 || IsSomethingUartValid2
+
| [4.0.0+] 30 || Ina226VddDdr0V6 (SdevMariko) || 0x3F000409 || 1:4E || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
 
|-
 
|-
| 8 || IsSomethingUartValid2ForTest
+
| [8.0.0+] 31 || || 0x36000001 || 1:08 || N || 400000 || 3 || 5000000 || NFC IC || [[NFC services]] || Hoag
 
|}
 
|}
  
== DoesUartExist ==
+
= AddressingMode =
Takes a u32 [[#UartPort]] and returns boolean success value
+
This is "nn::i2c::AddressingMode".
  
== SetUartBaudrate ==
+
{| class="wikitable sortable" border="1"
Takes a u32 [[#UartPort]] and a u32 baudrate and returns boolean success value
+
|-
 +
! Value || Name
 +
|-
 +
| 0 || BitWidth7
 +
|-
 +
| 1 || BitWidth10
 +
|}
  
== IsSomethingUartValid ==
+
= TransactionOption =
Takes a u32 [[#UartPort]] and returns boolean success value
+
This is "nn::i2c::TransactionOption".
  
== GetSession ==
+
{| class="wikitable sortable" border="1"
Takes a u32 [[#UartPort]] and returns an [[#IPortSession]]
+
|-
 +
! Value || Name
 +
|-
 +
| 1 || StartCondition
 +
|-
 +
| 2 || StopCondition
 +
|}
 +
 
 +
= SpeedMode =
 +
This is "nn::i2c::SpeedMode".
  
== UartPort ==
 
 
{| class="wikitable sortable" border="1"
 
{| class="wikitable sortable" border="1"
 
|-
 
|-
! Name || Port || Usage
+
! Value || Name
 
|-
 
|-
| 1 || UART-D || Bluetooth
+
| 0x186A0 || Standard
 
|-
 
|-
| 2 || UART-B || Joy-Con(R)
+
| 0x61A80 || Fast
 
|-
 
|-
| 3 || UART-C || Joy-Con(L)
+
| 0xF4240 || FastPlus
 +
|-
 +
| 0x33E140 || HighSpeed
 
|}
 
|}
  
== IPortSession ==
+
= CommandId =
This is "nn::uart::IPortSession".
+
This is "nn::i2c::detail::CommandId".
  
{| class="wikitable" border="1"
+
{| class="wikitable sortable" border="1"
 +
|-
 +
! Value || Name
 +
|-
 +
| 0 || Send
 +
|-
 +
| 1 || Receive
 
|-
 
|-
! Cmd || Name
+
| 2 || Extension
 +
|}
 +
 
 +
= SubCommandId =
 +
This is "nn::i2c::detail::SubCommandId".
 +
 
 +
{| class="wikitable sortable" border="1"
 
|-
 
|-
| 0 || OpenSession
+
! Value || Name
 
|-
 
|-
| 1 || OpenSessionForTest
+
| 0 || Sleep
 +
|}
 +
 
 +
= UartPort =
 +
This is "nn::uart::UartPort".
 +
 
 +
{| class="wikitable sortable" border="1"
 
|-
 
|-
| 2 ||
+
! Value || Name || DeviceCode (internal) || DeviceCode (mapped) || Description
 
|-
 
|-
| 3 ||
+
| 0 || UART-A || 0x03000001 || || Invalid
 
|-
 
|-
| 4 ||
+
| 1 || UART-D || 0x03000004 || 0x37000001 || Bluetooth
 
|-
 
|-
| 5 ||
+
| 2 || UART-B || 0x03000002 || 0x35000405 || Joy-Con(R)
 
|-
 
|-
| 6 ||
+
| 3 || UART-C || 0x03000003 || 0x3500040F || Joy-Con(L)
 
|-
 
|-
| 7 ||
+
| 4 || UART-C || 0x03000003 || 0x35000419 || MCU
 
|}
 
|}
  
=== Port Mapping ===
+
= UartPortForDev =
OpenSession translates user IDs to to the [[#UartPort]] index.
+
This is "nn::uart::UartPortForDev".
  
OpenSessionForTest takes the port index verbatim.
+
{| class="wikitable sortable" border="1"
 +
|-
 +
! Value || Name || DeviceCode (internal) || DeviceCode (mapped) || Description
 +
|-
 +
| 0 || UART-A || 0x03000001 || || Invalid
 +
|-
 +
| 1 || UART-B || 0x03000002 || 0x35000405 || Joy-Con(R)
 +
|-
 +
| 2 || UART-C || 0x03000003 || 0x3500040F || Joy-Con(L)
 +
|-
 +
| 3 || UART-D || 0x03000004 || 0x37000001 || Bluetooth
 +
|}
  
= pwm =
+
= FlowControlMode =
This is "nn::pwm::IManager".
+
This is "nn::uart::FlowControlMode".
  
{| class="wikitable" border="1"
+
{| class="wikitable sortable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Value || Name
 
|-
 
|-
| 0 || OpenSessionForDev
+
| 0 || None
 
|-
 
|-
| 1 || OpenSession
+
| 1 || Hardware
 
|}
 
|}
  
== Known Channels ==
+
= PortEventType =
 +
This is "nn::uart::PortEventType".
 +
 
 
{| class="wikitable sortable" border="1"
 
{| class="wikitable sortable" border="1"
 
|-
 
|-
! Name || Interface || Usage || Used by
+
! Value || Name
 +
|-
 +
| 0 || SendBufferEmpty
 
|-
 
|-
| 1 || PWM Channel 1 || Fan || [[PTM services]]
+
| 1 || SendBufferReady
 
|-
 
|-
| 2 || PWM Channel 0 || Backlight || [[Backlight services]], [[NV services]]
+
| 2 || ReceiveBufferReady
 
|-
 
|-
| 3 || PMC Blinker || ||
+
| 3 || ReceiveEnd
 
|}
 
|}
  
== IChannelSession ==
+
= ChannelName =
This is "nn::pwm::IChannelSession".
+
This is "nn::pwm::ChannelName".
  
{| class="wikitable" border="1"
+
{| class="wikitable sortable" border="1"
 +
|-
 +
! Value || Name || DeviceCode || Description || Used by
 +
|-
 +
| 0 || Invalid || || ||
 +
|-
 +
| 1 || CpuFan || 0x3D000001 || PWM Channel 1 || [[PTM_services#fan|PTM services]]
 +
|-
 +
| 2 || LcdBacklight || 0x3400003D || PWM Channel 0 || [[Backlight services]], [[NV services]]
 
|-
 
|-
! Cmd || Name
+
| 3 || Led || 0x35000065 || PMC LED Soft Blink || [[Bus services#led|Bus services]]
 +
|}
 +
 
 +
= AssignablePinGroupName =
 +
This is "nn::pinmux::AssignablePinGroupName".
 +
 
 +
{| class="wikitable sortable" border="1"
 
|-
 
|-
| 0 || SetPeriod
+
! Value || Description
 
|-
 
|-
| 1 || GetPeriod
+
| 0 || GPIO(G, 0) and GPIO(G, 3)
 
|-
 
|-
| 2 || SetDuty
+
| 1 || GPIO(D, 1) and GPIO(D, 4)
 
|-
 
|-
| 3 || GetDuty
+
| 2 || Sdmmc1Clk or GPIO(M, 0), GPIO(M, 1), GPIO(M, 2), GPIO(M, 3), GPIO(M, 4) and GPIO(M, 5)
 
|-
 
|-
| 4 || SetEnabled
+
| 3 || GPIO(V, 4)
 
|-
 
|-
| 5 || GetEnabled
+
| 100 || Invalid
 
|}
 
|}
  
= pinmux =
+
= AssignablePinGroupNameForHardwareTest =
This is "nn::pinmux::IManager".
+
This is "nn::pinmux::AssignablePinGroupNameForHardwareTest".
  
{| class="wikitable" border="1"
+
{| class="wikitable sortable" border="1"
 +
|-
 +
! Value || Description
 +
|-
 +
| 0 || Invalid
 +
|-
 +
| 1 || Invalid
 +
|-
 +
| 2 || Invalid
 
|-
 
|-
! Cmd || Name
+
| 3 || Invalid
 
|-
 
|-
| 0 || OpenSession
+
| 100 || Uart4Tx, Uart4Rx, Uart4Rts and Uart4Cts
 
|}
 
|}
  
== ISession ==
+
= PinAssignment =
This is "nn::pinmux::ISession".
+
This is "nn::pinmux::PinAssignment".
  
{| class="wikitable" border="1"
+
{| class="wikitable sortable" border="1"
 +
|-
 +
! Value || Name
 
|-
 
|-
! Cmd || Name
+
| 2 || Sdmmc1OutputHigh
 
|-
 
|-
| 0 || SetPinAssignment
+
| 3 || Sdmmc1ResetState
 
|-
 
|-
| 1 || GetPinAssignment
+
| 4 || Sdmmc1SchmtEnable
 
|-
 
|-
| 2 || SetPinAssignmentForHardwareTest
+
| 5 || Sdmmc1SchmtDisable
 
|}
 
|}
  
= sasbus =
+
= PinAssignmentForHardwareTest =
This is "nn::sasbus::IManager".
+
This is "nn::pinmux::PinAssignmentForHardwareTest".
 +
 
 +
{| class="wikitable sortable" border="1"
 +
|-
 +
! Value || Name
 +
|-
 +
| 100 || UartDHiZ
 +
|-
 +
| 101 || UartDEnable
 +
|}
  
{| class="wikitable" border="1"
+
= SasbusPort =
 +
{| class="wikitable sortable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Value || Name || DeviceCode || Description
 
|-
 
|-
| 0 || OpenSession
+
| 0 || SPI4 || 0x3500003D || Joy-Con
 
|}
 
|}
  
== ISession ==
+
= AccessMode =
This is "nn::sasbus::ISession".
+
This is "nn::ddsf::AccessMode".
  
{| class="wikitable" border="1"
+
{| class="wikitable sortable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Value || Name
 
|-
 
|-
| 0 ||  
+
| 0 || None
 
|-
 
|-
| 1 ||  
+
| 1 || Read
 
|-
 
|-
| 2 ||  
+
| 2 || Write
 
|-
 
|-
| 3 ||  
+
| 3 || ReadWrite
 
|}
 
|}
  
 
[[Category:Services]]
 
[[Category:Services]]

Latest revision as of 17:09, 26 October 2020

Contents

gpio

This is "nn::gpio::IManager".

Cmd Name
0 #OpenSessionForDev
1 #OpenSession
2 #OpenSessionForTest
3 [1.0.0-6.2.0] #IsWakeEventActive
4 [1.0.0-6.2.0] GetWakeEventActiveFlagSet
5 [1.0.0-6.2.0] SetWakeEventActiveFlagSetForDebug
6 #SetWakePinDebugMode
7 [5.0.0+] #OpenSession2
8 [5.0.0+] #IsWakeEventActive2
9 [5.0.0+] SetWakeEventActiveFlagSetForDebug2
10 [6.0.0+] #SetRetryValues

OpenSessionForDev

Takes a raw #GpioPadDescriptor and returns an #IPadSession.

OpenSession

Same as #OpenSessionForDev except it takes a #GpioPadName which is then converted to a #GpioPadDescriptor. Returns an #IPadSession.

OpenSessionForTest

Same as #OpenSession but panics on failure.

IsWakeEventActive

Takes a #GpioPadName and returns a bool.

SetWakePinDebugMode

Takes an u32 WakePinDebugMode. No output.

OpenSession2

Same as #OpenSession but takes a DeviceCode and an input u32 #AccessMode.

IsWakeEventActive2

Same as #IsWakeEventActive but takes a DeviceCode.

SetRetryValues

Stubbed. Returns 0.

IPadSession

This is "nn::gpio::IPadSession".

Cmd Name
0 SetDirection
1 GetDirection
2 SetInterruptMode
3 GetInterruptMode
4 SetInterruptEnable
5 GetInterruptEnable
6 GetInterruptStatus
7 ClearInterruptStatus
8 SetValue
9 GetValue
10 BindInterrupt
11 UnbindInterrupt
12 SetDebounceEnabled
13 GetDebounceEnabled
14 SetDebounceTime
15 GetDebounceTime
16 [4.0.0+] SetValueForSleepState
17 [6.0.0+] GetValueForSleepState

i2c, i2c:pcv

This is "nn::i2c::IManager".

Cmd Name
0 OpenSessionForDev
1 OpenSession
2 [1.0.0-5.1.0] HasDevice
3 [1.0.0-5.1.0] HasDeviceForDev
4 [6.0.0+] OpenSession2

OpenSessionForDev

Takes an input u32 BusIdx, an input u16 SlaveAddress, and 2 input u32s #AddressingMode and #SpeedMode. Returns an #II2cSession.

OpenSession

Takes an input u32 #I2cDevice. Returns an output #II2cSession.

HasDevice

Takes an input u32 #I2cDevice. Returns an output boolean success value.

HasDeviceForDev

Takes an input u32 BusIdx, an input u16 SlaveAddress, and 2 input u32s #AddressingMode and #SpeedMode. Returns an output boolean success value.

OpenSession2

Same as OpenSession but takes an input u32 DeviceCode.

II2cSession

This is "nn::i2c::ISession".

Cmd Name
0 [1.0.0-5.1.0] SendOld
1 [1.0.0-5.1.0] ReceiveOld
2 [1.0.0-5.1.0] ExecuteCommandListOld
10 #Send
11 #Receive
12 #ExecuteCommandList
13 [6.0.0+] #SetRetryValues

Send

Takes a type-0x21 input buffer InData and an input u32 #TransactionOption. No output.

Receive

Takes a type-0x22 output buffer OutData and an input u32 #TransactionOption. No output.

ExecuteCommandList

Takes a type-0x22 output buffer ReceiveBuffer and a type-0x9 input buffer CommandList. No output.

Commands

This is "nn::i2c::I2cCommand".

Bits Name
0-5 #CommandId
6-7 #TransactionOption

A send command will write bytes to the device using the format: [u8 cmd_send] [u8 len] <bytes>

A receive command will read bytes from the device using the format: [u8 cmd_receive] [u8 len]

An extension sleep command will stall the device using the format: [u8 cmd_extension] [u8 ms]

SetRetryValues

Takes 2 input u32s MaxRetries and RetryDelay. No output.

uart

This is "nn::uart::IManager".

Cmd Name
0 #HasPort
1 #HasPortForDev
2 #IsSupportedBaudRate
3 #IsSupportedBaudRateForDev
4 #IsSupportedFlowControlMode
5 #IsSupportedFlowControlModeForDev
6 #CreatePortSession
7 #IsSupportedPortEvent
8 #IsSupportedPortEventForDev
9 [7.0.0+] #IsSupportedDeviceVariation
10 [7.0.0+] #IsSupportedDeviceVariationForDev

HasPort

Takes an input #UartPort. Returns an output boolean success value.

HasPortForDev

Takes an input #UartPortForDev. Returns an output boolean success value.

IsSupportedBaudRate

Takes 2 input u32s #UartPort and BaudRate. Returns an output boolean success value.

Supported baud rates are 57600, 115200, 1000000 and 3000000.

IsSupportedBaudRateForDev

Takes 2 input u32s #UartPortForDev BaudRate. Returns an output boolean success value.

Supported baud rates are 57600, 115200, 1000000 and 3000000.

IsSupportedFlowControlMode

Takes 2 input u32s #UartPort and #FlowControlMode. Returns an output boolean success value.

IsSupportedFlowControlModeForDev

Takes 2 input u32s #UartPortForDev and #FlowControlMode. Returns an output boolean success value.

CreatePortSession

No input. Returns an output #IPortSession.

IsSupportedPortEvent

Takes 2 input u32s #UartPort and #PortEventType. Returns an output boolean success value.

IsSupportedPortEventForDev

Takes 2 input u32s #UartPortForDev and #PortEventType. Returns an output boolean success value.

IsSupportedDeviceVariation

Takes 2 input u32s #UartPort and DeviceVariation. Returns an output boolean success value.

Supported device variations are 0 (Bluetooth) for UART-D, 0 (Joy-Con(R)) for UART-B, 0 (Joy-Con(L)) and 1 (MCU) for UART-C.

IsSupportedDeviceVariationForDev

Takes 2 input u32s #UartPortForDev and DeviceVariation. Returns an output boolean success value.

Supported device variations are 0 (Bluetooth) for UART-D, 0 (Joy-Con(R)) for UART-B, 0 (Joy-Con(L)) and 1 (MCU) for UART-C.

IPortSession

This is "nn::uart::IPortSession".

Cmd Name
0 #OpenPort
1 #OpenPortForDev
2 #GetWritableLength
3 #Send
4 #GetReadableLength
5 #Receive
6 #BindPortEvent
7 #UnbindPortEvent

OpenPort

Takes 3 input u32s #UartPort, BaudRate and #FlowControlMode, 2 input u64s SendBufferLength and ReceiveBufferLength and 2 input TransferMemory handles SendHandle and ReceiveHandle. Returns an output boolean success value.

[6.0.0+] Takes 4 input u8s (padded as u32) IsInvertTx, IsInvertRx, IsInvertRts and IsInvertCts, 3 input u32s #UartPort, BaudRate and #FlowControlMode, 2 input u64s SendBufferLength and ReceiveBufferLength and 2 input TransferMemory handles SendHandle and ReceiveHandle. Returns an output boolean success value.

[7.0.0+] Takes 4 input u8s (padded as u32) IsInvertTx, IsInvertRx, IsInvertRts and IsInvertCts, 4 input u32s #UartPort, BaudRate, #FlowControlMode and DeviceVariation, 2 input u64s SendBufferLength and ReceiveBufferLength and 2 input TransferMemory handles SendHandle and ReceiveHandle. Returns an output boolean success value.

This will Abort when the specified #UartPort is already being used, due to a SVC failing.

OpenPortForDev

Same as #OpenPort, but takes an input #UartPortForDev instead.

GetWritableLength

No input. Returns an output u64 WritableLength.

Send

Takes a type-0x21 input buffer InData. Returns an output u64 size.

GetReadableLength

No input. Returns an output u64 ReadableLength.

Receive

Takes a type-0x22 output buffer OutData. Returns an output u64 size.

BindPortEvent

Takes an input u32 #PortEventType and an input s64 Threshold. Returns an output boolean success value and an Event handle with EventClearMode=0.

UnbindPortEvent

Takes an input u32 #PortEventType. Returns an output boolean success value.

pwm

This is "nn::pwm::IManager".

Cmd Name
0 OpenSessionForDev
1 OpenSession
2 [6.0.0+] OpenSession2

OpenSession2

Takes a DeviceCode and returns an #IChannelSession.

IChannelSession

This is "nn::pwm::IChannelSession".

Cmd Name
0 SetPeriod
1 GetPeriod
2 SetDuty
3 GetDuty
4 SetEnabled
5 GetEnabled
6 [6.0.0+] SetScale
7 [6.0.0+] GetScale

pinmux

This is "nn::pinmux::IManager".

Cmd Name
0 OpenSession

OpenSession

Takes an #AssignablePinGroupName or an #AssignablePinGroupNameForHardwareTest and returns an ISession.

ISession

This is "nn::pinmux::ISession".

Cmd Name
0 #SetPinAssignment
1 #GetPinAssignment
2 #SetPinAssignmentForHardwareTest

SetPinAssignment

Takes a #PinAssignment. No output.

GetPinAssignment

No input. Returns a #PinAssignment.

SetPinAssignmentForHardwareTest

Takes a #PinAssignmentForHardwareTest. No output.

sasbus

This is "nn::sasbus::IManager".

This was added with [3.0.0+].

Cmd Name
0 OpenSession

OpenSession

Takes a #SasbusPort and returns an ISession.

ISession

This is "nn::sasbus::ISession".

Cmd Name
0 #Write
1 #Read
2 #StartPeriodicReceiveMode
3 #StopPeriodicReceiveMode

Write

Takes a type-0x21 input buffer and an u8 SpiCommand. No output.

Read

Takes a type-0x22 output buffer and an u8 SpiCommand. No output.

StartPeriodicReceiveMode

Takes an u8 SpiCommand (padded to u32), an u32, two u64s and a copy handle. No output.

StopPeriodicReceiveMode

No input/output.

led

This is "nn::led::detail::IManager".

This was added with [8.1.1+].

Cmd Name
0 #OpenController

OpenController

Takes a DeviceCode (which must be 0x35000065) and returns an #IController session for it.

IController

This is "nn::led::detail::IController".

This was added with [8.1.1+].

Cmd Name
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 [8.1.1-9.2.0]

GpioPadName

This is "nn::gpio::GpioPadName".

Value Name GpioPadDescriptor DeviceCode Tegra (port, pin) Description Direction Used by (services) Used by (hardware)
0x01 CodecLdoEnTemp 0xCC 0x33000002 Z, 4 Audio Codec (ALC5639) Power Out Audio services, Fatal services Icosa, Hoag, Iowa, Unknown
0x02 PowSdEn 0x24 0x3C000001 E, 4 SDCard Power Out PCV services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x03 BtRst 0x3C 0x37000002 H, 4 Bluetooth Reset Out Bluetooth Driver services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x04 RamCode3 0xDA 0xC9000402 BB, 2 Secondary Boot Device Configration In Icosa, Iowa
0x05 GameCardReset 0xDB 0x3C000402 BB, 3 Gamecard Reset Out Filesystem services Icosa, Copper, Hoag, Iowa, Unknown
0x06 CodecAlert 0xDC 0x33000003 BB, 4 Audio Codec (ALC5639) Alert In Audio services Icosa, Hoag, Iowa, Unknown
0x07 PowGc 0x25 0x3C000401 E, 5 Gamecard Power Out Icosa, Copper
0x08 DebugControllerDet 0x90 0x350000CA S, 0 Debug Pad Detect In HID services Icosa, Iowa
0x09 BattChgStatus 0x91 0x39000407 S, 1 Battery Charge Status In Icosa, Hoag, Iowa, Unknown
0x0A BattChgEnableN 0x96 0x39000003 S, 6 Charger IC (BQ24193) Charge Enable Out PTM services Icosa, Hoag, Iowa, Unknown
0x0B FanTach 0x97 0x3D000002 S, 7 Fan Tachometer In Icosa, Hoag, Iowa, Calcio, Unknown
0x0C ExtconDetS 0x26 0x3500040B E, 6 Joy-Con(L) IsAttached (insertion, Joy-Con pin 5/console TX, pulled low on insert) In HID services, AM services Icosa, Iowa, Unknown
0x0D Vdd50AEn 0x05 0x39000401 A, 5 Fan and Joy-Con Rails Power (Battery - BQ24193 5V) Out PTM services Icosa, Hoag, Iowa, Unknown
0x0E SdevCoaxSel1 0x78 0xCA000402 P, 0 SDEV Coax Select In Icosa, Iowa
0x0F GameCardCd 0x93 0x3C000403 S, 3 Gamecard Card Detect In Filesystem services, AM services Icosa, Copper, Hoag, Iowa, Unknown
0x10 ProdType0 0x7D 0xC900040B P, 5 In Icosa, Copper, Iowa
0x11 ProdType1 0x7C 0xC900040C P, 4 In Icosa, Copper, Iowa
0x12 ProdType2 0x7B 0xC900040D P, 3 In Icosa, Copper, Iowa
0x13 ProdType3 0x7A 0xC900040E P, 2 In Icosa, Copper, Iowa
0x14 TempAlert 0xBC 0x3E000002 X, 4 Temperature Sensor In Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x15 CodecHpDetIrq 0xAE 0x33000004 V, 6 Audio Codec (ALC5639) Headphone Detect In Audio services Icosa, Hoag, Iowa, Unknown
0x16 MotionInt 0xBA 0x35000041 X, 2 In Icosa, Hoag, Iowa, Unknown
0x17 TpIrq 0xB9 0x35000036 X, 1 TouchPanel IRQ In HID services Icosa, Hoag, Iowa, Unknown
0x18 ButtonSleep2 0xBD 0x35000001 X, 5 Power Button In Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x19 ButtonVolUp 0xBE 0x35000002 X, 6 Volume Up In Boot2, Audio services, Fatal services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x1A ButtonVolDn 0xBF 0x35000003 X, 7 Volume Down In Boot2, Audio services Icosa, Copper, Hoag, Iowa, Calcio , Unknown
0x1B BattMgicIrq 0xC0 0x39000034 Y, 0 Fuel Gauge IC (MAX17050) IRQ In PTM services, AM services Icosa, Hoag, Iowa, Unknown
0x1C RecoveryKey 0xC1 0x35000004 Y, 1 Recovery Mode Key In Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x1D PowLcdBlEn 0xA9 0x3400003E V, 1 Backlight Enable Out NV services, Backlight services Icosa, Hoag, Iowa
0x1E LcdReset 0xAA 0x34000033 V, 2 Backlight Reset Out NV services Icosa, Hoag, Iowa, Unknown
0x1F PdVconnEn 0x55 0x040000CC K, 5 USB-PD Controller (RHOM BM92T30MWV) VCONN Power Out PTM services, USB services Icosa, Hoag, Iowa, Unknown
0x20 PdRstN 0xAD 0x040000CA V, 5 USB-PD Controller (RHOM BM92T30MWV) Reset Out USB services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x21 Bq24190Irq 0xC8 0x39000002 Z, 0 Charger IC (BQ24193) IRQ In PTM services, AM services Icosa, Hoag, Iowa, Unknown
0x22 SdevCoaxSel0 0xCA 0xCA000401 Z, 2 SDEV Coax Select In Icosa, Iowa
0x23 SdWp 0xCB 0x3C000003 Z, 3 SDCard Write Protect In Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x24 TpReset 0x4F 0x35000035 J, 7 TouchPanel Reset Out HID services Icosa, Hoag, Iowa, Unknown
0x25 BtGpio2 0x50 0x37000401 K, 0 In Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x26 BtGpio3 0x51 0x37000402 K, 1 In Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x27 BtGpio4 0x52 0x37000403 K, 2 In Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x28 CradleIrq 0x54 0x040000CB K, 4 USB-PD Controller (RHOM BM92T30MWV) IRQ In USB services, AM services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x29 PowVcpuInt 0x56 0x3E000003 K, 6 In Icosa, Copper, Unknown
0x2A Max77621GpuInt 0x57 0x3E000004 K, 7 In Icosa, Copper
0x2B ExtconChgU 0x53 0x35000402 K, 3 Joy-Con(R) Charge Out HID services Icosa, Iowa, Unknown
0x2C ExtconChgS 0xE3 0x3500040C CC, 3 Joy-Con(L) Charge Out HID services Icosa, Iowa, Unknown
0x2D WifiRfDisable 0x38 0x38000003 H, 0 Out Icosa, Copper, Hoag, Iowa, Calcio
0x2E WifiReset 0x39 0x38000002 H, 1 WiFi Reset Out WLAN services, PCIe services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x2F ApWakeBt 0x3B 0x37000003 H, 3 Out Bluetooth Driver services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x30 BtWakeAp 0x3D 0x37000004 H, 5 In AM services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x31 BtGpio5 0x3F 0x37000404 H, 7 Out Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x32 PowLcdVddPEn 0x40 0x34000034 I, 0 Backlight +5V Out NV services Icosa, Hoag, Iowa
0x33 PowLcdVddNEn 0x41 0x34000035 I, 1 Backlight -5V Out NV services Icosa, Hoag, Iowa
0x34 ExtconDetU 0x3E 0x35000401 H, 6 Joy-Con(R) IsAttached (insertion, Joy-Con pin 5/console TX, pulled low on insert) In HID services, AM services Icosa, Iowa, Unknown
0x35 RamCode2 0xE2 0xC9000401 CC, 2 Secondary Boot Device Configration In Icosa, Iowa
0x36 Vdd50BEn 0xE4 0x39000402 CC, 4 Fan and Joy-Con Rails Power (USB 5V) Out PTM services Icosa, Iowa
0x37 WifiWakeHost 0x3A 0x38000004 H, 2 In AM services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x38 SdCd 0xC9 0x3C000002 Z, 1 SDCard Card Detect In Filesystem services, AM services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
0x39 OtgFet1ForSdev 0x4D 0x39000404 J, 5 Charger IC (BQ24193) OTG Charge Select Out PTM services, USB services Icosa, Iowa
0x3A OtgFet2ForSdev 0x58 0x39000405 L, 0 Charger IC (BQ24193) OTG Charge Select Out PTM services, USB services Icosa, Iowa
0x3B ExtConWakeU 0x3E 0x35000403 H, 6 Joy-Con(R) Wake Detect In Icosa, Hoag, Iowa, Unknown
0x3C ExtConWakeS 0x26 0x3500040D E, 6 Joy-Con(L) Wake Detect In Icosa, Hoag, Iowa, Unknown
0x3D PmuIrq -1 0x39000406
0x3E ExtUart2Cts 0x33 0x35000404 G, 3 Joy-Con(R) CTS (checked low) In HID services, AM services
0x3F ExtUart3Cts 0x1C 0x3500040E D, 4 Joy-Con(L) CTS (checked low) In HID services, AM services
0x40 5VStepDownEn 0xD9 0x39000408 BB, 1 5V Step-Down Regulator Power Out Copper
0x41 UsbSwitchB2Oc 0x0C 0x04000401 B, 4 USB Root Port 2 Over Current In USB services Copper
0x42 5VStepDownPg 0x0D 0x39000409 B, 5 5V Step-Down Regulator Power Good Flag In Copper
0x43 UsbSwitchAEn 0x21 0x04000402 E, 1 USB Power Out USB services Copper
0x44 UsbSwitchAFlag 0x27 0x04000403 E, 7 USB Power Flag In USB services Copper
0x45 UsbSwitchB3Oc 0x92 0x04000404 S, 2 USB Root Port 3 Over Current In USB services Copper
0x46 UsbSwitchB3En 0x95 0x04000405 S, 5 USB Root Port 3 Power Out USB services Copper
0x47 UsbSwitchB2En 0x98 0x04000406 T, 0 USB Root Port 2 Power Out USB services Copper
0x48 Hdmi5VEn 0x10 0x34000004 C, 0 HDMI 5V Out NV services Copper, Calcio
0x49 UsbSwitchB1En 0x11 0x04000407 C, 1 USB Root Port 1 Power Out USB services Copper, Calcio
0x4A HdmiPdTrEn 0x12 0x34000005 C, 2 HDMI/Power Delivery Switch Out NV services Copper, Calcio
0x4B FanEn 0x42 0x3D000003 I, 2 Fan Enable Out PTM services Copper
0x4C UsbSwitchB1Oc 0xE6 0x04000408 CC, 6 USB Root Port 1 Over Current In USB services Copper, Calcio
[2.0.0+] 0x4D PwmFan 0xAC 0x3D000001 V, 4 Pulse-Width Modulation Fan Control Out PTM services Copper
[2.0.0+] 0x4E HdmiHpd 0xE1 0x34000006 CC, 1 HDMI Hot Plug Detect In NV services Copper, Calcio
[5.0.0+] 0x4F Max77812Irq 0x56 0x3E000003 K, 6 In Hoag, Iowa, Calcio
[6.0.0+] 0x50 0x20 0xCA000001 E, 0 Out Hoag, Calcio, Unknown
[6.0.0+] 0x51 0x21 0xCA000002 E, 1 Out Hoag, Calcio, Unknown
[6.0.0+] 0x52 0x22 0xCA000003 E, 2 Out Hoag, Calcio, Unknown
[6.0.0+] 0x53 0x23 0xCA000004 E, 3 Out Hoag, Calcio, Unknown
[6.0.0+] 0x54 NfcIrq 0x4C 0x36000004 J, 4 In NFC services Hoag
[6.0.0+] 0x55 NfcRst 0x57 0x36000003 K, 7 Out NFC services Hoag
[6.0.0+] 0x56 McuIrq 0x27 ([6.0.0-8.0.0] 0x94) 0x35000415 S, 4 In Hoag
[6.0.0+] 0x57 McuBoot 0x98 0x35000416 T, 0 Out HID services Hoag
[6.0.0+] 0x58 McuRst 0x99 0x35000417 T, 1 Out HID services Hoag
[6.0.0+] 0x59 Vdd5V3En 0xBB 0x39000403 X, 3 5V3 Fan Power Out PTM services Hoag, Iowa, Unknown
[6.0.0+] 0x5A McuPor 0xE5 0x35000418 CC, 5 Out HID services Hoag
[6.0.0+] 0x5B 0xAB 0x35000005 V, 3 SioH Input In HID services, AM services Hoag
[6.0.0+] 0x5C NfcEn 0x4E 0x36000002 J, 6 Out NFC services Hoag
[7.0.0+] - ExtUart2Rts 0x32 0x35000406 G, 2 Joy-Con(R) RTS In
[7.0.0+] - ExtUart3Rts 0x1B 0x35000410 D, 3 Joy-Con(L) RTS In
[7.0.0+] - 0x17 0x3500041B C, 7 In Hoag
[7.0.0+] - 0x18 0x3500041C D, 0 In Hoag
[7.0.0+] - 0x15 0x3500041D C, 5 In Hoag
[7.0.0+] - 0x16 0x3500041E C, 6 In Hoag
[10.0.0+] - 0xC5 0x35000065 Y, 5 Out Hoag
[10.0.0+] - 0x29 0x04000409 F, 1 Out Calcio
[10.0.0+] - 0x38 0x34000401 H, 0 In Unknown

GpioPadDescriptor

Bits Description
7-5 Controller index
4-3 Port index
2-0 Pin number

I2cDevice

This is "nn::i2c::I2cDevice".

Value Name DeviceCode Port:Addr Is10bit Speed Max Retries Retry Delay Description Used by (services) Used by (hardware)
0 ClassicController 0x350000C9 0:52 N 100000 0 0 DebugPad Driver HID services Icosa, Iowa, Unknown
1 Ftm3bd56 0x35000033 2:49 N 400000 0 0 TouchPanel HID services Icosa, Hoag, Iowa, Unknown
2 Tmp451 0x3E000001 0:4C N 100000 0 0 Temperature Sensor PTM services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
3 Nct72 0x3E000001 0:4C N 100000 0 0 Temperature Sensor PTM services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
4 Alc5639 0x33000001 0:1C N 100000 0 0 Audio Codec Audio services, Fatal services Icosa, Hoag, Iowa, Unknown
5 Max77620Rtc 0x3B000001 4:68 N 400000 3 5000000 PMIC RTC PCV services Icosa, Copper
6 Max77620Pmic 0x3A000001 4:3C N 400000 3 5000000 PMIC PCV services Icosa, Copper
7 Max77621Cpu 0x3A000003 4:1B N 400000 3 5000000 Sub-PMIC for CPU PCV services Icosa, Copper
8 Max77621Gpu 0x3A000004 4:1C N 400000 3 5000000 Sub-PMIC for GPU PCV services Icosa, Copper
9 Bq24193 0x39000001 0:6B N 100000 3 5000000 Charger IC PTM services Icosa, Hoag, Iowa, Unknown
10 Max17050 0x39000033 0:36 N 100000 3 5000000 Fuel Gauge IC PTM services, PCV services Icosa, Hoag, Iowa, Unknown
11 Bm92t30mwv 0x040000C9 0:18 N 100000 3 5000000 USB-PD controller USB services Icosa, Copper, Hoag, Iowa, Calcio, Unknown
12 Ina226Vdd15v0Hb 0x3F000401 1:40 N 400000 3 5000000 Power Monitor nvdbgsvc Factory
13 Ina226VsysCpuDs or Ina226VddCpuAp (SdevMariko) 0x3F000001 1:41 N 400000 3 5000000 Power Monitor nvdbgsvc Factory
14 Ina226VsysGpuDs or Ina226VddGpuAp (SdevMariko) 0x3F000002 1:44 N 400000 3 5000000 Power Monitor nvdbgsvc Factory
15 Ina226VsysDdrDs or Ina226VddDdr1V1Pmic (SdevMariko) 0x3F000003 1:45 N 400000 3 5000000 Power Monitor nvdbgsvc Factory
16 Ina226VsysAp 0x3F000402 1:46 N 400000 3 5000000 Power Monitor nvdbgsvc Factory
17 Ina226VsysBlDs 0x3F000403 1:47 N 400000 3 5000000 Power Monitor nvdbgsvc Factory
18 Bh1730 0x35000047 1:29 N 400000 3 5000000 Ambient Light Sensor Backlight services Icosa, Hoag, Iowa, Unknown
19 Ina226VsysCore or Ina226VddCoreAp (SdevMariko) 0x3F000404 1:48 N 400000 3 5000000 Power Monitor nvdbgsvc Factory
20 Ina226Soc1V8 or Ina226VddSoc1V8 (SdevMariko) 0x3F000405 1:49 N 400000 3 5000000 Power Monitor nvdbgsvc Factory
21 Ina226Lpddr1V8 or Ina226Vdd1V8 (SdevMariko) 0x3F000406 1:4A N 400000 3 5000000 Power Monitor nvdbgsvc Factory
22 Ina226Reg1V32 0x3F000407 1:4B N 400000 3 5000000 Power Monitor nvdbgsvc Factory
23 Ina226Vdd3V3Sys 0x3F000408 1:4D N 400000 3 5000000 Power Monitor nvdbgsvc Factory
[2.0.0+] 24 0x34000001 3:50 N 100000 0 0 HDMI DDC NV services Copper, Calcio
[2.0.0+] 25 0x34000002 3:54 N 100000 0 0 HDMI SCDC NV services Copper, Calcio
[2.0.0+] 26 0x34000003 3:3A N 100000 0 0 HDMI HDCP NV services Copper, Calcio
[4.0.0+] 27 Fan53528 0x3A000005 4:52 ([4.0.0-8.0.0] 4:A4) N 400000 0 0 Buck Regulator Hoag, Iowa, Calcio, Unknown
[4.0.0+] 28 Max77812Pmic 0x3A000002 4:31 ([8.0.0-9.2.0] 4:33, [4.0.0-8.0.0] 4:31) N 400000 0 0 PMIC PCV services Hoag, Iowa, Calcio, Unknown
[4.0.0+] 29 Max77812Pmic 0x3A000006 ([4.0.0-9.2.0] 0x3A000002) 4:33 ([4.0.0-8.0.0] 4:31) N 400000 0 0 PMIC PCV services Hoag, Iowa, Calcio, Unknown
[4.0.0+] 30 Ina226VddDdr0V6 (SdevMariko) 0x3F000409 1:4E N 400000 3 5000000 Power Monitor nvdbgsvc Factory
[8.0.0+] 31 0x36000001 1:08 N 400000 3 5000000 NFC IC NFC services Hoag

AddressingMode

This is "nn::i2c::AddressingMode".

Value Name
0 BitWidth7
1 BitWidth10

TransactionOption

This is "nn::i2c::TransactionOption".

Value Name
1 StartCondition
2 StopCondition

SpeedMode

This is "nn::i2c::SpeedMode".

Value Name
0x186A0 Standard
0x61A80 Fast
0xF4240 FastPlus
0x33E140 HighSpeed

CommandId

This is "nn::i2c::detail::CommandId".

Value Name
0 Send
1 Receive
2 Extension

SubCommandId

This is "nn::i2c::detail::SubCommandId".

Value Name
0 Sleep

UartPort

This is "nn::uart::UartPort".

Value Name DeviceCode (internal) DeviceCode (mapped) Description
0 UART-A 0x03000001 Invalid
1 UART-D 0x03000004 0x37000001 Bluetooth
2 UART-B 0x03000002 0x35000405 Joy-Con(R)
3 UART-C 0x03000003 0x3500040F Joy-Con(L)
4 UART-C 0x03000003 0x35000419 MCU

UartPortForDev

This is "nn::uart::UartPortForDev".

Value Name DeviceCode (internal) DeviceCode (mapped) Description
0 UART-A 0x03000001 Invalid
1 UART-B 0x03000002 0x35000405 Joy-Con(R)
2 UART-C 0x03000003 0x3500040F Joy-Con(L)
3 UART-D 0x03000004 0x37000001 Bluetooth

FlowControlMode

This is "nn::uart::FlowControlMode".

Value Name
0 None
1 Hardware

PortEventType

This is "nn::uart::PortEventType".

Value Name
0 SendBufferEmpty
1 SendBufferReady
2 ReceiveBufferReady
3 ReceiveEnd

ChannelName

This is "nn::pwm::ChannelName".

Value Name DeviceCode Description Used by
0 Invalid
1 CpuFan 0x3D000001 PWM Channel 1 PTM services
2 LcdBacklight 0x3400003D PWM Channel 0 Backlight services, NV services
3 Led 0x35000065 PMC LED Soft Blink Bus services

AssignablePinGroupName

This is "nn::pinmux::AssignablePinGroupName".

Value Description
0 GPIO(G, 0) and GPIO(G, 3)
1 GPIO(D, 1) and GPIO(D, 4)
2 Sdmmc1Clk or GPIO(M, 0), GPIO(M, 1), GPIO(M, 2), GPIO(M, 3), GPIO(M, 4) and GPIO(M, 5)
3 GPIO(V, 4)
100 Invalid

AssignablePinGroupNameForHardwareTest

This is "nn::pinmux::AssignablePinGroupNameForHardwareTest".

Value Description
0 Invalid
1 Invalid
2 Invalid
3 Invalid
100 Uart4Tx, Uart4Rx, Uart4Rts and Uart4Cts

PinAssignment

This is "nn::pinmux::PinAssignment".

Value Name
2 Sdmmc1OutputHigh
3 Sdmmc1ResetState
4 Sdmmc1SchmtEnable
5 Sdmmc1SchmtDisable

PinAssignmentForHardwareTest

This is "nn::pinmux::PinAssignmentForHardwareTest".

Value Name
100 UartDHiZ
101 UartDEnable

SasbusPort

Value Name DeviceCode Description
0 SPI4 0x3500003D Joy-Con

AccessMode

This is "nn::ddsf::AccessMode".

Value Name
0 None
1 Read
2 Write
3 ReadWrite