apm: add apmGetPerformanceMode

This commit is contained in:
3096 2020-03-05 22:49:46 -08:00
parent 44ec13169d
commit 6392512344
2 changed files with 10 additions and 0 deletions

View File

@ -33,6 +33,12 @@ Service* apmGetServiceSession(void);
/// Gets the Service object for ISession.
Service* apmGetServiceSession_Session(void);
/**
* @brief Gets the current ApmPerformanceMode.
* @param[out] out_performanceMode ApmPerformanceMode
*/
Result apmGetPerformanceMode(ApmPerformanceMode* out_performanceMode);
/**
* @brief Sets the PerformanceConfiguration for the specified PerformanceMode.
* @param[in] PerformanceMode \ref ApmPerformanceMode

View File

@ -39,6 +39,10 @@ static Result _apmCmdGetSession(Service* srv, Service* srv_out, u32 cmd_id) {
);
}
Result apmGetPerformanceMode(ApmPerformanceMode* out_performanceMode) {
return serviceDispatchOut(&g_apmSrv, 1, *out_performanceMode);
}
Result apmSetPerformanceConfiguration(ApmPerformanceMode PerformanceMode, u32 PerformanceConfiguration) {
const struct {
u32 PerformanceMode;