libnx  v4.7.0
Enumerations | Functions
apm.h File Reference

Performance management (apm) service IPC wrapper. More...

#include "../types.h"
#include "../sf/service.h"

Go to the source code of this file.

Enumerations

enum  ApmPerformanceMode {
  ApmPerformanceMode_Invalid = -1 ,
  ApmPerformanceMode_Normal = 0 ,
  ApmPerformanceMode_Boost = 1
}
 PerformanceMode. More...
 
enum  ApmCpuBoostMode {
  ApmCpuBoostMode_Normal = 0 ,
  ApmCpuBoostMode_FastLoad = 1 ,
  ApmCpuBoostMode_Type2 = 2
}
 CpuBoostMode. With appletSetCpuBoostMode, only values 0/1 are available. This allows using higher clock rates. More...
 

Functions

Result apmInitialize (void)
 Initialize apm. Used automatically by appletInitialize with AppletType_Application.
 
void apmExit (void)
 Exit apm. Used automatically by appletExit with AppletType_Application.
 
ServiceapmGetServiceSession (void)
 Gets the Service object for the actual apm service session.
 
ServiceapmGetServiceSession_Session (void)
 Gets the Service object for ISession.
 
Result apmGetPerformanceMode (ApmPerformanceMode *out_performanceMode)
 Gets the current ApmPerformanceMode. More...
 
Result apmSetPerformanceConfiguration (ApmPerformanceMode PerformanceMode, u32 PerformanceConfiguration)
 Sets the PerformanceConfiguration for the specified PerformanceMode. More...
 
Result apmGetPerformanceConfiguration (ApmPerformanceMode PerformanceMode, u32 *PerformanceConfiguration)
 Gets the PerformanceConfiguration for the specified PerformanceMode. More...
 

Detailed Description

Performance management (apm) service IPC wrapper.

This is used internally by applet with __nx_applet_PerformanceConfiguration, however if you prefer non-init/exit can be used manually. See also: https://switchbrew.org/wiki/PTM_services#apm:am

Author
yellows8

Enumeration Type Documentation

◆ ApmCpuBoostMode

CpuBoostMode. With appletSetCpuBoostMode, only values 0/1 are available. This allows using higher clock rates.

Enumerator
ApmCpuBoostMode_Normal 

Default, boost-mode disabled.

ApmCpuBoostMode_FastLoad 

Boost CPU. Additionally, throttle GPU to minimum. Use performance configurations 0x92220009 (Docked) and 0x9222000A (Handheld), or 0x9222000B and 0x9222000C.

ApmCpuBoostMode_Type2 

Conserve power. Only throttle GPU to minimum. Use performance configurations 0x9222000B and 0x9222000C.

◆ ApmPerformanceMode

PerformanceMode.

Enumerator
ApmPerformanceMode_Invalid 

Invalid.

ApmPerformanceMode_Normal 

Normal.

ApmPerformanceMode_Boost 

Boost.

Function Documentation

◆ apmGetPerformanceConfiguration()

Result apmGetPerformanceConfiguration ( ApmPerformanceMode  PerformanceMode,
u32 PerformanceConfiguration 
)

Gets the PerformanceConfiguration for the specified PerformanceMode.

Parameters
[in]PerformanceModeApmPerformanceMode
[out]PerformanceConfigurationPerformanceConfiguration

◆ apmGetPerformanceMode()

Result apmGetPerformanceMode ( ApmPerformanceMode out_performanceMode)

Gets the current ApmPerformanceMode.

Parameters
[out]out_performanceModeApmPerformanceMode

◆ apmSetPerformanceConfiguration()

Result apmSetPerformanceConfiguration ( ApmPerformanceMode  PerformanceMode,
u32  PerformanceConfiguration 
)

Sets the PerformanceConfiguration for the specified PerformanceMode.

Parameters
[in]PerformanceModeApmPerformanceMode
[in]PerformanceConfigurationPerformanceConfiguration