libctru  v1.6.0
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.
8 Result ptmuInit(void);
9 
10 /// Exits PTMU.
11 void ptmuExit(void);
12 
13 /**
14  * @brief Gets the system's current shell state.
15  * @param out Pointer to write the current shell state to. (0 = closed, 1 = open)
16  */
18 
19 /**
20  * @brief Gets the system's current battery level.
21  * @param out Pointer to write the current battery level to. (0-5)
22  */
24 
25 /**
26  * @brief Gets the system's current battery charge state.
27  * @param out Pointer to write the current battery charge state to. (0 = not charging, 1 = charging)
28  */
30 
31 /**
32  * @brief Gets the system's current pedometer state.
33  * @param out Pointer to write the current pedometer state to. (0 = not counting, 1 = counting)
34  */
36 
37 /**
38  * @brief Gets the pedometer's total step count.
39  * @param steps Pointer to write the total step count to.
40  */
42 
43 /**
44  * @brief Gets whether the adapter is plugged in or not
45  * @param out Pointer to write the adapter state to.
46  */
47 Result PTMU_GetAdapterState(bool *out);
s32 Result
Function result.
Definition: types.h:42
Result ptmuInit(void)
Initializes PTMU.
Result PTMU_GetTotalStepCount(u32 *steps)
Gets the pedometer's total step count.
Result PTMU_GetAdapterState(bool *out)
Gets whether the adapter is plugged in or not.
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
uint32_t u32
32-bit unsigned integer
Definition: types.h:23
void ptmuExit(void)
Exits PTMU.
Result PTMU_GetBatteryChargeState(u8 *out)
Gets the system's current battery charge state.
Result PTMU_GetShellState(u8 *out)
Gets the system's current shell state.
Result PTMU_GetBatteryLevel(u8 *out)
Gets the system's current battery level.
Result PTMU_GetPedometerState(u8 *out)
Gets the system's current pedometer state.