Collaboration diagram for General Graphic Module:
![]() |
Modules | |
Graphic Text Module | |
Text Mode Module | |
LCD parameters | |
#define | LCDGRAPH_INVERSE 0x01 |
Enumerations | |
enum | lcdgraph_type_e { LCDGRAPH_DOGM128_6 } |
LCD type. More... | |
enum | lcdgraph_result_e { LCDGRAPH_OK = 0, LCDGRAPH_TRANSMIT_FAIL, LCDGRAPH_PARAM_FAIL, LCDGRAPH_MEMORY_FAIL, LCDGRAPH_NOT_FOUND, LCDGRAPH_NOT_SUPPORTED, LCDGRAPH_OUT_OF_SCREEN, LCDGRAPH_FAIL } |
Result. More... | |
enum | lcdgraph_fill_e { LCDGRAPH_FILL_NONE, LCDGRAPH_FILL_CLEAR, LCDGRAPH_FILL_SOLID, LCDGRAPH_FILL_HASH, LCDGRAPH_FILL_DOTS, LCDGRAPH_FILL_HORIZONTAL, LCDGRAPH_FILL_VERTICAL, LCDGRAPH_FILL_XOR } |
Fill mode. More... | |
Functions | |
lcdgraph_result_e | LCDGRAPH_Init (lcdgraph_type_e lcd_type, unsigned int lcd_mode) |
Initialization function. | |
void | LCDGRAPH_GetVersion (unsigned char *major, unsigned char *minor) |
Function to get library version. | |
lcdgraph_result_e | LCDGRAPH_Clear (void) |
Clear screen. | |
lcdgraph_result_e | LCDGRAPH_DrawLine (unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) |
Draws line. | |
lcdgraph_result_e | LCDGRAPH_DrawRectangle (unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned char frame_width, lcdgraph_fill_e fill) |
Draws rectangle. | |
lcdgraph_result_e | LCDGRAPH_GetMaxXY (unsigned int *max_x, unsigned int *max_y) |
Returns size of LCD display. | |
lcdgraph_result_e | LCDGRAPH_SetBoundary (unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) |
Set boundary. | |
lcdgraph_result_e | LCDGRAPH_SetPixel (unsigned int x, unsigned int y, unsigned char new_state) |
Set or clear single pixel. |
#define LCDGRAPH_INVERSE 0x01 |
Set LCD display to inverse mode which means that all active pixels will be cleared and all inactive ones will be set
enum lcdgraph_fill_e |
Fill mode.
Fill mode used to fill areas
enum lcdgraph_result_e |
Result.
Code of return describing type of error occured
enum lcdgraph_type_e |
lcdgraph_result_e LCDGRAPH_Clear | ( | void | ) |
Clear screen.
Clears LCD's screen. If inverse mode is selected then all pixels will be displayed
LCDGRAPH_OK | if all is ok | |
LCDGRAPH_NOT_SUPPORTED | if wrong LCD type was selected | |
LCDGRAPH_FAIL | if something went wrong with operation |
lcdgraph_result_e LCDGRAPH_DrawLine | ( | unsigned int | x1, | |
unsigned int | y1, | |||
unsigned int | x2, | |||
unsigned int | y2 | |||
) |
Draws line.
Draws line from point (x1, y1) to (x2, y2)
x1 | coordinates of top left end | |
y1 | coordinates of top left end | |
x2 | coordinates of bottom right end | |
y2 | coordinates of bottom right end |
LCDGRAPH_OK | if all is ok | |
LCDGRAPH_NOT_SUPPORTED | if wrong LCD type was selected | |
LCDGRAPH_OUT_OF_SCREEN | if any coordinate refers to area outside of a screen | |
LCDGRAPH_FAIL | if something went wrong with operation |
lcdgraph_result_e LCDGRAPH_DrawRectangle | ( | unsigned int | x1, | |
unsigned int | y1, | |||
unsigned int | x2, | |||
unsigned int | y2, | |||
unsigned char | frame_width, | |||
lcdgraph_fill_e | fill | |||
) |
Draws rectangle.
Draws rectangle with given frame width and fill type
x1 | coordinates of top left corner | |
y1 | coordinates of top left corner | |
x2 | coordinates of bottom right corner | |
y2 | coordinates of bottom right corner | |
frame_width | width of rectangle's frame | |
fill | type of fill |
LCDGRAPH_OK | if all is ok | |
LCDGRAPH_NOT_SUPPORTED | if wrong lcd type was selected | |
LCDGRAPH_FAIL | if something went wrong with operation | |
LCDGRAPH_OUT_OF_SCREEN | if any coordinate refers to area outside of a screen |
lcdgraph_result_e LCDGRAPH_GetMaxXY | ( | unsigned int * | max_x, | |
unsigned int * | max_y | |||
) |
Returns size of LCD display.
Returns maximum pixels in x and y axises
[out] | max_x | pointer to variable that will be loaded with maximum number of pixels in x. Pass NULL if this value is out of interest |
[out] | max_y | pointer to variable that will be loaded with maximum number of pixels in y. Pass NULL if this value is out of interest |
LCDGRAPH_OK | if all is ok |
void LCDGRAPH_GetVersion | ( | unsigned char * | major, | |
unsigned char * | minor | |||
) |
Function to get library version.
Returns library version number. For example, major=1, minor=0 -> version = 1.0
[out] | major | Major number |
[out] | minor | Minor number |
lcdgraph_result_e LCDGRAPH_Init | ( | lcdgraph_type_e | lcd_type, | |
unsigned int | lcd_mode | |||
) |
Initialization function.
Performs initialization of specific LCD driver.
lcd_type | Type of LCD to use | |
lcd_mode | Mode of operation. Logic sum of defines: LCDGRAPH_INVERSE |
LCDGRAPH_OK | if initialization was ok | |
LCDGRAPH_NOT_SUPPORTED | if required lcd_type is not supported. The library must have been built without demanded lcd_type flag switched on | |
LCDGRAPH_FAIL | if there were error during internal driver initialization |
lcdgraph_result_e LCDGRAPH_SetBoundary | ( | unsigned int | x1, | |
unsigned int | y1, | |||
unsigned int | x2, | |||
unsigned int | y2 | |||
) |
Set boundary.
Set boundary. Nothing will be displayed outside rectangle (x1, y1)(x2, y2)
x1 | ||
y1 | ||
x2 | ||
y2 |
LCDGRAPH_OK | if all is ok | |
LCDGRAPH_NOT_SUPPORTED | if wrong LCD type was selected | |
LCDGRAPH_FAIL | if something went wrong with operation | |
LCDGRAPH_OUT_OF_SCREEN | if any coordinate refers to area outside of a screen |
lcdgraph_result_e LCDGRAPH_SetPixel | ( | unsigned int | x, | |
unsigned int | y, | |||
unsigned char | new_state | |||
) |
Set or clear single pixel.
Change state of single pixel at (x, y)
x | coordinates | |
y | coordinates | |
new_state |
|
LCDGRAPH_OK | if all is ok | |
LCDGRAPH_NOT_SUPPORTED | if wrong LCD type was selected | |
LCDGRAPH_OUT_OF_SCREEN | if coordinates refer to area outside of a screen | |
LCDGRAPH_FAIL | if something went wrong with operation |