Text Mode Module
[General Graphic Module]

Collaboration diagram for Text Mode Module:


Enumerations

enum  lcdgraph_font_e { FONT_4x5, FONT_5x7, FONT_9x14, FONT_10x14 }
 Font size. More...
enum  lcdgraph_fontmode_e { LCDGRAPH_FONTMODE_NORMAL, LCDGRAPH_FONTMODE_OR, LCDGRAPH_FONTMODE_XOR, LCDGRAPH_FONTMODE_INVERSE }
 Write characters mode. More...

Functions

lcdgraph_result_e LCDGRAPH_TextGotoXY (unsigned char x, unsigned char y)
 Move cursor.
lcdgraph_result_e LCDGRAPH_TextWrite (char *string)
 Write text.
lcdgraph_result_e LCDGRAPH_TextWriteChar (char data)
 Write single character.
lcdgraph_result_e LCDGRAPH_TextWriteXY (unsigned char x, unsigned char y, char *string)
 Write string at (x, y).

Enumeration Type Documentation

enum lcdgraph_font_e

Font size.

Select font size for Graphic Text Module functions

Enumerator:
FONT_4x5  4x5 font
FONT_5x7  5x7 font
FONT_9x14  9x14 font
FONT_10x14  10x14 font

enum lcdgraph_fontmode_e

Write characters mode.

Set mode of writing characters

Enumerator:
LCDGRAPH_FONTMODE_NORMAL  Set pixels for character body and clear for background
LCDGRAPH_FONTMODE_OR  Logic sum character pixels and background
LCDGRAPH_FONTMODE_XOR  Xor character pixels and bacground
LCDGRAPH_FONTMODE_INVERSE  Clear pixels for character body and set for background


Function Documentation

lcdgraph_result_e LCDGRAPH_TextGotoXY ( unsigned char  x,
unsigned char  y 
)

Move cursor.

Author:
Mariusz Murawski
Move cursor to position (x, y). x and y are not pixel positions but 6x8 text position. The whole screen is divided into 8 pixels height lines and 6 pixels width columns. During LCDGRAPH_Clear, the cursor is set to (0, 0)

Parameters:
x column
y row
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_NOT_SUPPORTED if wrong LCD was selected
LCDGRAPH_FAIL if something went wrong with operation

lcdgraph_result_e LCDGRAPH_TextWrite ( char *  string  ) 

Write text.

Author:
Mariusz Murawski
Writes ram string starting at current position of the cursor

Parameters:
string pointer to ram string that will be displayed
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_NOT_SUPPORTED if wrong LCD was selected
LCDGRAPH_PARAM_FAIL if pointer to a string is a NULL value
LCDGRAPH_FAIL if something went wrong woth operation

lcdgraph_result_e LCDGRAPH_TextWriteChar ( char  data  ) 

Write single character.

Author:
Mariusz Murawski
Write single character at position of the cursor

Parameters:
data character to be displayed
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_NOT_SUPPORTED if wrong LCD type was selected
LCDGRAPH_FAIL if something went wrong during operation

lcdgraph_result_e LCDGRAPH_TextWriteXY ( unsigned char  x,
unsigned char  y,
char *  string 
)

Write string at (x, y).

Author:
Mariusz Murawski
Set cursor to (x, y) and write ram string

Parameters:
x column
y row
string pointer to ram string that will be displayed
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_NOT_SUPPORTED if wrong LCD type was selected
LCDGRAPH_OUT_OF_SCREEN if given coordinates refer to area outside of the screen
LCDGRAPH_PARAM_FAIL if pointer to a string is a NULL value
LCDGRAPH_FAIL if something went wrong with operation

SourceForge.net Logo