Bus services: Difference between revisions

(15 intermediate revisions by 4 users not shown)
Line 45: Line 45:


== OpenSession2 ==
== OpenSession2 ==
Same as [[#OpenSession]] but takes a [[#GpioPadName|DeviceCode]] and an u32.
Same as [[#OpenSession]] but takes a [[#GpioPadName|DeviceCode]] and an input u32 [[#AccessMode]].


== IsWakeEventActive2 ==
== IsWakeEventActive2 ==
Line 116: Line 116:


== OpenSessionForDev ==
== OpenSessionForDev ==
Takes an u32 '''port''', an u16 '''addr''', an '''AddressingMode''' (1 for 10-bit, 0 otherwise) and a '''SpeedMode''' (400000 or 100000). Returns an [[#II2cSession]].
Takes an input u32 '''BusIdx''', an input u16 '''SlaveAddress''', and 2 input u32s [[#AddressingMode]] and [[#SpeedMode]]. Returns an [[#II2cSession]].


== OpenSession ==
== OpenSession ==
Takes an [[#I2cDevice]] and returns an [[#II2cSession]].
Takes an input u32 [[#I2cDevice]]. Returns an output [[#II2cSession]].


== HasDevice ==
== HasDevice ==
Takes an [[#I2cDevice]] and returns true if the device exists or false otherwise.
Takes an input u32 [[#I2cDevice]]. Returns an output boolean success value.


== HasDeviceForDev ==
== 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.
Takes an input u32 '''BusIdx''', an input u16 '''SlaveAddress''', and 2 input u32s [[#AddressingMode]] and [[#SpeedMode]]. Returns an output boolean success value.


== OpenSession2 ==
== OpenSession2 ==
Same as [[#OpenSession_2|OpenSession]] but takes a [[#I2cDevice|DeviceCode]].
Same as [[#OpenSession_2|OpenSession]] but takes an input u32 [[#I2cDevice|DeviceCode]].


== II2cSession ==
== II2cSession ==
Line 137: Line 137:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [1.0.0-5.1.0] Send
| 0 || [1.0.0-5.1.0] SendOld
|-
|-
| 1 || [1.0.0-5.1.0] Receive
| 1 || [1.0.0-5.1.0] ReceiveOld
|-
|-
| 2 || [1.0.0-5.1.0] ExecuteCommandList
| 2 || [1.0.0-5.1.0] ExecuteCommandListOld
|-
|-
| 10 || [[#SendAuto]]
| 10 || [[#Send]]
|-
|-
| 11 || ReceiveAuto
| 11 || [[#Receive]]
|-
|-
| 12 || [[#ExecuteCommandListAuto]]
| 12 || [[#ExecuteCommandList]]
|-
|-
| 13 || [6.0.0+] [[#SetRetryValues]]
| 13 || [6.0.0+] [[#SetRetryPolicy]]
|}
|}


== SendAuto ==
== Send ==
Takes bytes to write in either a static buffer or a receive buffer, returns an error code for success.
Takes a type-0x21 input buffer '''InData''' and an input u32 [[#TransactionOption]]. No output.


== ExecuteCommandListAuto ==
== Receive ==
Takes a command list from either a static buffer or a receive buffer, returns data in either a static (or recieve?) buffer.
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 ===
=== Commands ===
* 0x40 [u8 len] <bytes> - Write bytes to device
This is "nn::i2c::I2cCommand".
* 0xC1 [u8 len] - Receive bytes from device


== SetRetryValues ==
{| class=wikitable
Takes 2 u32s '''MaxRetries''' and '''RetryDelay'''. Returns 0.
! 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]
 
== SetRetryPolicy ==
Takes 2 input u32s '''MaxRetries''' and '''RetryIntervalMicroSeconds'''. No output.


= uart =
= uart =
Line 190: Line 206:
| 8 || [[#IsSupportedPortEventForDev]]
| 8 || [[#IsSupportedPortEventForDev]]
|-
|-
| 9 || [7.0.0+] [[#IsSupportedDevice]]
| 9 || [7.0.0+] [[#IsSupportedDeviceVariation]]
|-
|-
| 10 || [7.0.0+] [[#IsSupportedDeviceForDev]]
| 10 || [7.0.0+] [[#IsSupportedDeviceVariationForDev]]
|}
|}


== HasPort ==
== HasPort ==
Takes an [[#UartPort]]. Returns a boolean success value.
Takes an input [[#UartPort]]. Returns an output boolean success value.


== HasPortForDev ==
== HasPortForDev ==
Takes an [[#UartPortForDev]]. Returns a boolean success value.
Takes an input [[#UartPortForDev]]. Returns an output boolean success value.


== IsSupportedBaudRate ==
== IsSupportedBaudRate ==
Takes an [[#UartPort]] and an u32 '''BaudRate'''. Returns a boolean success value.
Takes 2 input u32s [[#UartPort]] and '''BaudRate'''. Returns an output boolean success value.


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


== IsSupportedBaudRateForDev ==
== IsSupportedBaudRateForDev ==
Takes an [[#UartPortForDev]] and an u32 '''BaudRate'''. Returns a boolean success value.
Takes 2 input u32s [[#UartPortForDev]] '''BaudRate'''. Returns an output boolean success value.


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


== IsSupportedFlowControlMode ==
== IsSupportedFlowControlMode ==
Takes an [[#UartPort]] and an u32 '''FlowControlMode'''. Returns a boolean success value.
Takes 2 input u32s [[#UartPort]] and [[#FlowControlMode]]. Returns an output boolean success value.
 
Supported modes are 0 (RTS) and 1 (CTS).


== IsSupportedFlowControlModeForDev ==
== IsSupportedFlowControlModeForDev ==
Takes an [[#UartPortForDev]] and an u32 '''FlowControlMode'''. Returns a boolean success value.
Takes 2 input u32s [[#UartPortForDev]] and [[#FlowControlMode]]. Returns an output boolean success value.
 
Supported modes are 0 (RTS) and 1 (CTS).


== CreatePortSession ==
== CreatePortSession ==
No input. Returns an [[#IPortSession]].
No input. Returns an output [[#IPortSession]].


== IsSupportedPortEvent ==
== IsSupportedPortEvent ==
Takes an [[#UartPort]] and an u32 '''PortEvent'''. Returns a boolean success value.
Takes 2 input u32s [[#UartPort]] and [[#PortEventType]]. Returns an output boolean success value.
 
Supported events are 0 (data), 1 (break), 2 (unknown) and 3 (unknown).


== IsSupportedPortEventForDev ==
== IsSupportedPortEventForDev ==
Takes an [[#UartPortForDev]] and an u32 '''PortEvent'''. Returns a boolean success value.
Takes 2 input u32s [[#UartPortForDev]] and [[#PortEventType]]. Returns an output boolean success value.


Supported events are 0 (data), 1 (break), 2 (unknown) and 3 (unknown).
== IsSupportedDeviceVariation ==
Takes 2 input u32s [[#UartPort]] and '''DeviceVariation'''. Returns an output boolean success value.


== IsSupportedDevice ==
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.
Takes an [[#UartPort]] and an u32 '''Device'''. Returns a boolean success value.


Supported devices 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.


== IsSupportedDeviceForDev ==
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.
Takes an [[#UartPortForDev]] and an u32 '''Device'''. Returns a boolean success value.
 
Supported devices are 0 (Bluetooth) for UART-D, 0 (Joy-Con(R)) for UART-B, 0 (Joy-Con(L)) and 1 (MCU) for UART-C.


== IPortSession ==
== IPortSession ==
Line 255: Line 263:
| 1 || [[#OpenPortForDev]]
| 1 || [[#OpenPortForDev]]
|-
|-
| 2 || GetWritableLength
| 2 || [[#GetWritableLength]]
|-
|-
| 3 || Send
| 3 || [[#Send]]
|-
|-
| 4 || GetReadableLength
| 4 || [[#GetReadableLength]]
|-
|-
| 5 || Receive
| 5 || [[#Receive]]
|-
|-
| 6 || BindPortEvent
| 6 || [[#BindPortEvent]]
|-
|-
| 7 || UnbindPortEvent
| 7 || [[#UnbindPortEvent]]
|}
|}


=== OpenPort ===
=== OpenPort ===
Takes an [[#UartPort]], 3 u32s, 2 copy handles and 4 u8s (each padded to u32). Returns a boolean success value.
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.


[7.0.0+] Now takes an additional u64.
[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 ===
=== OpenPortForDev ===
Takes an [[#UartPortForDev]], 3 u32s, 2 copy handles and 4 u8s (each padded to u32). Returns a boolean success value.
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.


[7.0.0+] Now takes an additional u64.
=== UnbindPortEvent ===
Takes an input u32 [[#PortEventType]]. Returns an output boolean success value.


= pwm =
= pwm =
Line 347: Line 375:


=== SetPinAssignment ===
=== SetPinAssignment ===
Takes an u32 '''PinAssignment'''. No output.
Takes a [[#PinAssignment]]. No output.


=== GetPinAssignment ===
=== GetPinAssignment ===
No input. Returns an u32 '''PinAssignment'''.
No input. Returns a [[#PinAssignment]].


=== SetPinAssignmentForHardwareTest ===
=== SetPinAssignmentForHardwareTest ===
Takes an u32 '''PinAssignmentForHardwareTest'''. No output.
Takes a [[#PinAssignmentForHardwareTest]]. No output.


= sasbus =
= sasbus =
Line 632: Line 660:
| [5.0.0+] 0x4F || Max77812Irq || 0x56 || 0x3E000003 || K, 6 || || In || || Hoag, Iowa, 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+] 0x50 || Debug0 || 0x20 || 0xCA000001 || E, 0 || || Out || || Hoag, Calcio, Unknown
|-
|-
| [6.0.0+] 0x51 || || 0x21 || 0xCA000002 || E, 1 || || Out || || Hoag, Calcio, Unknown
| [6.0.0+] 0x51 || Debug1 || 0x21 || 0xCA000002 || E, 1 || || Out || || Hoag, Calcio, Unknown
|-
|-
| [6.0.0+] 0x52 || || 0x22 || 0xCA000003 || E, 2 || || Out || || Hoag, Calcio, Unknown
| [6.0.0+] 0x52 || Debug2 || 0x22 || 0xCA000003 || E, 2 || || Out || || Hoag, Calcio, Unknown
|-
|-
| [6.0.0+] 0x53 || || 0x23 || 0xCA000004 || E, 3 || || Out || || Hoag, Calcio, Unknown
| [6.0.0+] 0x53 || Debug3 || 0x23 || 0xCA000004 || E, 3 || || Out || || Hoag, Calcio, Unknown
|-
|-
| [6.0.0+] 0x54 || NfcIrq || 0x4C || 0x36000004 || J, 4 || || In || [[NFC services]] || Hoag
| [6.0.0+] 0x54 || NfcIrq || 0x4C || 0x36000004 || J, 4 || || In || [[NFC services]] || Hoag
Line 694: Line 722:
{| class="wikitable sortable" border="1"
{| class="wikitable sortable" border="1"
|-
|-
! Name || DeviceCode || Port:Addr || Is10bit || Speed || Max Retries || Retry Delay || Usage || Used by (services) || Used by (hardware)
! 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
|-
|-
0 || 0x350000C9 || 0:52 || N || 100000 || 0 ||       0 || DebugPadDriver || [[HID services]] || Icosa, Iowa, Unknown
6 || Max77620Pmic || 0x3A000001 || 4:3C || N || 400000 || 3 || 5000000 || PMIC || [[PCV services]] || Icosa, Copper
|-
|-
1 || 0x35000033 || 2:49 || N || 400000 || 0 ||       0 || TouchPanel || [[HID services]] || Icosa, Hoag, Iowa, Unknown
7 || Max77621Cpu || 0x3A000003 || 4:1B || N || 400000 || 3 || 5000000 || Sub-PMIC for CPU || [[PCV services]] || Icosa, Copper
|-
|-
2 || 0x3E000001 || 0:4C || N || 100000 || 0 ||       0 || Temperature Sensor (TMP451 or NCT72) || [[PTM services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
8 || Max77621Gpu || 0x3A000004 || 4:1C || N || 400000 || 3 || 5000000 || Sub-PMIC for GPU || [[PCV services]] || Icosa, Copper
|-
|-
3 || 0x3E000001 || 0:4C || N || 100000 || 0 ||       0 || Temperature Sensor (TMP451 or NCT72) (duplicate) || [[PTM services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
9 || Bq24193 || 0x39000001 || 0:6B || N || 100000 || 3 || 5000000 || Charger IC || [[PTM services]] || Icosa, Hoag, Iowa, Unknown
|-
|-
| 4 || 0x33000001 || 0:1C || N || 100000 || 0 ||       0 || Audio Codec (ALC5639) || [[Audio services]], [[Fatal 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
|-
|-
| 5 || 0x3B000001 || 4:68 || N || 400000 || 3 || 5000000 || PMIC RTC (max77620_rtc0), max77620_irq0 || [[PCV services]] || Icosa, Copper
| 11 || Bm92t30mwv || 0x040000C9 || 0:18 || N || 100000 || 3 || 5000000 || USB-PD controller || [[USB services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
|-
|-
| 6 || 0x3A000001 || 4:3C || N || 400000 || 3 || 5000000 || PMIC (MAX77620), max77620_irq0 || [[PCV services]] || Icosa, Copper
| 12 || Ina226Vdd15v0Hb || 0x3F000401 || 1:40 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| 7 || 0x3A000003 || 4:1B || N || 400000 || 3 || 5000000 || Sub-PMIC for CPU (max77621_cpu) || [[PCV services]] || Icosa, Copper
| 13 || Ina226VsysCpuDs or Ina226VddCpuAp (SdevMariko) || 0x3F000001 || 1:41 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| 8 || 0x3A000004 || 4:1C || N || 400000 || 3 || 5000000 || Sub-PMIC for GPU (max77621_gpu) || [[PCV services]] || Icosa, Copper
| 14 || Ina226VsysGpuDs or Ina226VddGpuAp (SdevMariko) || 0x3F000002 || 1:44 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| 9 || 0x39000001 || 0:6B || N || 100000 || 3 || 5000000 || Charger IC (BQ24193) || [[PTM services]] || Icosa, Hoag, Iowa, Unknown
| 15 || Ina226VsysDdrDs or Ina226VddDdr1V1Pmic (SdevMariko) || 0x3F000003 || 1:45 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| 10 || 0x39000033 || 0:36 || N || 100000 || 3 || 5000000 || Fuel Gauge IC (MAX17050) || [[PTM services]], [[PCV services]] || Icosa, Hoag, Iowa, Unknown
| 16 || Ina226VsysAp || 0x3F000402 || 1:46 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| 11 || 0x040000C9 || 0:18 || N || 100000 || 3 || 5000000 || USB-PD controller (RHOM BM92T30MWV) || [[USB services]] || Icosa, Copper, Hoag, Iowa, Calcio, Unknown
| 17 || Ina226VsysBlDs || 0x3F000403 || 1:47 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| 12 || 0x3F000401 || 1:40 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VDD15V0-HB) || nvdbgsvc || Factory
| 18 || Bh1730 || 0x35000047 || 1:29 || N || 400000 || 3 || 5000000 || Ambient Light Sensor || [[Backlight services]] || Icosa, Hoag, Iowa, Unknown
|-
|-
| 13 || 0x3F000001 || 1:41 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VSYS-CPU-DS or SdevMariko_ina226_VDD_CPU_AP) || nvdbgsvc || Factory
| 19 || Ina226VsysCore or Ina226VddCoreAp (SdevMariko) || 0x3F000404 || 1:48 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| 14 || 0x3F000002 || 1:44 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VSYS-GPU-DS or SdevMariko_ina226_VDD_GPU_AP) || nvdbgsvc || Factory
| 20 || Ina226Soc1V8 or Ina226VddSoc1V8 (SdevMariko) || 0x3F000405 || 1:49 || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| 15 || 0x3F000003 || 1:45 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VSYS-DDR-DS or SdevMariko_ina226_V_VDD-DDR_1V1-PMIC) || nvdbgsvc || Factory
| 21 || Ina226Lpddr1V8 or Ina226Vdd1V8 (SdevMariko) || 0x3F000406 || 1:4A || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| 16 || 0x3F000402 || 1:46 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VSYS-AP) || nvdbgsvc || Factory
| 22 || Ina226Reg1V32 || 0x3F000407 || 1:4B || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| 17 || 0x3F000403 || 1:47 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VSYS-BL-DS) || nvdbgsvc || Factory
| 23 || Ina226Vdd3V3Sys || 0x3F000408 || 1:4D || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| 18 || 0x35000047 || 1:29 || N || 400000 || 3 || 5000000 || Ambient Light Sensor (BH1730) || [[Backlight services]] || Icosa, Hoag, Iowa, Unknown
| [2.0.0+] 24 || HdmiDdc || 0x34000001 || 3:50 || N || 100000 || 0 ||       0 || HDMI DDC || [[NV services]] || Copper, Calcio
|-
|-
| 19 || 0x3F000404 || 1:48 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_SYS-CORE or SdevMariko_ina226_V_VDD-CORE-AP) || nvdbgsvc || Factory
| [2.0.0+] 25 || HdmiScdc || 0x34000002 || 3:54 || N || 100000 || 0 ||       0 || HDMI SCDC || [[NV services]] || Copper, Calcio
|-
|-
| 20 || 0x3F000405 || 1:49 || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_SOC-1V8 or SdevMariko_ina226_V_VDD_SOC-1V8) || nvdbgsvc || Factory
| [2.0.0+] 26 || HdmiHdcp || 0x34000003 || 3:3A || N || 100000 || 0 ||       0 || HDMI HDCP || [[NV services]] || Copper, Calcio
|-
|-
| 21 || 0x3F000406 || 1:4A || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_LPDDR-1V8 or SdevMariko_ina226_V_VDD_1V8) || nvdbgsvc || Factory
| [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
|-
|-
| 22 || 0x3F000407 || 1:4B || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_REG-1V32) || nvdbgsvc || Factory
| [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
|-
|-
| 23 || 0x3F000408 || 1:4D || N || 400000 || 3 || 5000000 || Power Monitor (ina226_V_VDD-3V3-SYS) || nvdbgsvc || Factory
| [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
|-
|-
| [2.0.0+] 24 || 0x34000001 || 3:50 || N || 100000 || 0 ||       0 || HDMI DDC || [[NV services]] || Copper, Calcio
| [4.0.0+] 30 || Ina226VddDdr0V6 (SdevMariko) || 0x3F000409 || 1:4E || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
|-
|-
| [2.0.0+] 25 || 0x34000002 || 3:54 || N || 100000 || 0 ||       0 || HDMI SCDC || [[NV services]] || Copper, Calcio
| [8.0.0+] 31 || || 0x36000001 || 1:08 || N || 400000 || 3 || 5000000 || NFC IC || [[NFC services]] || Hoag
|}
 
= AddressingMode =
This is "nn::i2c::AddressingMode".
 
{| class="wikitable sortable" border="1"
|-
! Value || Name
|-
| 0 || BitWidth7
|-
| 1 || BitWidth10
|}
 
= TransactionOption =
This is "nn::i2c::TransactionOption".
 
{| class="wikitable sortable" border="1"
|-
! Value || Name
|-
| 1 || StartCondition
|-
| 2 || StopCondition
|}
 
= SpeedMode =
This is "nn::i2c::SpeedMode".
 
{| class="wikitable sortable" border="1"
|-
! Value || Name
|-
| 0x186A0 || Standard
|-
| 0x61A80 || Fast
|-
| 0xF4240 || FastPlus
|-
| 0x33E140 || HighSpeed
|}
 
= CommandId =
This is "nn::i2c::detail::CommandId".
 
{| class="wikitable sortable" border="1"
|-
|-
| [2.0.0+] 26 || 0x34000003 || 3:3A || N || 100000 || 0 ||      0 || HDMI HDCP || [[NV services]] || Copper, Calcio
! Value || Name
|-
|-
| [4.0.0+] 27 || 0x3A000005 || 4:52 ([4.0.0-8.0.0] 4:A4) || N || 400000 || 0 ||      0 || Buck Regulator (FAN53528) || || Hoag, Iowa, Calcio, Unknown
| 0 || Send
|-
|-
| [4.0.0+] 28 || 0x3A000002 || 4:31 ([8.0.0-9.2.0] 4:33, [4.0.0-8.0.0] 4:31) || N || 400000 || 0 ||      0 || PMIC (MAX77812) || [[PCV services]] || Hoag, Iowa, Calcio, Unknown
| 1 || Receive
|-
|-
| [4.0.0+] 29 || 0x3A000006 ([4.0.0-9.2.0] 0x3A000002) || 4:33 ([4.0.0-8.0.0] 4:31) || N || 400000 || 0 ||      0 || PMIC (MAX77812) || [[PCV services]] || Hoag, Iowa, Calcio, Unknown
| 2 || Extension
|}
 
= SubCommandId =
This is "nn::i2c::detail::SubCommandId".
 
{| class="wikitable sortable" border="1"
|-
|-
| [4.0.0+] 30 || 0x3F000409 || 1:4E || N || 400000 || 3 || 5000000 || Power Monitor (SdevMariko_ina226_V_VDD_DDR_0V6) || nvdbgsvc || Factory
! Value || Name
|-
|-
| [8.0.0+] 31 || 0x36000001 || 1:08 || N || 400000 || 3 || 5000000 || NFC IC || [[NFC services]] || Hoag
| 0 || Sleep
|}
|}


= UartPort =
= UartPort =
This is "nn::uart::UartPort".
{| class="wikitable sortable" border="1"
{| class="wikitable sortable" border="1"
|-
|-
! Name || DeviceCode (internal) || DeviceCode (mapped) || Port || Usage
! Value || Name || DeviceCode (internal) || DeviceCode (mapped) || Description
|-
|-
| 0 || 0x03000001 || || UART-A || Invalid
| 0 || UART-A || 0x03000001 || || Invalid
|-
|-
| 1 || 0x03000004 || 0x37000001 || UART-D || Bluetooth
| 1 || UART-D || 0x03000004 || 0x37000001 || Bluetooth
|-
|-
| 2 || 0x03000002 || 0x35000405 || UART-B || Joy-Con(R)
| 2 || UART-B || 0x03000002 || 0x35000405 || Joy-Con(R)
|-
|-
| 3 || 0x03000003 || 0x3500040F || UART-C || Joy-Con(L)
| 3 || UART-C || 0x03000003 || 0x3500040F || Joy-Con(L)
|-
|-
| 4 || 0x03000003 || 0x35000419 || UART-C || MCU
| 4 || UART-C || 0x03000003 || 0x35000419 || MCU
|}
|}


= UartPortForDev =
= UartPortForDev =
This is "nn::uart::UartPortForDev".
{| 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
|}
= FlowControlMode =
This is "nn::uart::FlowControlMode".
{| class="wikitable sortable" border="1"
|-
! Value || Name
|-
| 0 || None
|-
| 1 || Hardware
|}
= PortEventType =
This is "nn::uart::PortEventType".
{| class="wikitable sortable" border="1"
{| class="wikitable sortable" border="1"
|-
|-
! Name || DeviceCode (internal) || DeviceCode (mapped) || Port || Usage
! Value || Name
|-
|-
| 0 || 0x03000001 || || UART-A || Invalid
| 0 || SendBufferEmpty
|-
|-
| 1 || 0x03000002 || 0x35000405 || UART-B || Joy-Con(R)
| 1 || SendBufferReady
|-
|-
| 2 || 0x03000003 || 0x3500040F || UART-C || Joy-Con(L)
| 2 || ReceiveBufferReady
|-
|-
| 3 || 0x03000004 || 0x37000001 || UART-D || Bluetooth
| 3 || ReceiveEnd
|}
|}


Line 796: Line 920:
{| class="wikitable sortable" border="1"
{| class="wikitable sortable" border="1"
|-
|-
! Value || Name || DeviceCode || Interface || Used by
! Value || Name || DeviceCode || Description || Used by
|-
|-
| 0 || Invalid || || ||
| 0 || Invalid || || ||
Line 812: Line 936:
{| class="wikitable sortable" border="1"
{| class="wikitable sortable" border="1"
|-
|-
! Name || Usage
! Value || Description
|-
|-
| 0 || GPIO(G, 0) and GPIO(G, 3)
| 0 || GPIO(G, 0) and GPIO(G, 3)
Line 830: Line 954:
{| class="wikitable sortable" border="1"
{| class="wikitable sortable" border="1"
|-
|-
! Name || Usage
! Value || Description
|-
|-
| 0 || Invalid
| 0 || Invalid
Line 841: Line 965:
|-
|-
| 100 || Uart4Tx, Uart4Rx, Uart4Rts and Uart4Cts
| 100 || Uart4Tx, Uart4Rx, Uart4Rts and Uart4Cts
|}
= PinAssignment =
This is "nn::pinmux::PinAssignment".
{| class="wikitable sortable" border="1"
|-
! Value || Name
|-
| 2 || Sdmmc1OutputHigh
|-
| 3 || Sdmmc1ResetState
|-
| 4 || Sdmmc1SchmtEnable
|-
| 5 || Sdmmc1SchmtDisable
|}
= PinAssignmentForHardwareTest =
This is "nn::pinmux::PinAssignmentForHardwareTest".
{| class="wikitable sortable" border="1"
|-
! Value || Name
|-
| 100 || UartDHiZ
|-
| 101 || UartDEnable
|}
|}


Line 846: Line 998:
{| class="wikitable sortable" border="1"
{| class="wikitable sortable" border="1"
|-
|-
! Name || DeviceCode || Port || Usage
! Value || Name || DeviceCode || Description
|-
| 0 || SPI4 || 0x3500003D || Joy-Con
|}
 
= AccessMode =
This is "nn::ddsf::AccessMode".
 
{| class="wikitable sortable" border="1"
|-
! Value || Name
|-
| 0 || None
|-
| 1 || Read
|-
| 2 || Write
|-
|-
| 0 || 0x3500003D || SPI4 || Joy-Con
| 3 || ReadWrite
|}
|}


[[Category:Services]]
[[Category:Services]]