Low level device functions. More...
Protected Member Functions | |
void | GotoXY (uint8_t x, uint8_t y) |
int | Init (uint8_t invert=false) |
uint8_t | ReadData (void) |
void | SetDot (uint8_t x, uint8_t y, uint8_t color) |
void | SetPixels (uint8_t x, uint8_t y, uint8_t x1, uint8_t y1, uint8_t color) |
void | WriteData (uint8_t data) |
Static Protected Attributes | |
static lcdCoord | Coord |
static uint8_t | Inverted |
Low level device functions.
void GotoXY | ( | uint8_t | x, |
uint8_t | y | ||
) | [protected] |
set current x,y coordinate on display device
x | X coordinate |
y | Y coordinate |
Sets the current pixel location to x,y. x and y are relative to the 0,0 origin of the display which is the upper left most pixel on the display.
Reimplemented in glcd.
int Init | ( | uint8_t | invert = false | ) | [protected] |
Low level h/w initialization of display and AVR pins
invert | specifices whether display is in normal mode or inverted mode. |
This should only be called by other library code.
It does all the low level hardware initalization of the display device.
The optional invert parameter specifies if the display should be run in a normal mode, dark pixels on light background or inverted, light pixels on a dark background.
To specify dark pixels use the define NON-INVERTED and to use light pixels use the define INVERTED
Upon successful completion of the initialization, the entire display will be cleared and the x,y postion will be set to 0,0
Reimplemented in glcd.
uint8_t ReadData | ( | void | ) | [inline, protected] |
read a data byte from display device memory
Reimplemented in glcd.
void SetDot | ( | uint8_t | x, |
uint8_t | y, | ||
uint8_t | color | ||
) | [protected] |
set pixel at x,y to the given color
x | X coordinate, a value from 0 to GLCD.Width-1 |
y | Y coordinate, a value from 0 to GLCD.Heigh-1 |
color | WHITE or BLACK |
Sets the pixel at location x,y to the specified color. x and y are relative to the 0,0 origin of the display which is the upper left corner. Requests to set pixels outside the range of the display will be ignored.
Reimplemented in glcd.
void SetPixels | ( | uint8_t | x, |
uint8_t | y, | ||
uint8_t | x2, | ||
uint8_t | y2, | ||
uint8_t | color | ||
) | [protected] |
set an area of pixels
x | X coordinate of upper left corner |
y | Y coordinate of upper left corner |
x2 | X coordinate of lower right corner |
y2 | Y coordinate of lower right corner |
color | sets the pixels an area bounded by x,y to x2,y2 inclusive to the specified color. |
The width of the area is x2-x + 1. The height of the area is y2-y+1
Reimplemented in glcd.
void WriteData | ( | uint8_t | data | ) | [protected] |
Write a byte to display device memory
data | date byte to write to memory |
The data specified is written to glcd memory at the current x,y position. If the y location is not on a byte boundary, the write is fragemented up into multiple writes.
Reimplemented in glcd.