Changes

no edit summary
! Cmd || Name
|-
| 0 || [[#ShutdownSystem]]
|-
| 1 || [[#RebootSystem]]
|-
| 2 || [[#GetWakeupReason]]
|-
| 3 || [[#GetShutdownReason]]
|-
| 4 || [[#GetAcOk]]
|-
| 5 || [[#GetBoardPowerControlEvent]]
|-
| 6 || [2.0.0+] [[#GetSleepButtonState]]
|-
| 7 || [2.0.0+] [[#GetPowerEvent]]
|-
| 8 || [2.0.0-9.2.0] [[#CreateWakeupTimer]]
|-
| 9 || [2.0.0-9.2.0] [[#CancelWakeupTimer]]
|-
| 10 || [2.0.0-9.2.0] [[#EnableWakeupTimerOnDevice]]
|-
| 11 || [3.0.0-9.2.0] [[#CreateWakeupTimerEx]]
|-
| 12 || [3.0.0-9.2.0] [[#GetLastEnabledWakeupTimerType]]
|-
| 13 || [3.0.0-9.2.0] [[#CleanAllWakeupTimers]]
|-
| 14 || [6.0.0+] [[#GetPowerButton]]
|-
| 15 || [10.0.0+] [[#SetEnableWakeupTimer]]
|}
 
== ShutdownSystem ==
No input/output.
 
== RebootSystem ==
No input/output.
 
== GetWakeupReason ==
No input. Returns an output u32.
 
== GetShutdownReason ==
No input. Returns an output u32.
 
== GetAcOk ==
No input. Returns an output bool.
 
== GetBoardPowerControlEvent ==
Takes an input [[#BoardPowerControlEventTarget|BoardPowerControlEventTarget]]. Returns an output Event handle.
 
== GetSleepButtonState ==
No input. Returns an output [[#SleepButtonState|SleepButtonState]].
 
== GetPowerEvent ==
Takes an input [[#EventTarget|EventTarget]]. Returns an output Event handle.
 
== CreateWakeupTimer ==
Takes an input u64. Returns an output u32.
 
== CancelWakeupTimer ==
Takes an input u32. No output.
== EnableWakeupTimerOnDevice ==
No input, returns a total of 0x10-bytes of . Returns an output bool '''IsEnabled''' and an outputu64 '''Interval'''.  [3.0.0+] Now returns a total of 0xC-bytes of an u32 and an u64. == CreateWakeupTimerEx ==Takes two input u64s. Returns an output u32. == GetLastEnabledWakeupTimerType ==No input. Returns an output u32. == CleanAllWakeupTimers ==Takes an input u32. No output. == GetPowerButton ==No input. Returns an output bool '''IsPushed'''. == SetEnableWakeupTimer ==Unofficial name. No input/output. Enables an internal wakeup timer when calling [[#ShutdownSystem|ShutdownSystem]] or [[#RebootSystem|RebootSystem]].
= bpc:r =
! Cmd || Name
|-
| 0 || [[#GetRtcTime]]
|-
| 1 || [[#SetRtcTime]]
|-
| 2 || [[#GetRtcResetDetected]]
|-
| 3 || [2.0.0+] [[#ClearRtcResetDetected]]
|-
| 4 || [3.0.0+] [[#SetUpRtcResetOnShutdown]]
|}
 
== GetRtcTime ==
No input. Returns an output u64.
 
== SetRtcTime ==
Takes an input u64. No output.
 
== GetRtcResetDetected ==
No input. Returns an output bool.
 
== ClearRtcResetDetected ==
No input/output.
 
== SetUpRtcResetOnShutdown ==
No input/output.
= bpc:c =
! Cmd || Name
|-
| 0 || [[#ShutdownSystem]]
|-
| 1 || [[#RebootSystem]]
|-
| 2 || [[#GetWakeupReason]]
|-
| 3 || [[#GetShutdownReason]]
|-
| 4 || [[#GetAcOk]]
|-
| 5 || [[#GetBoardPowerControlEvent]]
|}
! Cmd || Name
|-
| 0 || [[#GetSleepButtonState]]
|-
| 1 || [[#GetPowerEvent]]
|}
! Cmd || Name
|-
| 0 || [[#CreateWakeupTimer]]
|-
| 1 || [[#CancelWakeupTimer]]
|-
| 2 || [[#EnableWakeupTimerOnDevice]]
! Cmd || Name
|-
| [1.0.0-7.0.1] 0 || [[#SetPowerEnabled]]
|-
| [1.0.0-7.0.1] 1 || [[#SetClockEnabled]]
|-
| [1.0.0-7.0.1] 2 || [[#SetClockRate]]
|-
| [1.0.0-7.0.1] 3 || [[#GetClockRate]]
|-
| [1.0.0-7.0.1] 4 || [[#GetState]]
|-
| [1.0.0-7.0.1] 5 || [[#GetPossibleClockRates]]
|-
| [1.0.0-7.0.1] 6 || [[#SetMinVClockRate]]
|-
| [1.0.0-7.0.1] 7 || [[#SetReset]]
|-
| [1.0.0-7.0.1] 8 || [[#SetVoltageEnabled]]
|-
| [1.0.0-7.0.1] 9 || [[#GetVoltageEnabled]]
|-
| [1.0.0-7.0.1] 10 || [[#GetVoltageRange]]
|-
| [1.0.0-7.0.1] 11 || [[#SetVoltageValue]]
|-
| [1.0.0-7.0.1] 12 || [[#GetVoltageValue]]
|-
| [1.0.0-7.0.1] 13 || [[#GetTemperatureThresholds]]
|-
| [1.0.0-7.0.1] 14 || [[#SetTemperature]]
|-
| [1.0.0-5.1.0] 15 || [[#Initialize]]
|-
| [1.0.0-5.1.0] 16 || [[#IsInitialized]]
|-
| [1.0.0-5.1.0] 17 || [[#Finalize]]
|-
| [3.0.0-7.0.1] 18 || [[#PowerOn]]
|-
| [3.0.0-7.0.1] 19 || [[#PowerOff]]
|-
| [3.0.0-7.0.1] 20 || [[#ChangeVoltage]]
|-
| [3.0.0-7.0.1] 21 || [[#GetPowerClockInfoEvent]]
|-
| [3.0.0-7.0.1] 22 || [[#GetOscillatorClock]]
|-
| [3.0.0-7.0.1] 23 || [[#GetDvfsTable]]
|-
| [3.0.0-7.0.1] 24 || [[#GetModuleStateTable]]
|-
| [3.0.0-7.0.1] 25 || [[#GetPowerDomainStateTable]]
|-
| 26 || [3.0.0+] [[#GetFuseInfo]]
|-
| 27 || [5.0.0+] [[#GetDramId]]
|-
| [6.0.0-7.0.1] 28 || [[#IsPoweredOn]]
|}
== SetPowerEnabled ==Takes an input [[#Module|ModuleId]] and an input bool '''Enabled'''. No output. == SetClockEnabled ==Takes an input [[#Module|ModuleId]] and an input bool '''Enabled'''. No output. == SetClockRate ==Takes an input [[#Module|ModuleId]] and an input u32 '''ClockRateHz'''. No output. == GetClockRate ==Takes an input [[#Module|ModuleId]]. Returns an output u32 '''ClockRateHz'''. == GetState ==Takes an input [[#Module|ModuleId]]. Returns an output [[#ModuleState|ModuleState]]. == GetPossibleClockRates ==Takes a type-0xA output buffer of [[#ClockRatesListType|ClockRatesListType]], an input [[#Module|ModuleId]] and an input s32 '''MaxCount'''. Returns an output s32 '''OutCount''' and an output u32 '''OutRates'''. == SetMinVClockRate ==Takes an input [[#Module|ModuleId]] and an input u32 '''ClockRateHz'''. No output. == SetReset ==Takes an input [[#Module|ModuleId]] and an input bool '''Asserted'''. No output. == SetVoltageEnabled ==Takes an input [[#PowerDomain|PowerDomain]] and an input bool '''Enabled'''. No output. == GetVoltageEnabled ==Takes an input [[#PowerDomain|PowerDomain]]. Returns an output bool '''Enabled'''. == GetVoltageRange ==Takes an input [[#PowerDomain|PowerDomain]]. Returns three output s32s '''MinVolt''', '''MaxVolt''' and '''StepVolt'''. == SetVoltageValue ==Takes an input [[#PowerDomain|PowerDomain]] and an input s32 '''MicroVolt'''. No output. == GetVoltageValue ==Takes an input [[#PowerDomain|PowerDomain]]. Returns an output s32 '''MicroVolt'''. == GetTemperatureThresholds ==Takes a type-0xA output buffer of [[#TemperatureThreshold|TemperatureThreshold]] and an input s32 '''MaxCount'''. Returns an output s32 '''OutCount'''. == SetTemperature ==Takes an input s32 '''TemperatureMilliC'''. No output. == Initialize ==No input/output. == IsInitialized ==No input. Returns an output bool. == Finalize ==No input/output. == PowerOn ==Takes an input [[#PowerControlTarget|PowerControlTarget]] and an input s32 '''MicroVolt'''. No output. == PowerOff ==Takes an input [[#PowerControlTarget|PowerControlTarget]]. No output. == ChangeVoltage ==Takes an input [[#PowerControlTarget|PowerControlTarget]] and an input s32 '''MicroVolt'''. No output. == GetPowerClockInfoEvent ==No input. Returns an output Event handle. == GetOscillatorClock ==No input. Returns an output u32. == GetDvfsTable ==Takes two type-0xA output buffers and two input s32s. Returns an output s32 '''OutCount'''. [7.0.0+] The type-0xA output buffers were replaced with type-0x22 output buffers, for the following: GetDvfsTable, . == GetModuleStateTable, ==Takes a type-0xA output buffer of [[#ModuleState|ModuleState]] and an input s32 '''MaxCount'''. Returns an output s32 '''OutCount'''. [7.0.0+] The type-0xA output buffer was replaced with a type-0x22 output buffer. == GetPowerDomainStateTable==Takes a type-0xA output buffer of [[#PowerDomainState|PowerDomainState]] and an input s32 '''MaxCount'''. Returns an output s32 '''OutCount'''. [7.0.0+] The type-0xA output buffer was replaced with a type-0x22 output buffer. == GetFuseInfo ==Takes a type-0xA output buffer and an input s32 '''MaxCount'''. Returns an output s32 '''OutCount'''. == GetDramId ==No input. Returns an u32.
== IsPoweredOn ==
Takes a an input [[#PowerDomain|PowerDomain]] and returns a . Returns an output bool indicating the status of the requested voltage block.
== GetVoltage ==
Takes a an input [[#PowerDomain|PowerDomain]] and returns . Returns an u32 voltage value for the requested voltage blockoutput s32.
= pcv:arb =
! Cmd || Name
|-
| 0 || [[#ReleaseControl]]
|}
 
== ReleaseControl ==
Takes an input [[#Module|ModuleId]]. No output.
= pcv:imm =
! Cmd || Name
|-
| 0 || [[#SetClockRate]]
|}
| 2 || SetTemperature
|-
| 3 || GetPossibleClockRates
|-
| 4 || GetClockInfoEvent
|-
| 5 || [[#GetClockModuleNumLimit]]
|}
== OpenSession ==
Takes a an input [[#Module|DeviceCode]] and an input u32. Returns an [[#IClkrstSession]].
== GetClockModuleNumLimit ==
! Cmd || Name
|-
| 0 || [[#ReleaseControl_2|ReleaseControl]]
|}
== ReleaseControl ReleaseControl_2 ==Takes a an input [[#Module|ModuleDeviceCode]]. No output.
= rgltr =
| 0 || [[#OpenSession]]
|-
| 1 || GetPowerDomainStateTable
|-
| 2 || GetPowerInfoEvent
|-
| 3 || [[#GetPowerModuleNumLimit]]
|}
== OpenSession ==
Takes a an input [[#PowerDomain|DeviceCode]] and returns an [[#IRegulatorSession]].
== GetPowerModuleNumLimit ==
! Cmd || Name
|-
| 0 || [[#SetVoltageEnabled]]
|-
| 1 ||
|-
| 2 || [[#GetVoltageEnabled]]
|-
| 3 || GetVoltageRange
| 4 || GetVoltageValue
|-
| 5 || [[#SetVoltageValue]]
|-
| 6 || ChangeVoltage
|}
 
=== SetVoltageEnabled ===
Takes a bool. Enables/disables the LDO this session was opened for.
 
=== GetVoltageEnabled ===
Returns a bool. True if voltage is enabled, false if not.
 
=== SetVoltageValue ===
Takes in a voltage in microvolts and sets the LDO to this voltage.
= rtc =
! Cmd || Name
|-
| 0 || [[#GetRtcTime_2|GetRtcTime]]
|-
| 1 || [[#SetRtcTime_2|SetRtcTime]]
|-
| 2 || [[#SetUpRtcResetOnShutdown_2|SetUpRtcResetOnShutdown]]
|-
| 3 || [[#GetRtcResetDetected_2|GetRtcResetDetected]]
|-
| 4 || [[#ClearRtcResetDetected_2|ClearRtcResetDetected]]
|-
| 10 || [10.0.0+]
|}
== GetRtcTime GetRtcTime_2 ==Same as GetRtcTime from [[#bpc:rGetRtcTime|bpc:rGetRtcTime]], but takes an extra input [[Bus_services#I2cDevice|DeviceCode]], which ([[#bpc:r|bpc:r]] hardcodes to uses hardcoded value 0x3B000001 (max77620_rtc0) instead.
== SetRtcTime SetRtcTime_2 ==Same as SetRtcTime from [[#bpc:rSetRtcTime|bpc:rSetRtcTime]], but takes an extra input [[Bus_services#I2cDevice|DeviceCode]], which ([[#bpc:r|bpc:r]] hardcodes to uses hardcoded value 0x3B000001 (max77620_rtc0) instead.
== SetUpRtcResetOnShutdown SetUpRtcResetOnShutdown_2 ==Takes an u8 input bool '''DoReset''' and a an input [[Bus_services#I2cDevice|DeviceCode]]. Similar to SetUpRtcResetOnShutdown from [[#bpc:rSetUpRtcResetOnShutdown|bpc:rSetUpRtcResetOnShutdown]], but this version assigns the provided boolean value on a per-client basis (instead of a global variable) and checks it when the current [[PSC_services#Power_Management_States|power state]] is "'''ReadyShutdown"'''.
== GetRtcResetDetected GetRtcResetDetected_2 ==Same as GetRtcResetDetected from [[#bpc:rGetRtcResetDetected|bpc:rGetRtcResetDetected]], but takes an extra input [[Bus_services#I2cDevice|DeviceCode]], which ([[#bpc:r|bpc:r]] hardcodes to uses hardcoded value 0x3B000001 (max77620_rtc0) instead.
== ClearRtcResetDetected ClearRtcResetDetected_2 ==Same as ClearRtcResetDetected from [[#bpc:rClearRtcResetDetected|bpc:rClearRtcResetDetected]], but takes an extra input [[Bus_services#I2cDevice|DeviceCode]], which ([[#bpc:r|bpc:r]] hardcodes to uses hardcoded value 0x3B000001 (max77620_rtc0) instead.
= time:u, time:a, time:s =
{| class="wikitable" border="1"
|-
! Cmd || Name || Notes
|-
| 0 || GetStandardUserSystemClock || Returns an [[#ISystemClockGetStandardUserSystemClock]].
|-
| 1 || GetStandardNetworkSystemClock || Returns an [[#ISystemClockGetStandardNetworkSystemClock]].
|-
| 2 || GetStandardSteadyClock || Returns an [[#ISteadyClockGetStandardSteadyClock]].
|-
| 3 || GetTimeZoneService || Returns an [[#ITimeZoneServiceGetTimeZoneService]].
|-
| 4 || GetStandardLocalSystemClock || Returns an [[#ISystemClockGetStandardLocalSystemClock]].
|-
| 5 || [4.0.0+] GetEphemeralNetworkSystemClock || Returns an [[#ISystemClockGetEphemeralNetworkSystemClock]].
|-
| 20 || [6.0.0+] GetSharedMemoryNativeHandle ||
|-
| 30 || [6.0.0+] GetStandardNetworkClockOperationEventReadableHandle ||
|-
| 31 || [6.0.0+] GetEphemeralNetworkClockOperationEventReadableHandle ||
|-
| 50 || [4.0.0+] SetStandardSteadyClockInternalOffset ||
|-
| 100 || IsStandardUserSystemClockAutomaticCorrectionEnabled ||
|-
| 101 || SetStandardUserSystemClockAutomaticCorrectionEnabled ||
|-
| 102 || [5.0.0+] GetStandardUserSystemClockInitialYear ||
|-
| 200 || [3.0.0+] IsStandardNetworkSystemClockAccuracySufficient ||
|-
| 201 || [6.0.0+] GetStandardUserSystemClockAutomaticCorrectionUpdatedTime ||
|-
| 300 || [4.0.0+] CalculateMonotonicSystemClockBaseTimePoint ||
|-
| 400 || [4.0.0+] GetClockSnapshot ||
|-
| 401 || [4.0.0+] GetClockSnapshotFromSystemClockContext ||
|-
| 500 || [4.0.0+] CalculateStandardUserSystemClockDifferenceByUser ||
|-
| 501 || [4.0.0+] CalculateSpanBetween ||
|}
 
== GetStandardUserSystemClock ==
No input. Returns an [[#ISystemClock]].
 
== GetStandardNetworkSystemClock ==
No input. Returns an [[#ISystemClock]].
 
== GetStandardSteadyClock ==
No input. Returns an [[#ISteadyClock]].
 
== GetTimeZoneService ==
No input. Returns an [[#ITimeZoneService]].
 
== GetStandardLocalSystemClock ==
No input. Returns an [[#ISystemClock]].
 
== GetEphemeralNetworkSystemClock ==
No input. Returns an [[#ISystemClock]].
== ISteadyClock ==
{| class="wikitable" border="1"
|-
! Cmd || Name || Notes
|-
| 0 || GetCurrentTimePoint || No input, returns an output [[#SteadyClockTimePointGetCurrentTimePoint]].
|-
| 2 || GetTestOffset || No input, returns an output [[#TimeSpanTypeGetTestOffset]].
|-
| 3 || SetTestOffset || Takes an input [[#TimeSpanTypeSetTestOffset]], no output.
|-
| 100 || [2.0.0+] [[#GetRtcValue || No input, returns an output s64.]]
|-
| 101 || [2.0.0+] [[#IsRtcResetDetected || No input, returns an output u8 bool.]]
|-
| 102 || [2.0.0+] [[#GetSetupResultValue || No input, returns an output u32.]]
|-
| 200 || [3.0.0+] GetInternalOffset || No input, returns an output [[#TimeSpanTypeGetInternalOffset]].
|-
| 201 || [3.0.0-3.0.2] SetInternalOffset || Takes an input [[#TimeSpanTypeSetInternalOffset]], no output.
|}
=== GetCurrentTimePoint ===No input. Returns an output [[#SteadyClockTimePoint ]]. === GetTestOffset ==={| classNo input. Returns an output [[#TimeSpanType]]. === SetTestOffset =="wikitable" border="1"|-Takes an input [[#TimeSpanType]]. No output.! Offset || Size || Description|-=== GetRtcValue ===| 0x0 || 0x8|| A u64 representing a point in timeNo input.Returns an output s64. |-=== IsRtcResetDetected ===| 0x8 || 0x10 || An ID representing the clock sourceNo input. Returns an output u8 bool.|}=== GetSetupResultValue ===No input. Returns an output u32.
This is a 0x18-byte struct=== GetInternalOffset ===No input. Returns an output [[#TimeSpanType]].
=== TimeSpanType SetInternalOffset ===This is Takes an u64input [[#TimeSpanType]]. No output.
== ISystemClock ==
{| class="wikitable" border="1"
|-
! Cmd || Name || Notes
|-
| 0 || GetCurrentTime || Returns an output [[#PosixTimeGetCurrentTime]].
|-
| 1 || SetCurrentTime || Takes an input [[#PosixTimeSetCurrentTime]].
|-
| 2 || GetSystemClockContext || Returns an output [[#SystemClockContextGetSystemClockContext]].
|-
| 3 || SetSystemClockContext || Takes an input [[#SystemClockContextSetSystemClockContext]].
|-
| 4 || [9.0.0+] GetOperationEventReadableHandle ||
|}
=== GetCurrentTime ===No input. Returns an output [[#PosixTime ]]. === SetCurrentTime ===This is Takes an s64 for UTC POSIX timeinput [[#PosixTime]]. No output.
=== SystemClockContext GetSystemClockContext ===This is No input. Returns an 0x20-byte structoutput [[#SystemClockContext]].
{| class="wikitable" border="1"|-! Offset || Size || Description|-= SetSystemClockContext ===| 0x0 || 0x8|| a Takes an input [[#PosixTimeSystemClockContext]] representing the system clock epoch.|-| 0x8 || 0x18 || a [[#SteadyClockTimePoint]]|}No output.
== ITimeZoneService ==
{| class="wikitable" border="1"
|-
! Cmd || Name || Notes
|-
| 0 || GetDeviceLocationName || No input, returns an output [[#LocationNameGetDeviceLocationName]].
|-
| 1 || SetDeviceLocationName || Takes an input [[#LocationNameSetDeviceLocationName]], no output.
|-
| 2 || [[#GetTotalLocationNameCount || No input, returns an output s32.]]
|-
| 3 || [[#LoadLocationNameList || ]]
|-
| 4 || LoadTimeZoneRule || Takes an input [[#LocationName]] and a type-0x16 output buffer for [[#TimeZoneRuleLoadTimeZoneRule]], no output.
|-
| 5 || [2.0.0+] GetTimeZoneRuleVersion || No input, returns an output [[#TimeZoneRuleVersionGetTimeZoneRuleVersion]].
|-
| 6 || [5.0.0+] GetDeviceLocationNameAndUpdatedTime ||
|-
| 100 || ToCalendarTime || Takes an input [[#PosixTime]] and a type-0x15 input buffer for [[#TimeZoneRule]], returns an output [[#CalendarTime]] and [[#CalendarAdditionalInfoToCalendarTime]].
|-
| 101 || ToCalendarTimeWithMyRule || Takes an input [[#PosixTime]], returns an output [[#CalendarTime]] and [[#CalendarAdditionalInfoToCalendarTimeWithMyRule]].
|-
| 201 || ToPosixTime || Takes an input [[#CalendarTime]], a type-0x15 input buffer for [[#TimeZoneRule]], an type-0xA output buffer for [[#PosixTimeToPosixTime]] array, and returns an output s32.
|-
| 202 || ToPosixTimeWithMyRule || Takes an input [[#CalendarTime]], an type-0xA output buffer for [[#PosixTimeToPosixTimeWithMyRule]] array, and returns an output s32.
|}
=== LoadLocationNameList GetDeviceLocationName ===Takes No input. Returns an input s32 LocationName_index and a type-0x6 output buffer for [[#LocationName]], returns an output s32 for total output entries. === LocationName ===This contains a TimeZone location string with a max size of 0x24 bytes.
=== TimeZoneRule SetDeviceLocationName ===This is Takes an 0x4000-byte structinput [[#LocationName]]. Official sw uses fixed-size 0x4000 for the buffer size with the above commandsNo output.
This is loaded from the [[Title_list|TimeZoneBinary]] title with the specified LocationName under the zoneinfo/ directory, the content is then converted into this TimeZoneRule structure=== GetTotalLocationNameCount ===No input. Returns an output s32.
The files contained under zoneinfo/ directory are Tzif2 files without Tzif1 header === LoadLocationNameList ===Takes an input s32 LocationName_index and data at the begining of them (see a type-0x6 output buffer for [https://tools[#LocationName]].ietf.org/html/rfc8536 RFC8536] Returns an output s32 for more information)total output entries.
The conversion of a Tzif2 file to === LoadTimeZoneRule ===Takes an input [[#LocationName]] and a type-0x16 output buffer for [[#TimeZoneRule structure is based on [https://github]].com/eggert/tz/blob/master/localtime.c tz database code] with some custom modifications (Leap seconds aren't handled, no usage of "posixrules" and Tzif1 support stripped out)No output.
{| class="wikitable" border="1"= GetTimeZoneRuleVersion ===|-! Offset || Size || Description|-| 0x0 || 0x4 || timecnt|-| 0x4 || 0x4 || typecnt|-| 0x8 || 0x4 || charcnt|-| 0xC || 0x1 || goback|-| 0xD || 0x1 || goahead|-| 0xE || 0x2 || Padding|-| 0x10 || 0x8 * 1000 || ats|-| 0x1f50 || 0x1 * 1000 || types|-| 0x2338 || 0x10 * 128 || ttis (time type information), struct ttinfoNo input. Returns an output [[1000#TimeZoneRuleVersion]]|-| 0x2b38 || 0x1 * 512 || chars|-| 0x2d38 || 0x4 || defaulttype|-| 0x2d3c || 0x12c4 || Reserved / Unused|}.
=== ttinfo ToCalendarTime ===This is Takes an 0x10input [[#PosixTime]] and a type-byte struct0x15 input buffer for [[#TimeZoneRule]].Represent a Time Type Information used in Returns an output [[#CalendarTime]] and [[#TimeZoneRuleCalendarAdditionalInfo]].
{| class="wikitable" border="1"|-! Offset || Size || Description|-| 0x0 || 0x4 || tt_gmtoff|-| 0x4 || 0x1 || tt_isdst|-| 0x5 || 0x3 || Padding|-| 0x8 || 0x4 || tt_abbrind|-| 0xC || 0x1 || tt_ttisstd|-| 0xD || 0x1 || tt_ttisgmt|-| 0xE || 0x2 || Padding= ToCalendarTimeWithMyRule ===|}Takes an input [[#PosixTime]]. Returns an output [[#CalendarTime]] and [[#CalendarAdditionalInfo]].
=== TimeZoneRuleVersion ToPosixTime ===This is Takes an u128input [[#CalendarTime]], a type-0x15 input buffer for [[#TimeZoneRule]], an type-0xA output buffer for [[#PosixTime]] array.R eturns an output s32.
=== CalendarTime ToPosixTimeWithMyRule ==={| class="wikitable" border="1"|-! Offset || Size || Description|-| 0x0 || 0x2 || Year|-| 0x2 || 0x1 || Month|-| 0x3 || 0x1 || Day|-| 0x4 || 0x1 || Hour|-| 0x5 || 0x1 || Minute|Takes an input [[#CalendarTime]], an type-| 0x6 || 0x1 || Second|-| 0x7 || 0x1 || Padding / unknown?|}0xA output buffer for [[#PosixTime]] array. Returns an output s32.
= BoardPowerControlEventTarget =This is an 0x8-byte struct"nn::bpc::BoardPowerControlEventTarget".
=== CalendarAdditionalInfo ==SleepButtonState ={| class="wikitable" border=This is "1nn::bpc::SleepButtonState"|-! Offset || Size || Description|-| 0x0 || 0x4 || 0-based day-of-week.|-| 0x4 || 0x4 || 0-based day-of-year.|-| 0x8 || 0x8 || Timezone name string.|-| 0x10 || 0x4 || 0 = no DST, 1 = DST.|-| 0x14 || 0x4 || s32 seconds relative to UTC for this timezone.|}
= EventTarget =This is an 0x18-byte struct. This stores timezone info"nn::bpc::EventTarget".
= Module =
|-
| [8.0.0+] - || || 0x3500041A || MCU
|}
 
= ClockRatesListType =
This is "nn::pcv::ClockRatesListType".
 
{| class="wikitable" border="1"
|-
! Value || Description
|-
| 0 || Invalid
|-
| 1 || Discrete
|-
| 2 || Range
|}
 
= ModuleState =
This is "nn::pcv::ModuleState".
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x4 || ClockFrequency
|-
| 0x4 || 0x1 || ClockEnabled
|-
| 0x5 || 0x1 || PowerEnabled
|-
| 0x6 || 0x1 || ResetAsserted
|-
| 0x7 || 0x1 || Reserved
|-
| 0x8 || 0x4 || MinVClockRate
|}
 
= TemperatureThreshold =
This is "nn::pcv::TemperatureThreshold".
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x4 || MinMilliC
|-
| 0x4 || 0x4 || MaxMilliC
|}
 
= PowerControlTarget =
This is "nn::pcv::PowerControlTarget".
 
= PowerDomainState =
This is "nn::pcv::PowerDomainState".
 
= SteadyClockTimePoint =
This is a 0x18-byte struct.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x8 || A u64 representing a point in time.
|-
| 0x8 || 0x10 || An ID representing the clock source.
|}
 
= TimeSpanType =
This is an u64.
 
= PosixTime =
This is an s64 for UTC POSIX time.
 
= SystemClockContext =
This is an 0x20-byte struct.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x8|| a [[#PosixTime]] representing the system clock epoch.
|-
| 0x8 || 0x18 || a [[#SteadyClockTimePoint]]
|}
 
= LocationName =
This contains a TimeZone location string with a max size of 0x24 bytes.
 
= TimeZoneRule =
This is an 0x4000-byte struct. Official sw uses fixed-size 0x4000 for the buffer size with the above commands.
 
This is loaded from the [[Title_list|TimeZoneBinary]] title with the specified LocationName under the zoneinfo/ directory, the content is then converted into this TimeZoneRule structure.
 
The files contained under zoneinfo/ directory are Tzif2 files without Tzif1 header and data at the begining of them (see [https://tools.ietf.org/html/rfc8536 RFC8536] for more information).
 
The conversion of a Tzif2 file to a TimeZoneRule structure is based on [https://github.com/eggert/tz/blob/master/localtime.c tz database code] with some custom modifications (Leap seconds aren't handled, no usage of "posixrules" and Tzif1 support stripped out).
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x4 || timecnt
|-
| 0x4 || 0x4 || typecnt
|-
| 0x8 || 0x4 || charcnt
|-
| 0xC || 0x1 || goback
|-
| 0xD || 0x1 || goahead
|-
| 0xE || 0x2 || Padding
|-
| 0x10 || 0x8 * 1000 || ats
|-
| 0x1f50 || 0x1 * 1000 || types
|-
| 0x2338 || 0x10 * 128 || ttis (time type information), struct ttinfo[1000]
|-
| 0x2b38 || 0x1 * 512 || chars
|-
| 0x2d38 || 0x4 || defaulttype
|-
| 0x2d3c || 0x12c4 || Reserved / Unused
|}
 
= ttinfo =
This is an 0x10-byte struct. Represents a Time Type Information used in [[#TimeZoneRule]].
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x4 || tt_gmtoff
|-
| 0x4 || 0x1 || tt_isdst
|-
| 0x5 || 0x3 || Padding
|-
| 0x8 || 0x4 || tt_abbrind
|-
| 0xC || 0x1 || tt_ttisstd
|-
| 0xD || 0x1 || tt_ttisgmt
|-
| 0xE || 0x2 || Padding
|}
 
= TimeZoneRuleVersion =
This is an u128.
 
= CalendarTime =
This is an 0x8-byte struct.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x2 || Year
|-
| 0x2 || 0x1 || Month
|-
| 0x3 || 0x1 || Day
|-
| 0x4 || 0x1 || Hour
|-
| 0x5 || 0x1 || Minute
|-
| 0x6 || 0x1 || Second
|-
| 0x7 || 0x1 || Padding / unknown?
|}
 
= CalendarAdditionalInfo =
This is an 0x18-byte struct. This stores timezone info.
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x4 || 0-based day-of-week.
|-
| 0x4 || 0x4 || 0-based day-of-year.
|-
| 0x8 || 0x8 || Timezone name string.
|-
| 0x10 || 0x4 || 0 = no DST, 1 = DST.
|-
| 0x14 || 0x4 || s32 seconds relative to UTC for this timezone.
|}
[[Category:Services]]