libctru  v2.4.1
ptmu.h
Go to the documentation of this file.
1 /**
2  * @file ptmu.h
3  * @brief PTMU service.
4  */
5 #pragma once
6 
7 /// Initializes PTMU.
9 
10 /// Exits PTMU.
11 void ptmuExit(void);
12 
13 /**
14  * @brief Gets a pointer to the current ptm:u session handle.
15  * @return A pointer to the current ptm:u session handle.
16  */
18 
19 /**
20  * @brief Gets the system's current shell state.
21  * @param out Pointer to write the current shell state to. (0 = closed, 1 = open)
22  */
24 
25 /**
26  * @brief Gets the system's current battery level.
27  * @param out Pointer to write the current battery level to. (0-5)
28  */
30 
31 /**
32  * @brief Gets the system's current battery charge state.
33  * @param out Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)
34  */
36 
37 /**
38  * @brief Gets the system's current pedometer state.
39  * @param out Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)
40  */
42 
43 /**
44  * @brief Gets the pedometer's total step count.
45  * @param steps Pointer to write the total step count to.
46  */
48 
49 /**
50  * @brief Gets whether the adapter is plugged in or not
51  * @param out Pointer to write the adapter state to.
52  */
Result PTMU_GetAdapterState(bool *out)
Gets whether the adapter is plugged in or not.
Result PTMU_GetBatteryChargeState(u8 *out)
Gets the system's current battery charge state.
void ptmuExit(void)
Exits PTMU.
Result ptmuInit(void)
Initializes PTMU.
Result PTMU_GetTotalStepCount(u32 *steps)
Gets the pedometer's total step count.
Result PTMU_GetBatteryLevel(u8 *out)
Gets the system's current battery level.
Handle * ptmuGetSessionHandle(void)
Gets a pointer to the current ptm:u session handle.
Result PTMU_GetPedometerState(u8 *out)
Gets the system's current pedometer state.
Result PTMU_GetShellState(u8 *out)
Gets the system's current shell state.
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
uint32_t u32
32-bit unsigned integer
Definition: types.h:23