libnx  v4.2.2
bpc.h
Go to the documentation of this file.
1 /**
2  * @file bpc.h
3  * @brief Board power control (bpc) service IPC wrapper.
4  * @author XorTroll, SciresM
5  * @copyright libnx Authors
6  */
7 #pragma once
8 #include "../types.h"
9 #include "../sf/service.h"
10 
11 typedef enum {
12  BpcSleepButtonState_Held = 0,
13  BpcSleepButtonState_Released = 1,
14 } BpcSleepButtonState;
15 
16 /// Initialize bpc.
17 Result bpcInitialize(void);
18 
19 /// Exit bpc.
20 void bpcExit(void);
21 
22 /// Gets the Service object for the actual bpc service session.
24 
25 Result bpcShutdownSystem(void);
26 Result bpcRebootSystem(void);
27 Result bpcGetSleepButtonState(BpcSleepButtonState *out); ///< [2.0.0-13.2.1]
28 Result bpcGetPowerButton(bool* out_is_pushed); ///< [6.0.0+]
bpcGetSleepButtonState
Result bpcGetSleepButtonState(BpcSleepButtonState *out)
[2.0.0-13.2.1]
bpcExit
void bpcExit(void)
Exit bpc.
Result
u32 Result
Function error code result type.
Definition: types.h:44
bpcGetPowerButton
Result bpcGetPowerButton(bool *out_is_pushed)
[6.0.0+]
bpcInitialize
Result bpcInitialize(void)
Initialize bpc.
bpcGetServiceSession
Service * bpcGetServiceSession(void)
Gets the Service object for the actual bpc service session.
Service
Service object structure.
Definition: service.h:13