ptmu.h
Go to the documentation of this file.
/**
* @file ptmu.h
* @brief PTMU service.
*/
#pragma once
/// Initializes PTMU.
Result ptmuInit(void);
/// Exits PTMU.
void ptmuExit(void);
/**
* @brief Gets a pointer to the current ptm:u session handle.
* @return A pointer to the current ptm:u session handle.
*/
Handle *ptmuGetSessionHandle(void);
/**
* @brief Gets the system's current shell state.
* @param out Pointer to write the current shell state to. (0 = closed, 1 = open)
*/
Result PTMU_GetShellState(u8 *out);
/**
* @brief Gets the system's current battery level.
* @param out Pointer to write the current battery level to. (0-5)
*/
Result PTMU_GetBatteryLevel(u8 *out);
/**
* @brief Gets the system's current battery charge state.
* @param out Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)
*/
Result PTMU_GetBatteryChargeState(u8 *out);
/**
* @brief Gets the system's current pedometer state.
* @param out Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)
*/
Result PTMU_GetPedometerState(u8 *out);
/**
* @brief Gets the pedometer's total step count.
* @param steps Pointer to write the total step count to.
*/
Result PTMU_GetTotalStepCount(u32 *steps);
/**
* @brief Gets whether the adapter is plugged in or not
* @param out Pointer to write the adapter state to.
*/
Result PTMU_GetAdapterState(bool *out);
PTMU_GetAdapterState
Result PTMU_GetAdapterState(bool *out)
Gets whether the adapter is plugged in or not.
PTMU_GetBatteryChargeState
Result PTMU_GetBatteryChargeState(u8 *out)
Gets the system's current battery charge state.
ptmuExit
void ptmuExit(void)
Exits PTMU.
ptmuInit
Result ptmuInit(void)
Initializes PTMU.
PTMU_GetTotalStepCount
Result PTMU_GetTotalStepCount(u32 *steps)
Gets the pedometer's total step count.
PTMU_GetBatteryLevel
Result PTMU_GetBatteryLevel(u8 *out)
Gets the system's current battery level.
ptmuGetSessionHandle
Handle * ptmuGetSessionHandle(void)
Gets a pointer to the current ptm:u session handle.
PTMU_GetPedometerState
Result PTMU_GetPedometerState(u8 *out)
Gets the system's current pedometer state.
PTMU_GetShellState
Result PTMU_GetShellState(u8 *out)
Gets the system's current shell state.
u8
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
Handle
u32 Handle
Resource handle.
Definition: types.h:41
Result
s32 Result
Function result.
Definition: types.h:42
u32
uint32_t u32
32-bit unsigned integer
Definition: types.h:23