libctru  v2.4.1
gsplcd.h
Go to the documentation of this file.
1 /**
2  * @file gsplcd.h
3  * @brief GSPLCD service.
4  */
5 #pragma once
6 #include <3ds/types.h>
7 #include <3ds/services/gspgpu.h>
8 
9 /// LCD screens.
10 enum
11 {
12  GSPLCD_SCREEN_TOP = BIT(GSP_SCREEN_TOP), ///< Top screen.
13  GSPLCD_SCREEN_BOTTOM = BIT(GSP_SCREEN_BOTTOM), ///< Bottom screen.
15 };
16 
17 /// Initializes GSPLCD.
19 
20 /// Exits GSPLCD.
21 void gspLcdExit(void);
22 
23 /**
24  * @brief Gets a pointer to the current gsp::Lcd session handle.
25  * @return A pointer to the current gsp::Lcd session handle.
26  */
28 
29 /// Powers on both backlights.
31 
32 /// Powers off both backlights.
34 
35 /**
36  * @brief Powers on the backlight.
37  * @param screen Screen to power on.
38  */
40 
41 /**
42  * @brief Powers off the backlight.
43  * @param screen Screen to power off.
44  */
46 
47 /**
48  * @brief Sets 3D_LEDSTATE to the input state value.
49  * @param disable False = 3D LED enable, true = 3D LED disable.
50  */
52 
53 /**
54  * @brief Gets the LCD screens' vendors. Stubbed on old 3ds.
55  * @param vendor Pointer to output the screen vendors to.
56  */
58 
59 /**
60  * @brief Gets the LCD screens' brightness. Stubbed on old 3ds.
61  * @param screen Screen to get the brightness value of.
62  * @param brightness Brightness value returned.
63  */
64 Result GSPLCD_GetBrightness(u32 screen, u32 *brightness);
65 
66 /**
67  * @brief Sets the LCD screens' brightness.
68  * @param screen Screen to set the brightness value of.
69  * @param brightness Brightness value set.
70  */
71 Result GSPLCD_SetBrightness(u32 screen, u32 brightness);
72 
73 /**
74  * @brief Sets the LCD screens' raw brightness.
75  * @param screen Screen to set the brightness value of.
76  * @param brightness Brightness value set.
77  */
78 Result GSPLCD_SetBrightnessRaw(u32 screen, u32 brightness);
GSPGPU service.
#define GSP_SCREEN_BOTTOM
ID of the bottom screen.
Definition: gspgpu.h:8
#define GSP_SCREEN_TOP
ID of the top screen.
Definition: gspgpu.h:7
Handle * gspLcdGetSessionHandle(void)
Gets a pointer to the current gsp::Lcd session handle.
@ GSPLCD_SCREEN_BOTH
Both screens.
Definition: gsplcd.h:14
@ GSPLCD_SCREEN_TOP
Top screen.
Definition: gsplcd.h:12
@ GSPLCD_SCREEN_BOTTOM
Bottom screen.
Definition: gsplcd.h:13
Result gspLcdInit(void)
Initializes GSPLCD.
void gspLcdExit(void)
Exits GSPLCD.
Result GSPLCD_PowerOffAllBacklights(void)
Powers off both backlights.
Result GSPLCD_PowerOnBacklight(u32 screen)
Powers on the backlight.
Result GSPLCD_SetBrightnessRaw(u32 screen, u32 brightness)
Sets the LCD screens' raw brightness.
Result GSPLCD_SetLedForceOff(bool disable)
Sets 3D_LEDSTATE to the input state value.
Result GSPLCD_GetVendors(u8 *vendors)
Gets the LCD screens' vendors.
Result GSPLCD_GetBrightness(u32 screen, u32 *brightness)
Gets the LCD screens' brightness.
Result GSPLCD_PowerOffBacklight(u32 screen)
Powers off the backlight.
Result GSPLCD_PowerOnAllBacklights(void)
Powers on both backlights.
Result GSPLCD_SetBrightness(u32 screen, u32 brightness)
Sets the LCD screens' brightness.
Various system types.
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:47
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
u32 Handle
Resource handle.
Definition: types.h:41
s32 Result
Function result.
Definition: types.h:42
uint32_t u32
32-bit unsigned integer
Definition: types.h:23