|
libnx v4.12.0
|
PSM service IPC wrapper. More...
Go to the source code of this file.
Data Structures | |
| struct | PsmBatteryChargeInfoFieldsOld |
| BatteryChargeInfoFieldsOld [1.0.0-16.1.0]. More... | |
| struct | PsmBatteryChargeInfoFields |
| BatteryChargeInfoFields [17.0.0+]. More... | |
| struct | PsmSession |
| IPsmSession. More... | |
Enumerations | |
| enum | PsmChargerType { PsmChargerType_Unconnected = 0 , PsmChargerType_EnoughPower = 1 , PsmChargerType_LowPower = 2 , PsmChargerType_NotSupported = 3 } |
| ChargerType. More... | |
| enum | PsmVdd50State { PsmVdd50State_Unknown = 0 , PsmVdd50State_Vdd50AOffVdd50BOff = 1 , PsmVdd50State_Vdd50AOnVdd50BOff = 2 , PsmVdd50State_Vdd50AOffVdd50BOn = 3 } |
| Vdd50State. | |
| enum | PsmBatteryVoltageState { PsmBatteryVoltageState_NeedsShutdown = 0 , PsmBatteryVoltageState_NeedsSleep = 1 , PsmBatteryVoltageState_NoPerformanceBoost = 2 , PsmBatteryVoltageState_Normal = 3 } |
| BatteryVoltageState. More... | |
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) |
| GetBatteryChargePercentage. | |
| Result | psmGetChargerType (PsmChargerType *out) |
| GetChargerType. | |
| Result | psmEnableBatteryCharging (void) |
| EnableBatteryCharging. | |
| Result | psmDisableBatteryCharging (void) |
| DisableBatteryCharging. | |
| Result | psmIsBatteryChargingEnabled (bool *out) |
| IsBatteryChargingEnabled. | |
| Result | psmAcquireControllerPowerSupply (void) |
| AcquireControllerPowerSupply. | |
| Result | psmReleaseControllerPowerSupply (void) |
| ReleaseControllerPowerSupply. | |
| Result | psmEnableEnoughPowerChargeEmulation (void) |
| EnableEnoughPowerChargeEmulation. | |
| Result | psmDisableEnoughPowerChargeEmulation (void) |
| DisableEnoughPowerChargeEmulation. | |
| Result | psmEnableFastBatteryCharging (void) |
| EnableFastBatteryCharging. | |
| Result | psmDisableFastBatteryCharging (void) |
| DisableFastBatteryCharging. | |
| Result | psmGetBatteryVoltageState (PsmBatteryVoltageState *out) |
| GetBatteryVoltageState. | |
| Result | psmGetRawBatteryChargePercentage (double *out) |
| GetRawBatteryChargePercentage. | |
| Result | psmIsEnoughPowerSupplied (bool *out) |
| IsEnoughPowerSupplied. | |
| Result | psmGetBatteryAgePercentage (double *out) |
| GetBatteryAgePercentage. | |
| Result | psmGetBatteryChargeInfoEvent (Event *out_event, bool autoclear) |
| GetBatteryChargeInfoEvent. | |
| Result | psmGetBatteryChargeInfoFields (PsmBatteryChargeInfoFields *out_fields) |
| GetBatteryChargeInfoFields. | |
| Result | psmGetBatteryChargeCalibratedEvent (Event *out_event, bool autoclear) |
| GetBatteryChargeCalibratedEvent. | |
| 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.
BatteryVoltageState.
| 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. |
| Result psmGetBatteryAgePercentage | ( | double * | out | ) |
GetBatteryAgePercentage.
| [out] | out | Battery age percentage. |
| Result psmGetBatteryChargeInfoFields | ( | PsmBatteryChargeInfoFields * | out_fields | ) |
GetBatteryChargeInfoFields.
| [out] | out_fields | PsmBatteryChargeInfoFields |
GetBatteryChargePercentage.
| [out] | out | Battery charge percentage. |
| Result psmGetBatteryVoltageState | ( | PsmBatteryVoltageState * | out | ) |
GetBatteryVoltageState.
| [out] | out | PsmBatteryVoltageState |
| Result psmGetChargerType | ( | PsmChargerType * | out | ) |
GetChargerType.
| [out] | out | PsmChargerType |
| Result psmGetRawBatteryChargePercentage | ( | double * | out | ) |
GetRawBatteryChargePercentage.
| [out] | out | Raw battery charge percentage. |
| Result psmIsBatteryChargingEnabled | ( | bool * | out | ) |
IsBatteryChargingEnabled.
| [out] | out | Output flag. |
| Result psmIsEnoughPowerSupplied | ( | bool * | out | ) |
IsEnoughPowerSupplied.
| [out] | out | Output flag. |