Graphic Display v1.0.0
Control any mochrome display, with any microcontroller, in any amount.
Loading...
Searching...
No Matches
gd_driver_t Struct Reference

Struct that creates a driver for the display, holding the handle and functions that are private of the display driver. This allows the library to be very flexible and can handles any display. More...

#include <GraphicDisplay.h>

Data Fields

void * pHandle
 Handle of the display. The variable that holds all data of device.
 
uint8_t(* fxnSetPixelColor )(void *handle, uint32_t x, uint32_t y, uint8_t color)
 Sets a value of a pixel on a gived position on the Frame Buffer. Please, do not directly write on display, just write on a buffer.
 
uint8_t(* fxnFillFrameBuffer )(void *handle, uint8_t color)
 Fills the Frame Buffer of the display device with a provided color.
 
uint8_t(* fxnRefreshDisp )(void *handle)
 Refresh the display with the internal Frame Buffer. This method, improves the performance of the display driver and Graphic Display lib.
 
uint8_t(* fxnSetOn )(void *handle, bool on)
 Turns the display on or off.
 
uint8_t(* fxnSetContrast )(void *handle, uint8_t value)
 Set the contrast of the display, the internal value must be treated with: 0 to minimal contrast. 100 to maximum contrast.
 

Detailed Description

Struct that creates a driver for the display, holding the handle and functions that are private of the display driver. This allows the library to be very flexible and can handles any display.

Field Documentation

◆ fxnFillFrameBuffer

uint8_t(* gd_driver_t::fxnFillFrameBuffer) (void *handle, uint8_t color)

Fills the Frame Buffer of the display device with a provided color.

Note
This function is MANDATORY!
Parameters
handlePointer to handle of the device
colorValue to write on pixel, 0 to black, 1 to white.
Returns
0 to SUCCESS, otherwise on failed.

◆ fxnRefreshDisp

uint8_t(* gd_driver_t::fxnRefreshDisp) (void *handle)

Refresh the display with the internal Frame Buffer. This method, improves the performance of the display driver and Graphic Display lib.

Note
This function is MANDATORY!
Parameters
handlePointer to handle of the device.
Returns
0 to SUCCESS, otherwise if failed.

◆ fxnSetContrast

uint8_t(* gd_driver_t::fxnSetContrast) (void *handle, uint8_t value)

Set the contrast of the display, the internal value must be treated with: 0 to minimal contrast. 100 to maximum contrast.

Note
This function is optional.
Parameters
handlePointer to handle of the display device.
valueValue from 0 to 100 to sets the contrast.
Returns
0 to SUCCESS, otherwise if failed.

◆ fxnSetOn

uint8_t(* gd_driver_t::fxnSetOn) (void *handle, bool on)

Turns the display on or off.

Note
This function is optional.
Parameters
handlePointer to handle of the device.
ontrue to turn on display, false to turn off.
Returns
0 to SUCCESS, otherwise if failed.

◆ fxnSetPixelColor

uint8_t(* gd_driver_t::fxnSetPixelColor) (void *handle, uint32_t x, uint32_t y, uint8_t color)

Sets a value of a pixel on a gived position on the Frame Buffer. Please, do not directly write on display, just write on a buffer.

Note
This function is MANDATORY!
Parameters
handlePointer to handle of the device
xPosition in X-axis
yPosition on Y-axis
colorValue to write on pixel, 0 to black, 1 to white.
Returns
0 to SUCCESS, otherwise on failed.

◆ pHandle

void* gd_driver_t::pHandle

Handle of the display. The variable that holds all data of device.


The documentation for this struct was generated from the following file: