Bus services: Difference between revisions

 
(19 intermediate revisions by 3 users not shown)
Line 6: Line 6:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#OpenSessionForDev|OpenSessionForDev]]
| 0 || [5.0.0+] [[#OpenSessionForDevDeprecated|OpenSessionForDevDeprecated]] ([1.0.0-4.1.0] OpenSessionForDev)
|-
|-
| 1 || [[#OpenSession|OpenSession]]
| 1 || [5.0.0+] [[#OpenSessionDeprecated|OpenSessionDeprecated]] ([1.0.0-4.1.0] OpenSession)
|-
|-
| 2 || [[#OpenSessionForTest|OpenSessionForTest]]
| 2 || [5.0.0+] [[#OpenSessionForTestDeprecated|OpenSessionForTestDeprecated]] ([1.0.0-4.1.0] OpenSessionForTest)
|-
|-
| 3 || [1.0.0-6.2.0] [[#IsWakeEventActive|IsWakeEventActive]]
| 3 || [5.0.0-6.2.0] [[#IsWakeEventActiveDeprecated|IsWakeEventActiveDeprecated]] ([1.0.0-4.1.0] IsWakeEventActive)
|-
|-
| 4 || [1.0.0-6.2.0] [[#GetWakeEventActiveFlagSet|GetWakeEventActiveFlagSet]]
| 4 || [5.0.0-6.2.0] [[#GetWakeEventActiveFlagSetDeprecated|GetWakeEventActiveFlagSetDeprecated]] ([1.0.0-4.1.0] GetWakeEventActiveFlagSet)
|-
|-
| 5 || [1.0.0-6.2.0] [[#SetWakeEventActiveFlagSetForDebug|SetWakeEventActiveFlagSetForDebug]]
| 5 || [5.0.0-6.2.0] [[#SetWakeEventActiveFlagSetForDebugDeprecated|SetWakeEventActiveFlagSetForDebugDeprecated]] ([1.0.0-4.1.0] SetWakeEventActiveFlagSetForDebug)
|-
|-
| 6 || [[#SetWakePinDebugMode|SetWakePinDebugMode]]
| 6 || [[#SetWakePinDebugMode|SetWakePinDebugMode]]
|-
|-
| 7 || [5.0.0+] [[#OpenSession2|OpenSession2]]
| 7 || [5.0.0+] [[#OpenSession|OpenSession]]
|-
|-
| 8 || [5.0.0+] [[#IsWakeEventActive2|IsWakeEventActive2]]
| 8 || [5.0.0+] [[#IsWakeEventActive|IsWakeEventActive]]
|-
|-
| 9 || [5.0.0+] [[#SetWakeEventActiveFlagSetForDebug2|SetWakeEventActiveFlagSetForDebug2]]
| 9 || [5.0.0+] [[#SetWakeEventActiveFlagSetForDebug|SetWakeEventActiveFlagSetForDebug]]
|-
|-
| 10 || [6.0.0+] [[#SetRetryPolicy|SetRetryPolicy]]
| 10 || [6.0.0+] [[#DumpStateForDebug|DumpStateForDebug]]
|}
|}


== OpenSessionForDev ==
== OpenSessionForDevDeprecated ==
Takes an input [[#GpioPadDescriptor]]. Returns an [[#IPadSession]].
Takes an input [[#GpioPadDescriptor]]. Returns an [[#IPadSession]].


== OpenSession ==
== OpenSessionDeprecated ==
Same as [[#OpenSessionForDev]] except it takes a [[#GpioPadName]] which is then converted to a [[#GpioPadDescriptor]]. Returns an [[#IPadSession]].
Same as [[#OpenSessionForDevDeprecated]] except it takes a [[#GpioPadName]] which is then converted to a [[#GpioPadDescriptor]]. Returns an [[#IPadSession]].


== OpenSessionForTest ==
== OpenSessionForTestDeprecated ==
Same as [[#OpenSession]] but panics on failure.
Same as [[#OpenSessionDeprecated]] but panics on failure.


== IsWakeEventActive ==
== IsWakeEventActiveDeprecated ==
Takes an input [[#GpioPadName]]. Returns a bool '''IsActive'''.
Takes an input [[#GpioPadName]]. Returns a bool '''IsActive'''.


== GetWakeEventActiveFlagSet ==
== GetWakeEventActiveFlagSetDeprecated ==
No input. Returns an output u128 [[#WakeBitFlag]].
No input. Returns an output u128 [[#WakeBitFlag]].


== SetWakeEventActiveFlagSetForDebug ==
== SetWakeEventActiveFlagSetForDebugDeprecated ==
Takes an input [[#GpioPadName]] and an input bool '''IsEnabled'''. No output.
Takes an input [[#GpioPadName]] and an input bool '''IsEnabled'''. No output.


Line 50: Line 50:
Takes an input u32 '''WakePinDebugMode'''. No output.
Takes an input u32 '''WakePinDebugMode'''. No output.


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


== IsWakeEventActive2 ==
== IsWakeEventActive ==
Same as [[#IsWakeEventActive]] but takes a [[#GpioPadName|DeviceCode]].
Same as [[#IsWakeEventActiveDeprecated]] but takes a [[#GpioPadName|DeviceCode]].


== SetWakeEventActiveFlagSetForDebug2 ==
== SetWakeEventActiveFlagSetForDebug ==
Same as [[#SetWakeEventActiveFlagSetForDebug]] but takes a [[#GpioPadName|DeviceCode]].
Same as [[#SetWakeEventActiveFlagSetForDebugDeprecated]] but takes a [[#GpioPadName|DeviceCode]].


== SetRetryPolicy ==
== DumpStateForDebug ==
Stubbed. Returns 0.
Stubbed. Returns 0.


Line 69: Line 69:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#SetDirection|SetDirection]]
| 0 || [12.0.0+] [[#SetDirectionDeprecated|SetDirectionDeprecated]] ([1.0.0-11.0.1] SetDirection)
|-
|-
| 1 || [[#GetDirection|GetDirection]]
| 1 || [[#GetDirection|GetDirection]]
Line 81: Line 81:
| 5 || [[#GetInterruptEnable|GetInterruptEnable]]
| 5 || [[#GetInterruptEnable|GetInterruptEnable]]
|-
|-
| 6 || [[#GetInterruptStatus|GetInterruptStatus]]
| 6 || [1.0.0-16.1.0] [[#GetInterruptStatus|GetInterruptStatus]]
|-
|-
| 7 || [[#ClearInterruptStatus|ClearInterruptStatus]]
| 7 || [1.0.0-16.1.0] [[#ClearInterruptStatus|ClearInterruptStatus]]
|-
|-
| 8 || [[#SetValue|SetValue]]
| 8 || [[#SetValue|SetValue]]
Line 103: Line 103:
| 16 || [4.0.0+] [[#SetValueForSleepState|SetValueForSleepState]]
| 16 || [4.0.0+] [[#SetValueForSleepState|SetValueForSleepState]]
|-
|-
| 17 || [6.0.0+] [[#GetValueForSleepState|GetValueForSleepState]]
| 17 || [6.0.0+] [[#GetMaxDebounceTime|GetMaxDebounceTime]]
|-
|-
| 18 || [12.0.0+] [[#SetInput|SetInput]]
| 18 || [12.0.0+] [[#SetDirectionInput|SetDirectionInput]]
|-
|-
| 19 || [12.0.0+] [[#SetOutput|SetOutput]]
| 19 || [12.0.0+] [[#SetDirectionOutput|SetDirectionOutput]]
|}
|}


=== SetDirection ===
=== SetDirectionDeprecated ===
Takes an input u32 [[#Direction]]. No output.
Takes an input u32 [[#Direction]]. No output.


Line 161: Line 161:
Takes an input u32 '''ValueForSleepState'''. No output.
Takes an input u32 '''ValueForSleepState'''. No output.


=== GetValueForSleepState ===
=== GetMaxDebounceTime ===
No input. Returns an output u32 '''ValueForSleepState'''.
No input. Returns an output u32 '''MaxDebounceTime'''.


=== SetInput ===
=== SetDirectionInput ===
No input/output.
No input/output.


=== SetOutput ===
=== SetDirectionOutput ===
Takes an input u32 [[#GpioValue]]. No output.
Takes an input u32 [[#GpioValue]]. No output.


Line 189: Line 189:


== OpenSessionForDev ==
== OpenSessionForDev ==
Takes an input u32 '''BusIdx''', an input u16 '''SlaveAddress''', and 2 input u32s [[#AddressingMode]] and [[#SpeedMode]]. Returns an [[#II2cSession]].
Takes an input u16 '''SlaveAddress''' (padded to u32) and 3 input u32s '''BusIdx''', [[#AddressingMode]] and [[#SpeedMode]]. Returns an [[#II2cSession]].


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


== HasDevice ==
== HasDevice ==
Takes an input u32 [[#I2cDevice]]. Returns an output boolean success value.
Takes an input [[#I2cDevice]]. Returns an output boolean success value.


== HasDeviceForDev ==
== HasDeviceForDev ==
Takes an input u32 '''BusIdx''', an input u16 '''SlaveAddress''', and 2 input u32s [[#AddressingMode]] and [[#SpeedMode]]. Returns an output boolean success value.
Takes an input u16 '''SlaveAddress''' (padded to u32) and 3 input u32s '''BusIdx''', [[#AddressingMode]] and [[#SpeedMode]]. Returns an output boolean success value.


== OpenSession2 ==
== OpenSession2 ==
Line 261: Line 261:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#HasPort|HasPort]]
| 0 || [1.0.0-16.1.0] [[#HasPort|HasPort]]
|-
|-
| 1 || [[#HasPortForDev|HasPortForDev]]
| 1 || [1.0.0-16.1.0] [[#HasPortForDev|HasPortForDev]]
|-
|-
| 2 || [[#IsSupportedBaudRate|IsSupportedBaudRate]]
| 2 || [1.0.0-16.1.0] [[#IsSupportedBaudRate|IsSupportedBaudRate]]
|-
|-
| 3 || [[#IsSupportedBaudRateForDev|IsSupportedBaudRateForDev]]
| 3 || [1.0.0-16.1.0] [[#IsSupportedBaudRateForDev|IsSupportedBaudRateForDev]]
|-
|-
| 4 || [[#IsSupportedFlowControlMode|IsSupportedFlowControlMode]]
| 4 || [1.0.0-16.1.0] [[#IsSupportedFlowControlMode|IsSupportedFlowControlMode]]
|-
|-
| 5 || [[#IsSupportedFlowControlModeForDev|IsSupportedFlowControlModeForDev]]
| 5 || [1.0.0-16.1.0] [[#IsSupportedFlowControlModeForDev|IsSupportedFlowControlModeForDev]]
|-
|-
| 6 || [[#CreatePortSession|CreatePortSession]]
| 6 || [[#CreatePortSession|CreatePortSession]]
|-
|-
| 7 || [[#IsSupportedPortEvent|IsSupportedPortEvent]]
| 7 || [1.0.0-16.1.0] [[#IsSupportedPortEvent|IsSupportedPortEvent]]
|-
|-
| 8 || [[#IsSupportedPortEventForDev|IsSupportedPortEventForDev]]
| 8 || [1.0.0-16.1.0] [[#IsSupportedPortEventForDev|IsSupportedPortEventForDev]]
|-
|-
| 9 || [7.0.0+] [[#IsSupportedDeviceVariation|IsSupportedDeviceVariation]]
| 9 || [7.0.0-16.1.0] [[#IsSupportedDeviceVariation|IsSupportedDeviceVariation]]
|-
|-
| 10 || [7.0.0+] [[#IsSupportedDeviceVariationForDev|IsSupportedDeviceVariationForDev]]
| 10 || [7.0.0-16.1.0] [[#IsSupportedDeviceVariationForDev|IsSupportedDeviceVariationForDev]]
|}
|}


Line 296: Line 296:


== IsSupportedBaudRateForDev ==
== IsSupportedBaudRateForDev ==
Takes 2 input u32s [[#UartPortForDev]] '''BaudRate'''. Returns an output boolean success value.
Takes 2 input u32s [[#UartPortForDev]] 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.
Line 420: Line 420:
| 5 || GetEnabled
| 5 || GetEnabled
|-
|-
| 6 || [6.0.0+] SetScale
| 6 || [6.0.0+] [[#SetDutyCycle|SetDutyCycle]]
|-
|-
| 7 || [6.0.0+] GetScale
| 7 || [6.0.0+] [[#GetDutyCycle|GetDutyCycle]]
|}
|}
=== SetDutyCycle ===
Takes an input double '''DutyCycle'''. No output.
=== GetDutyCycle ===
No input. Returns an output double '''DutyCycle'''.


= pinmux =
= pinmux =
Line 450: Line 456:
|-
|-
| 2 || [[#SetPinAssignmentForHardwareTest|SetPinAssignmentForHardwareTest]]
| 2 || [[#SetPinAssignmentForHardwareTest|SetPinAssignmentForHardwareTest]]
|-
| 3 || [17.0.0+] SetSfioConfiguration
|-
| 4 || [17.0.0+] GetSfioConfiguration
|-
| 5 || [17.0.0+] SetInputEnableConfiguration
|-
| 6 || [17.0.0+] GetInputEnableConfiguration
|-
| 7 || [17.0.0+] SetPullConfiguration
|-
| 8 || [17.0.0+] GetPullConfiguration
|-
| 9 || [17.0.0+] SetPmConfiguration
|-
| 10 || [17.0.0+] GetPmConfiguration
|}
|}


Line 490: Line 512:
|-
|-
| 3 || [[#StopPeriodicReceiveMode|StopPeriodicReceiveMode]]
| 3 || [[#StopPeriodicReceiveMode|StopPeriodicReceiveMode]]
|-
| 4 || [19.0.0+]
|-
| 5 || [19.0.0+]
|}
|}


Line 499: Line 525:


=== StartPeriodicReceiveMode ===
=== StartPeriodicReceiveMode ===
Takes an u8 '''SpiCommand''' (padded to u32), an u32, two u64s and a copy handle. No output.
Takes an u8 '''SpiCommand''' (padded to u32), an u32, two u64s and a TransferMemory handle. No output.
 
[20.0.0+] Data intended for the user-process was [[Switch_System_Flaws|moved]] from tmem+0x8 to +0x0.


=== StopPeriodicReceiveMode ===
=== StopPeriodicReceiveMode ===
No input/output.
No input/output.
=== Cmd4 ===
Takes a total of 0x10-bytes of input and an input handle. No output.
This is similar to [[#StartPeriodicReceiveMode|StartPeriodicReceiveMode]]. This eventually calls an impl func which just writes some input fields into state, then (on NX) Aborts.
=== Cmd5 ===
No input/output.
This is identical to [[#StopPeriodicReceiveMode|StopPeriodicReceiveMode]].


= led =
= led =
Line 528: Line 566:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || SetConfigEnable
| 0 || StartLighting
|-
|-
| 1 || SetConfigDisable
| 1 || StopLighting
|-
|-
| 2 || SetConfigType
| 2 || SetLightingMode
|-
|-
| 3 || GetConfigType
| 3 || GetLightingMode
|-
|-
| 4 || GetBlinkPwmEnabled
| 4 || IsLighting
|-
|-
| 5 || SetConfigSoftBlinkRampTime
| 5 || SetRisingTime
|-
|-
| 6 || GetConfigSoftBlinkRampTime
| 6 || GetRisingTime
|-
|-
| 7 || SetConfigSoftBlinkRampTime2
| 7 || SetFallingTime
|-
|-
| 8 || GetConfigSoftBlinkRampTime2
| 8 || GetFallingTime
|-
|-
| 9 || SetConfigSoftBlinkPlateau
| 9 || SetPeakTime
|-
|-
| 10 || GetConfigSoftBlinkPlateau
| 10 || GetPeakTime
|-
|-
| 11 || SetConfigSoftBlinkShortPeriod
| 11 || SetPulseInterval
|-
|-
| 12 || GetConfigSoftBlinkShortPeriod
| 12 || GetPulseInterval
|-
|-
| 13 || SetConfigSoftBlinkShortPeriodEnable
| 13 || SetPulseCount
|-
|-
| 14 || GetConfigSoftBlinkShortPeriodEnable
| 14 || GetPulseCount
|-
|-
| 15 || GetConfigSoftBlinkShortPeriodConeCount
| 15 || GetMaxPulseCount
|-
|-
| 16 || SetConfigSoftBlinkLongPeriod
| 16 || SetBreathInterval
|-
|-
| 17 || GetConfigSoftBlinkLongPeriod
| 17 || GetBreathInterval
|-
|-
| 18 || SetBlinkPwmScale
| 18 || SetConstantBrightness
|-
|-
| 19 || GetBlinkPwmScale
| 19 || GetConstantBrightness
|-
|-
| 20 || [10.0.0+] GetSoftBlinkFsmStatus ([8.1.1-9.2.0] RegisterPwmChannel)
| 20 || [10.0.0+] GetBreathingStatus ([8.1.1-9.2.0] RegisterPwmChannel)
|-
|-
| 21 || [8.1.1-9.2.0] UnregisterPwmChannel
| 21 || [8.1.1-9.2.0] UnregisterPwmChannel
Line 853: Line 891:
= WakeBitFlag =
= WakeBitFlag =
This is "nn::gpio::WakeBitFlag". This is a 128-bit flag.
This is "nn::gpio::WakeBitFlag". This is a 128-bit flag.
= OpenMode =
This is "nn::gpio::OpenMode".
{| class="wikitable sortable" border="1"
|-
! Value || Name
|-
| 0 || None
|-
| 1 || Read
|-
| 2 || Write
|-
| 3 || ReadWrite
|}


= I2cDevice =
= I2cDevice =
Line 915: Line 969:
| [2.0.0+] 26 || HdmiHdcp || 0x34000003 || 3:3A || N || 100000 || 0 ||      0 || HDMI HDCP || [[NV services]] || Copper, Calcio
| [2.0.0+] 26 || HdmiHdcp || 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 || RAM Regulator (related to 0x3A000002) || || Hoag, Iowa, Calcio, Aula
| [4.0.0+] 27 || Fan53528 || 0x3A000005 || 4:52 ([4.0.0-8.0.0] 4:A4) || N || 400000 || 0 ||      0 || RAM Regulator (tied to Max77812Pmic) || || Hoag, Iowa, Calcio, Aula
|-
|-
| [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 || Sub-PMIC for CPU and GPU (related to 0x3A000005) (Phase 211) || [[PCV services]] || Hoag, Iowa, Calcio, Aula
| [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 || Sub-PMIC for CPU and GPU (tied to Fan53528) (Phase 31) || [[PCV services]] || Hoag, Iowa, Calcio, Aula
|-
|-
| [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 || Sub-PMIC for GPU, CPU and RAM (Phase 211) || [[PCV services]] || Hoag, Iowa, Calcio, Aula
| [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 || Sub-PMIC for GPU, CPU and RAM (Phase 211) || [[PCV services]] || Hoag, Iowa, Calcio, Aula
Line 923: Line 977:
| [4.0.0+] 30 || Ina226VddDdr0V6 (SdevMariko) || 0x3F000409 || 1:4E || N || 400000 || 3 || 5000000 || Power Monitor || nvdbgsvc || Factory
| [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 || MillauNfc || [[NFC services]] || Hoag
| [8.0.0+] 31 || (MillauNfc) || 0x36000001 || 1:08 || N || 400000 || 3 || 5000000 || NFC Controller || [[NFC services]] || Hoag
|-
|-
| [12.0.0+] - || Max77801 || 0x3A000007 || 4:18 || N || 400000 || 0 ||      0 || Audio Codec (ALC5639) Regulator || [[PCV services]] || Aula
| [12.0.0+] - || (Max77801) || 0x3A000007 || 4:18 || N || 400000 || 0 ||      0 || Audio Codec (ALC5639) Regulator || [[PCV services]] || Aula
|}
|}


Line 1,077: Line 1,131:
! Value || Description
! Value || Description
|-
|-
| 0 || UART-B TX or GPIO(G, 0) and UART-B CTS or GPIO(G, 3)
| 0 || ExtConUartB
|-
|-
| 1 || UART-C TX or GPIO(D, 1) and UART-C CTS or GPIO(D, 4)
| 1 || ExtConUartC
|-
|-
| 2 || SDMMC1 Pads or GPIO(M, 0), GPIO(M, 1), GPIO(M, 2), GPIO(M, 3), GPIO(M, 4) and GPIO(M, 5)
| 2 || Sdmmc1
|-
|-
| 3 || Fan PWM Control (Copper) GPIO(V, 4)
| 3 || PwmFan
|-
|-
| 100 || Invalid
| 100 || Invalid
Line 1,103: Line 1,157:
| 3 || Invalid
| 3 || Invalid
|-
|-
| 100 || Uart4Tx, Uart4Rx, Uart4Rts and Uart4Cts
| 100 || UartD
|}
|}


Line 1,112: Line 1,166:
|-
|-
! Value || Name
! Value || Name
|-
| 0 || ExtConUartOutputEnable
|-
| 1 || ExtConUartOutputHiZ
|-
|-
| 2 || Sdmmc1OutputHigh
| 2 || Sdmmc1OutputHigh
Line 1,120: Line 1,178:
|-
|-
| 5 || Sdmmc1SchmtDisable
| 5 || Sdmmc1SchmtDisable
|-
| 6 || PwmFanEnable
|-
| 7 || PwmFanHiZ
|}
|}


Line 1,143: Line 1,205:
| [10.0.0+] 1 || SPI4 || 0x3500003D || Icm40607 (WHOAMI 0x38)
| [10.0.0+] 1 || SPI4 || 0x3500003D || Icm40607 (WHOAMI 0x38)
|-
|-
| [13.0.0+] 2 || SPI4 || 0x3500003D || Unknown (WHOAMI 0x60)
| [13.0.0+] 2 || SPI4 || 0x3500003D || Icm42607p (WHOAMI 0x60)
|}
 
= AccessMode =
This is "nn::ddsf::AccessMode".
 
{| class="wikitable sortable" border="1"
|-
! Value || Name
|-
| 0 || None
|-
| 1 || Read
|-
| 2 || Write
|-
| 3 || ReadWrite
|}
|}


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