libctru  v1.6.0
Functions
ptmu.h File Reference

PTMU service. More...

Go to the source code of this file.

Functions

Result ptmuInit (void)
 Initializes PTMU.
 
void ptmuExit (void)
 Exits PTMU.
 
Result PTMU_GetShellState (u8 *out)
 Gets the system's current shell state. More...
 
Result PTMU_GetBatteryLevel (u8 *out)
 Gets the system's current battery level. More...
 
Result PTMU_GetBatteryChargeState (u8 *out)
 Gets the system's current battery charge state. More...
 
Result PTMU_GetPedometerState (u8 *out)
 Gets the system's current pedometer state. More...
 
Result PTMU_GetTotalStepCount (u32 *steps)
 Gets the pedometer's total step count. More...
 
Result PTMU_GetAdapterState (bool *out)
 Gets whether the adapter is plugged in or not. More...
 

Detailed Description

PTMU service.

Function Documentation

◆ PTMU_GetAdapterState()

Result PTMU_GetAdapterState ( bool *  out)

Gets whether the adapter is plugged in or not.

Parameters
outPointer to write the adapter state to.

◆ PTMU_GetBatteryChargeState()

Result PTMU_GetBatteryChargeState ( u8 out)

Gets the system's current battery charge state.

Parameters
outPointer to write the current battery charge state to. (0 = not charging, 1 = charging)

◆ PTMU_GetBatteryLevel()

Result PTMU_GetBatteryLevel ( u8 out)

Gets the system's current battery level.

Parameters
outPointer to write the current battery level to. (0-5)

◆ PTMU_GetPedometerState()

Result PTMU_GetPedometerState ( u8 out)

Gets the system's current pedometer state.

Parameters
outPointer to write the current pedometer state to. (0 = not counting, 1 = counting)

◆ PTMU_GetShellState()

Result PTMU_GetShellState ( u8 out)

Gets the system's current shell state.

Parameters
outPointer to write the current shell state to. (0 = closed, 1 = open)

◆ PTMU_GetTotalStepCount()

Result PTMU_GetTotalStepCount ( u32 steps)

Gets the pedometer's total step count.

Parameters
stepsPointer to write the total step count to.