Loading...
Searching...
No Matches
Display device generic API

Define the generic API of a display device. More...

Detailed Description

Define the generic API of a display device.

Warning
This feature is experimental!
This API is experimental and in an early state - expect changes!
Author
Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr

Data Structures

struct  disp_dev_area_t
 Display area coordinates. More...
 
struct  disp_dev_driver_t
 Generic type for a display driver. More...
 
struct  disp_dev
 Generic type for a display device. More...
 
struct  disp_dev_reg
 Disp dev registry entry. More...
 

Typedefs

typedef struct disp_dev disp_dev_t
 Forward declaration for display device struct.
 
typedef struct disp_dev_reg disp_dev_reg_t
 Disp dev registry entry.
 

Functions

int disp_dev_reg_add (disp_dev_reg_t *dev)
 Add pointer to a display device item to the list of display items.
 
disp_dev_reg_tdisp_dev_reg_find_screen (uint8_t screen_id)
 Find the display device that is attached to a given screen.
 
void disp_dev_map (const disp_dev_t *dev, const disp_dev_area_t *area, const uint16_t *color)
 Map an area to display on the device.
 
uint16_t disp_dev_height (const disp_dev_t *dev)
 Get the height of the display device.
 
uint16_t disp_dev_width (const disp_dev_t *dev)
 Get the width of the display device.
 
uint8_t disp_dev_color_depth (const disp_dev_t *dev)
 Get the color depth of the display device.
 
void disp_dev_set_invert (const disp_dev_t *dev, bool invert)
 Invert the display device colors.
 
static void disp_dev_backlight_on (void)
 Enable the backlight pin.
 
static void disp_dev_backlight_off (void)
 Disable the backlight pin.
 

Variables

disp_dev_reg_tdisp_dev_reg
 Export the display device registry as global variable.
 

Macro Definition Documentation

◆ BACKLIGHT_OFF

#define BACKLIGHT_OFF

Definition at line 37 of file disp_dev.h.

◆ BACKLIGHT_ON

#define BACKLIGHT_ON

Definition at line 33 of file disp_dev.h.

Typedef Documentation

◆ disp_dev_t

typedef struct disp_dev disp_dev_t

Forward declaration for display device struct.

Definition at line 43 of file disp_dev.h.

Function Documentation

◆ disp_dev_backlight_off()

static void disp_dev_backlight_off ( void  )
inlinestatic

Disable the backlight pin.

Definition at line 200 of file disp_dev.h.

◆ disp_dev_backlight_on()

static void disp_dev_backlight_on ( void  )
inlinestatic

Enable the backlight pin.

Definition at line 192 of file disp_dev.h.

◆ disp_dev_color_depth()

uint8_t disp_dev_color_depth ( const disp_dev_t dev)

Get the color depth of the display device.

Returns
The color depth

◆ disp_dev_height()

uint16_t disp_dev_height ( const disp_dev_t dev)

Get the height of the display device.

Parameters
[in]devPointer to the display device
Returns
Height in pixels

◆ disp_dev_map()

void disp_dev_map ( const disp_dev_t dev,
const disp_dev_area_t area,
const uint16_t *  color 
)

Map an area to display on the device.

Parameters
[in]devPointer to the display device
[in]areaCoordinates of display area
[in]colorArray of color to map to the display

◆ disp_dev_reg_add()

int disp_dev_reg_add ( disp_dev_reg_t dev)

Add pointer to a display device item to the list of display items.

Parameters
[in]devPointer to the display device
Returns
0 on success
-ENODEV on invalid entry

◆ disp_dev_reg_find_screen()

disp_dev_reg_t * disp_dev_reg_find_screen ( uint8_t  screen_id)

Find the display device that is attached to a given screen.

Parameters
[in]screen_idIdentifier (number) of the screen
Returns
pointer to the display device in the registry
NULL if there's no match

◆ disp_dev_set_invert()

void disp_dev_set_invert ( const disp_dev_t dev,
bool  invert 
)

Invert the display device colors.

Parameters
[in]devPointer to the display device
[in]invertInvert mode (true if invert, false otherwise)

◆ disp_dev_width()

uint16_t disp_dev_width ( const disp_dev_t dev)

Get the width of the display device.

Parameters
[in]devPointer to the display device
Returns
Width in pixels