1
0
mirror of https://github.com/switchbrew/libnx.git synced 2025-07-26 12:02:15 +02:00
libnx/nx/include/switch/services/bpc.h

29 lines
697 B
C

/**
* @file bpc.h
* @brief Board power control (bpc) service IPC wrapper.
* @author XorTroll, SciresM
* @copyright libnx Authors
*/
#pragma once
#include "../types.h"
#include "../sf/service.h"
typedef enum {
BpcSleepButtonState_Held = 0,
BpcSleepButtonState_Released = 1,
} BpcSleepButtonState;
/// Initialize bpc.
Result bpcInitialize(void);
/// Exit bpc.
void bpcExit(void);
/// Gets the Service object for the actual bpc service session.
Service* bpcGetServiceSession(void);
Result bpcShutdownSystem(void);
Result bpcRebootSystem(void);
Result bpcGetSleepButtonState(BpcSleepButtonState *out); ///< [2.0.0-13.2.1]
Result bpcGetPowerButton(bool* out_is_pushed); ///< [6.0.0+]