Management and Control API


#define GDM_DISPLAY_ON   0x01
#define GDM_DISPLAY_OFF   0x00
#define GDM_BACKLIGHT_ON   0x02
#define GDM_BACKLIGHT_OFF   0x00


void gdm_initialize (gdm_display *dp)
void gdm_set_mode (gdm_display *dp, int mode)
void gdm_set_gc (gdm_display *dp, enum gdm_gc_mode mode)
int gdm_refresh (gdm_display *dp)
void gdm_touch (gdm_display *dp, short x, short y, unsigned short width, unsigned short height)

Detailed Description

The graphic display management API is used to control the behavior of the graphic display and of the drawing operations.

The gdm_initialize is used to initialize the display manager data structure. It must be called first to setup correctly the gdm_display data structure and initialize the hardware.

The gdm_set_gc is used to control the graphical context used when drawing on the bitmap.

The gdm_refresh and gdm_touch are used to synchronize the display manager bitmap with the LCD screen.

Define Documentation

#define GDM_BACKLIGHT_OFF   0x00

Turn off the backlight LED.

Definition at line 265 of file display.h.

#define GDM_BACKLIGHT_ON   0x02

Turn on the backlight LED.

Definition at line 262 of file display.h.

#define GDM_DISPLAY_OFF   0x00

Turn off the display.

Definition at line 259 of file display.h.

#define GDM_DISPLAY_ON   0x01

Turn on the display.

Definition at line 256 of file display.h.

Referenced by _gdm_hw_set_mode().

Function Documentation

void gdm_initialize gdm_display   dp

Initialize the graphic display manager.

The graphic display manager must be initialized to setup the initial image and internal data structures used to represent the display. The graphical context is set to the GDM_PLOT_OR mode. The LCD hardware is turned on.

dp  Display manager data
See also:
gdm_refresh, gdm_set_gc, gdm_set_mode, gdm_touch

int gdm_refresh gdm_display   dp

Refresh the graphic display.

Update the graphic display by synchronizing the data image that we keep track in dp and sending the appropriate commands to the LCD controller. The data image is scanned row by row and only the row parts that have changed are synchronized. This ensures a minimal interaction to the LCD controller and thus speed up the drawing and refresh process.

dp  Display Manager.
See also:

void gdm_set_gc gdm_display   dp,
enum gdm_gc_mode    mode

Set the mode of graphic operations.

The mode controls the logical operation used to perform the drawing operations.

dp  Display Manager
mode  Logical operation to use

void gdm_set_mode gdm_display   dp,
int    mode

Control various modes of graphic display manager and LCD hardware.

This operation allows to control the operating mode of the manager and of the hardware. The mode is composed of flags:

can be passed to turn ON the display

can be used to switch OFF the display

can be used to enable the backlight LED.
dp  Display Manager
mode  Control flags

void gdm_touch gdm_display   dp,
short    x,
short    y,
unsigned short    width,
unsigned short    height

Touch the graphic display to force a synchronization of the region.

The graphic region specified by x, y, width, height is touched to force a synchronization refresh with the LCD display. The region is clipped to the size of the display. Touching a region has an effect on the behavior of gdm_refresh. When refreshing occurs, only the touched regions are really updated on the LCD display. The drawing operations take care of touching the minimal region that affect the drawing, hence optimizing any refresh.

dp  Display Manager
x  X corner
y  Y corner
width  Width of region
height  Height of region
See also: