libctru  v1.6.0
ns.h
Go to the documentation of this file.
1 /**
2  * @file ns.h
3  * @brief NS (Nintendo Shell) service.
4  */
5 #pragma once
6 
7 /// Initializes NS.
8 Result nsInit(void);
9 
10 /// Exits NS.
11 void nsExit(void);
12 
13 /**
14  * @brief Launches a title and the required firmware (only if necessary).
15  * @param titleid ID of the title to launch, 0 for gamecard, JPN System Settings' titleID for System Settings.
16  */
17 Result NS_LaunchFIRM(u64 titleid);
18 
19 /**
20  * @brief Launches a title.
21  * @param titleid ID of the title to launch, or 0 for gamecard.
22  * @param launch_flags Flags used when launching the title.
23  * @param procid Pointer to write the process ID of the launched title to.
24  */
25 Result NS_LaunchTitle(u64 titleid, u32 launch_flags, u32 *procid);
26 
27 /// Terminates the application from which this function is called
29 /**
30  * @brief Launches a title and the required firmware.
31  * @param titleid ID of the title to launch, 0 for gamecard.
32  * @param flags Flags for firm-launch. bit0: require an application title-info structure in FIRM paramters to be specified via FIRM parameters. bit1: if clear, NS will check certain Configuration Memory fields.
33  */
34 Result NS_LaunchApplicationFIRM(u64 titleid, u32 flags);
35 
36 /**
37  * @brief Reboots to a title.
38  * @param mediatype Mediatype of the title.
39  * @param titleid ID of the title to launch.
40  */
41 Result NS_RebootToTitle(u8 mediatype, u64 titleid);
42 
43 /**
44  * @brief Terminates the process with the specified titleid.
45  * @param titleid ID of the title to terminate.
46  * @param timeout Timeout in nanoseconds. Pass 0 if not required.
47  */
48 Result NS_TerminateProcessTID(u64 titleid, u64 timeout);
49 
50 /// Reboots the system
s32 Result
Function result.
Definition: types.h:42
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
uint64_t u64
64-bit unsigned integer
Definition: types.h:24
Result NS_LaunchFIRM(u64 titleid)
Launches a title and the required firmware (only if necessary).
void nsExit(void)
Exits NS.
uint32_t u32
32-bit unsigned integer
Definition: types.h:23
Result NS_LaunchTitle(u64 titleid, u32 launch_flags, u32 *procid)
Launches a title.
Result NS_TerminateTitle(void)
Terminates the application from which this function is called.
Result nsInit(void)
Initializes NS.
Result NS_RebootSystem(void)
Reboots the system.
Result NS_TerminateProcessTID(u64 titleid, u64 timeout)
Terminates the process with the specified titleid.
Result NS_LaunchApplicationFIRM(u64 titleid, u32 flags)
Launches a title and the required firmware.
Result NS_RebootToTitle(u8 mediatype, u64 titleid)
Reboots to a title.