libctru  v1.6.0
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/gfx.h> // For gfxScreen_t
7 
8 /// LCD screens.
9 enum
10 {
11  GSPLCD_SCREEN_TOP = BIT(GFX_TOP), ///< Top screen.
12  GSPLCD_SCREEN_BOTTOM = BIT(GFX_BOTTOM), ///< Bottom screen.
14 };
15 
16 /// Initializes GSPLCD.
17 Result gspLcdInit(void);
18 
19 /// Exits GSPLCD.
20 void gspLcdExit(void);
21 
22 /// Powers on both backlights.
24 
25 /// Powers off both backlights.
27 
28 /**
29  * @brief Powers on the backlight.
30  * @param screen Screen to power on.
31  */
33 
34 /**
35  * @brief Powers off the backlight.
36  * @param screen Screen to power off.
37  */
39 
40 /**
41  * @brief Sets 3D_LEDSTATE to the input state value.
42  * @param disable False = 3D LED enable, true = 3D LED disable.
43  */
44 Result GSPLCD_SetLedForceOff(bool disable);
45 
46 /**
47  * @brief Gets the LCD screens' vendors. Stubbed on old 3ds.
48  * @param vendor Pointer to output the screen vendors to.
49  */
50 Result GSPLCD_GetVendors(u8 *vendors);
51 
52 /**
53  * @brief Gets the LCD screens' brightness. Stubbed on old 3ds.
54  * @param screen Screen to get the brightness value of.
55  * @param brightness Brightness value returned.
56  */
57 Result GSPLCD_GetBrightness(u32 screen, u32 *brightness);
58 
59 /**
60  * @brief Sets the LCD screens' brightness.
61  * @param screen Screen to set the brightness value of.
62  * @param brightness Brightness value set.
63  */
64 Result GSPLCD_SetBrightness(u32 screen, u32 brightness);
65 
66 /**
67  * @brief Sets the LCD screens' raw brightness.
68  * @param screen Screen to set the brightness value of.
69  * @param brightness Brightness value set.
70  */
71 Result GSPLCD_SetBrightnessRaw(u32 screen, u32 brightness);
s32 Result
Function result.
Definition: types.h:42
Bottom screen.
Definition: gfx.h:23
Both screens.
Definition: gsplcd.h:13
Result GSPLCD_PowerOffAllBacklights(void)
Powers off both backlights.
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
Result GSPLCD_SetLedForceOff(bool disable)
Sets 3D_LEDSTATE to the input state value.
Result GSPLCD_SetBrightness(u32 screen, u32 brightness)
Sets the LCD screens' brightness.
LCD Screens manipulation.
uint32_t u32
32-bit unsigned integer
Definition: types.h:23
Bottom screen.
Definition: gsplcd.h:12
Top screen.
Definition: gsplcd.h:11
Result gspLcdInit(void)
Initializes GSPLCD.
Result GSPLCD_PowerOnBacklight(u32 screen)
Powers on the backlight.
Top screen.
Definition: gfx.h:22
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:47
Result GSPLCD_PowerOnAllBacklights(void)
Powers on both backlights.
void gspLcdExit(void)
Exits GSPLCD.
Result GSPLCD_PowerOffBacklight(u32 screen)
Powers off the backlight.
Result GSPLCD_GetBrightness(u32 screen, u32 *brightness)
Gets the LCD screens' brightness.
Result GSPLCD_GetVendors(u8 *vendors)
Gets the LCD screens' vendors.
Result GSPLCD_SetBrightnessRaw(u32 screen, u32 brightness)
Sets the LCD screens' raw brightness.