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_driver_t
 Generic type for a display driver. More...
 
struct  disp_dev
 Generic type for a display device. More...
 

Typedefs

typedef struct disp_dev disp_dev_t
 Forward declaration for display device struct.
 

Functions

void disp_dev_map (const disp_dev_t *dev, uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2, const uint16_t *color)
 Map an area to display on the device. More...
 
uint16_t disp_dev_height (const disp_dev_t *dev)
 Get the height of the display device. More...
 
uint16_t disp_dev_width (const disp_dev_t *dev)
 Get the width of the display device. More...
 
uint8_t disp_dev_color_depth (const disp_dev_t *dev)
 Get the color depth of the display device. More...
 
void disp_dev_set_invert (const disp_dev_t *dev, bool invert)
 Invert the display device colors. More...
 
static void disp_dev_backlight_on (void)
 Enable the backlight pin.
 
static void disp_dev_backlight_off (void)
 Disable the backlight pin.
 

Function Documentation

◆ 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,
uint16_t  x1,
uint16_t  x2,
uint16_t  y1,
uint16_t  y2,
const uint16_t *  color 
)

Map an area to display on the device.

Parameters
[in]devPointer to the display device
[in]x1Left coordinate
[in]x2Right coordinate
[in]y1Top coordinate
[in]y2Bottom coordinate
[in]colorArray of color to map to the display

◆ 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