glcd_common

glcd_common - generic routines for graphic lcd

Author Stef Mientki, Serkan Ayyıldız Copyright (c) 2006..2009, all rights reserved.
Adapted-by Joep Suijs, Matthew Schinkel
Compiler >=2.2

Description

Generic routines for graphic lcd
glcd_box
glcd_line



Defines a common API, a common interface, where several parameters and procedures remains
device specific and should be implemented in device library. Once interface is implemented,
many features come for "free". This common API is defined in glcd_common.jal and glcd_font.jal



In order to honor this common interface, and benefit its features, the following must be implemented
in device specific library:
  * GLCD_X_PIXELS: (const) specifies display's width, in pixels
  * GLCD_Y_SIZE: (const) specifies display's height, in pixels
  * GLCD_COLOR_BITS: (const) specifies the number of bits required
    for colors (1 for black & white), (16 for 16 bit color)
  * glcd_pen_color: (var|const) specifies color of the pen
  * glcd_background_color: (var|const) specifies the background color
  * glcd_write_char(x,y,char): (proc) draw "char" at position (x,y). If no
    glcd_write_char is defined in the device specific library, pixel by
    pixel method will be used by default for glcd_font.jal.
  * glcd_write_pixel(x,y): (proc) assuming pen and background color previously set, draw
    a pixel at position (x,y) using defined colors. This is the main procedure used by pixel-related
    features, like drawing a line, circle, etc... In some cases, where glcd_write_char() can't be used
    glcd_write_pixel() can also be used to draw chars. If not implemented, pixel-related features won't
    be available.


Dependencies


Summary

Global variables/contants

Procedures

Functions


API details

Global variables/contants

Procedures

Functions


Related samples

Here are the list of samples which use this library:

16f87716f877_glcd_ks0108.jal
16f877a16f877a_glcd_ks0108.jal
18f455018f4550_glcd_ks0108.jal
18f462018f4620_glcd_touch_stm032qvt_003.jal