gsplcd.h
Go to the documentation of this file.
/**
* @file gsplcd.h
* @brief GSPLCD service.
*/
#pragma once
#include <3ds/types.h>
#include <3ds/services/gspgpu.h>
/// LCD screens.
enum
{
GSPLCD_SCREEN_TOP = BIT(GSP_SCREEN_TOP), ///< Top screen.
GSPLCD_SCREEN_BOTTOM = BIT(GSP_SCREEN_BOTTOM), ///< Bottom screen.
GSPLCD_SCREEN_BOTH = GSPLCD_SCREEN_TOP | GSPLCD_SCREEN_BOTTOM, ///< Both screens.
};
/// Initializes GSPLCD.
Result gspLcdInit(void);
/// Exits GSPLCD.
void gspLcdExit(void);
/**
* @brief Gets a pointer to the current gsp::Lcd session handle.
* @return A pointer to the current gsp::Lcd session handle.
*/
Handle *gspLcdGetSessionHandle(void);
/// Powers on both backlights.
Result GSPLCD_PowerOnAllBacklights(void);
/// Powers off both backlights.
Result GSPLCD_PowerOffAllBacklights(void);
/**
* @brief Powers on the backlight.
* @param screen Screen to power on.
*/
Result GSPLCD_PowerOnBacklight(u32 screen);
/**
* @brief Powers off the backlight.
* @param screen Screen to power off.
*/
Result GSPLCD_PowerOffBacklight(u32 screen);
/**
* @brief Sets 3D_LEDSTATE to the input state value.
* @param disable False = 3D LED enable, true = 3D LED disable.
*/
Result GSPLCD_SetLedForceOff(bool disable);
/**
* @brief Gets the LCD screens' vendors. Stubbed on old 3ds.
* @param vendor Pointer to output the screen vendors to.
*/
Result GSPLCD_GetVendors(u8 *vendors);
/**
* @brief Gets the LCD screens' brightness. Stubbed on old 3ds.
* @param screen Screen to get the brightness value of.
* @param brightness Brightness value returned.
*/
Result GSPLCD_GetBrightness(u32 screen, u32 *brightness);
/**
* @brief Sets the LCD screens' brightness.
* @param screen Screen to set the brightness value of.
* @param brightness Brightness value set.
*/
Result GSPLCD_SetBrightness(u32 screen, u32 brightness);
/**
* @brief Sets the LCD screens' raw brightness.
* @param screen Screen to set the brightness value of.
* @param brightness Brightness value set.
*/
Result GSPLCD_SetBrightnessRaw(u32 screen, u32 brightness);
gspgpu.h
GSPGPU service.
GSP_SCREEN_BOTTOM
#define GSP_SCREEN_BOTTOM
ID of the bottom screen.
Definition: gspgpu.h:8
GSP_SCREEN_TOP
#define GSP_SCREEN_TOP
ID of the top screen.
Definition: gspgpu.h:7
gspLcdGetSessionHandle
Handle * gspLcdGetSessionHandle(void)
Gets a pointer to the current gsp::Lcd session handle.
GSPLCD_SCREEN_BOTH
@ GSPLCD_SCREEN_BOTH
Both screens.
Definition: gsplcd.h:14
GSPLCD_SCREEN_TOP
@ GSPLCD_SCREEN_TOP
Top screen.
Definition: gsplcd.h:12
GSPLCD_SCREEN_BOTTOM
@ GSPLCD_SCREEN_BOTTOM
Bottom screen.
Definition: gsplcd.h:13
gspLcdInit
Result gspLcdInit(void)
Initializes GSPLCD.
gspLcdExit
void gspLcdExit(void)
Exits GSPLCD.
GSPLCD_PowerOffAllBacklights
Result GSPLCD_PowerOffAllBacklights(void)
Powers off both backlights.
GSPLCD_PowerOnBacklight
Result GSPLCD_PowerOnBacklight(u32 screen)
Powers on the backlight.
GSPLCD_SetBrightnessRaw
Result GSPLCD_SetBrightnessRaw(u32 screen, u32 brightness)
Sets the LCD screens' raw brightness.
GSPLCD_SetLedForceOff
Result GSPLCD_SetLedForceOff(bool disable)
Sets 3D_LEDSTATE to the input state value.
GSPLCD_GetVendors
Result GSPLCD_GetVendors(u8 *vendors)
Gets the LCD screens' vendors.
GSPLCD_GetBrightness
Result GSPLCD_GetBrightness(u32 screen, u32 *brightness)
Gets the LCD screens' brightness.
GSPLCD_PowerOffBacklight
Result GSPLCD_PowerOffBacklight(u32 screen)
Powers off the backlight.
GSPLCD_PowerOnAllBacklights
Result GSPLCD_PowerOnAllBacklights(void)
Powers on both backlights.
GSPLCD_SetBrightness
Result GSPLCD_SetBrightness(u32 screen, u32 brightness)
Sets the LCD screens' brightness.
types.h
Various system types.
BIT
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:47
u8
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
Handle
u32 Handle
Resource handle.
Definition: types.h:41
Result
s32 Result
Function result.
Definition: types.h:42
u32
uint32_t u32
32-bit unsigned integer
Definition: types.h:23