libnx  v4.2.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);
clkrstGetServiceSession
Service * clkrstGetServiceSession(void)
Gets the Service object for the actual clkrst service session.
ClkrstSession
Definition: clkrst.h:12
u32
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
PcvModuleId
PcvModuleId
Module id returned by [8.0.0+] pcv services See also: https://switchbrew.org/wiki/PCV_services#Module...
Definition: pcv.h:104
Result
u32 Result
Function error code result type.
Definition: types.h:44
clkrstExit
void clkrstExit(void)
Exit clkrst.
Service
Service object structure.
Definition: service.h:13
clkrstOpenSession
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.
clkrstInitialize
Result clkrstInitialize(void)
Initialize clkrst. Only available on [8.0.0+].