|
libnx v4.9.0
|
PSM service IPC wrapper. More...
Go to the source code of this file.
Data Structures | |
| struct | PsmSession |
| IPsmSession. More... | |
Enumerations | |
| enum | PsmChargerType { PsmChargerType_Unconnected = 0 , PsmChargerType_EnoughPower = 1 , PsmChargerType_LowPower = 2 , PsmChargerType_NotSupported = 3 } |
| enum | PsmBatteryVoltageState { PsmBatteryVoltageState_NeedsShutdown = 0 , PsmBatteryVoltageState_NeedsSleep = 1 , PsmBatteryVoltageState_NoPerformanceBoost = 2 , PsmBatteryVoltageState_Normal = 3 } |
Functions | |
| Result | psmInitialize (void) |
| Initialize psm. | |
| void | psmExit (void) |
| Exit psm. | |
| Service * | psmGetServiceSession (void) |
| Gets the Service object for the actual psm service session. | |
| Result | psmGetBatteryChargePercentage (u32 *out) |
| Result | psmGetChargerType (PsmChargerType *out) |
| Result | psmGetBatteryVoltageState (PsmBatteryVoltageState *out) |
| Result | psmGetRawBatteryChargePercentage (double *out) |
| Result | psmIsEnoughPowerSupplied (bool *out) |
| Result | psmGetBatteryAgePercentage (double *out) |
| Result | psmBindStateChangeEvent (PsmSession *s, bool ChargerType, bool PowerSupply, bool BatteryVoltage) |
| Wrapper func which opens a PsmSession and handles event setup. | |
| Result | psmWaitStateChangeEvent (PsmSession *s, u64 timeout) |
| Wait on the Event setup by psmBindStateChangeEvent. | |
| Result | psmUnbindStateChangeEvent (PsmSession *s) |
| Cleanup version of psmBindStateChangeEvent. Must be called by the user once the PsmSession is done being used. | |
PSM service IPC wrapper.
| enum PsmChargerType |
| Result psmBindStateChangeEvent | ( | PsmSession * | s, |
| bool | ChargerType, | ||
| bool | PowerSupply, | ||
| bool | BatteryVoltage | ||
| ) |
Wrapper func which opens a PsmSession and handles event setup.
| [out] | s | PsmSession object. |
| [in] | ChargerType | Passed to SetChargerTypeChangeEventEnabled. |
| [in] | PowerSupply | Passed to SetPowerSupplyChangeEventEnabled. |
| [in] | BatteryVoltage | Passed to SetBatteryVoltageStateChangeEventEnabled. |