libnx  v4.6.0
clkrst.h
Go to the documentation of this file.
1 /**
2  * @file clkrst.h
3  * @brief Clkrst service IPC wrapper.
4  * @author p-sam
5  * @copyright libnx Authors
6  */
7 #pragma once
8 #include "../types.h"
9 #include "../sf/service.h"
10 #include "../services/pcv.h"
11 
12 typedef struct {
13  Service s;
15 
16 /// Initialize clkrst. Only available on [8.0.0+].
18 
19 /// Exit clkrst.
20 void clkrstExit(void);
21 
22 /// Gets the Service object for the actual clkrst service session.
24 
25 /// Opens a ClkrstSession for the requested PcvModuleId, unk is set to 3 in official sysmodules.
26 Result clkrstOpenSession(ClkrstSession* session_out, PcvModuleId module_id, u32 unk);
27 void clkrstCloseSession(ClkrstSession* session);
28 Result clkrstSetClockRate(ClkrstSession* session, u32 hz);
29 Result clkrstGetClockRate(ClkrstSession* session, u32 *out_hz);
30 Result clkrstGetPossibleClockRates(ClkrstSession *session, u32 *rates, s32 max_count, PcvClockRatesListType *out_type, s32 *out_count);
Service * clkrstGetServiceSession(void)
Gets the Service object for the actual clkrst service session.
void clkrstExit(void)
Exit clkrst.
Result clkrstInitialize(void)
Initialize clkrst. Only available on [8.0.0+].
Result clkrstOpenSession(ClkrstSession *session_out, PcvModuleId module_id, u32 unk)
Opens a ClkrstSession for the requested PcvModuleId, unk is set to 3 in official sysmodules.
PcvModuleId
Module id returned by [8.0.0+] pcv services See also: https://switchbrew.org/wiki/PCV_services#Module...
Definition: pcv.h:104
Definition: clkrst.h:12
Service object structure.
Definition: service.h:14
u32 Result
Function error code result type.
Definition: types.h:44
int32_t s32
32-bit signed integer.
Definition: types.h:27
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21