-
Notifications
You must be signed in to change notification settings - Fork 188
Expand file tree
/
Copy pathclkrst.h
More file actions
31 lines (26 loc) · 1.03 KB
/
clkrst.h
File metadata and controls
31 lines (26 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* @file clkrst.h
* @brief Clkrst service IPC wrapper.
* @author p-sam
* @copyright libnx Authors
*/
#pragma once
#include "../types.h"
#include "../sf/service.h"
#include "../services/pcv.h"
typedef struct {
Service s;
} ClkrstSession;
/// Initialize clkrst. Only available on [8.0.0+].
Result clkrstInitialize(void);
/// Exit clkrst.
void clkrstExit(void);
/// Gets the Service object for the actual clkrst service session.
Service* clkrstGetServiceSession(void);
/// Opens a ClkrstSession for the requested PcvModuleId, unk is set to 3 in official sysmodules.
Result clkrstOpenSession(ClkrstSession* session_out, PcvModuleId module_id, u32 unk);
void clkrstCloseSession(ClkrstSession* session);
Result clkrstSetClockRate(ClkrstSession* session, u32 hz);
Result clkrstGetClockRate(ClkrstSession* session, u32 *out_hz);
Result clkrstGetPossibleClockRates(ClkrstSession *session, u32 *rates, s32 max_count, PcvClockRatesListType *out_type, s32 *out_count);
Result clkrstSetMinimumVoltageClockRate(ClkrstSession* session, u32 voltage);