39 static const s32 values[] = { 3, -1, 1, 0, 0, -1, 2 };
Result PTMSYSM_RebootAsync(u64 timeout)
Trigger a hardware system reboot via the MCU.
Result PTMSYSM_SetRtcTime(s64 msY2k)
Writes the time and date coming to the RTC, after conversion.
Result ptmSysmInit(void)
Initializes ptm:sysm.
Result PTMSYSM_Awaken(void)
Cancels the "half-awake" state and fully wakes up the 3DS after some delay.
Result PTMSYSM_SetUserTime(s64 msY2k)
Sets the user time by updating the user time offset.
Result PTMSYSM_GetWakeReason(PtmSleepConfig *outSleepConfig)
Gets the wake reason (only the first applicable wake event is taken into account).
Result PTMSYSM_ShutdownAsync(u64 timeout)
Trigger a hardware system shutdown via the MCU.
Result PTMSYSM_GetRtcTime(s64 *outMsY2k)
Reads the time and date coming from the RTC and converts the result.
Result PTMSYSM_CheckNew3DS(bool *out)
Checks whether the system is a New 3DS.
Result PTMSYSM_ReplyToSleepQuery(bool deny)
Accepts or denies the incoming sleep mode request.
Result PTMSYSM_NotifySleepPreparationComplete(s32 ackValue)
Acknowledges the current sleep notification and advance the internal sleep mode FSM.
static s32 ptmSysmGetNotificationAckValue(u32 id)
See PTMSYSM_NotifySleepPreparationComplete. Corresponds to the number of potentially remaning notifs....
Definition: ptmsysm.h:37
Handle * ptmSysmGetSessionHandle(void)
Gets a pointer to the current ptm:sysm session handle.
@ PTMNOTIFID_HALF_AWAKE
The system has been woken up but is about to go to sleep again (ack = 2).
Definition: ptmsysm.h:28
@ PTMNOTIFID_FULLY_AWAKE
The system is fully awake (no ack required).
Definition: ptmsysm.h:27
@ PTMNOTIFID_FULLY_WAKING_UP
The system has been woken up, and the paused processes are about to be unpaused (ack = 1).
Definition: ptmsysm.h:26
@ PTMNOTIFID_SLEEP_REQUESTED
PTMSYSM_RequestSleep has been called (ack = 3)
Definition: ptmsysm.h:22
@ PTMNOTIFID_GOING_TO_SLEEP
All processes not having "RunnableOnSleep" have been paused & the system is about to go to sleep (ack...
Definition: ptmsysm.h:25
@ PTMNOTIFID_SHUTDOWN
The system is about to power off or reboot.
Definition: ptmsysm.h:30
@ PTMNOTIFID_BATTERY_LOW
The battery level has reached 10% or below.
Definition: ptmsysm.h:33
@ PTMNOTIFID_BATTERY_VERY_LOW
The battery level has reached 5% or below.
Definition: ptmsysm.h:32
@ PTMNOTIFID_SLEEP_ALLOWED
The sleep request has been allowed by PTMSYSM_ReplyToSleepQuery(false) (ack = 1).
Definition: ptmsysm.h:24
@ PTMNOTIFID_SLEEP_DENIED
The sleep request has been denied by PTMSYSM_ReplyToSleepQuery(true) (no ack required).
Definition: ptmsysm.h:23
Result PTMSYSM_ConfigureNew3DSCPU(u8 value)
Configures the New 3DS' CPU clock speed and L2 cache.
Result PTMSYSM_RequestSleep(void)
Requests to enter sleep mode.
void ptmSysmExit(void)
Exits ptm:sysm.
Result PTMSYSM_InvalidateSystemTime(void)
Invalidates the "system time" (cfg block 0x30002)
Result PTMSYSM_SetWakeEvents(const PtmSleepConfig *sleepConfig)
Sets the wake events (two sets: when to fully wake up and when to return to sleep).
PtmWakeEvents continue_sleep_events
Wake events for which the system should return to sleep.
Definition: ptmsysm.h:17
PtmWakeEvents exit_sleep_events
Wake events for which the system should fully wake up.
Definition: ptmsysm.h:16
PDN wake events and MCU interrupts to select, combined with those of other processes.
Definition: ptmsysm.h:10
u32 pdn_wake_events
Written to PDN_WAKE_EVENTS. Don't select bit26 (MCU), PTM will do it automatically.
Definition: ptmsysm.h:11
u32 mcu_interupt_mask
MCU interrupts to check when a MCU wake event happens.
Definition: ptmsysm.h:12
int64_t s64
64-bit signed integer
Definition: types.h:29
uint64_t u64
64-bit unsigned integer
Definition: types.h:24
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
u32 Handle
Resource handle.
Definition: types.h:41
s32 Result
Function result.
Definition: types.h:42
int32_t s32
32-bit signed integer
Definition: types.h:28
uint32_t u32
32-bit unsigned integer
Definition: types.h:23