GLCD Library
A C Library for Embedded Applications
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
Tiny Text

Functions relating to using tiny 5x7 text fonts. More...

Macros

#define GLCD_TEXT_INIT()   glcd_tiny_set_font(Font5x7,5,7,32,127);
 Initialise 5x7 text. More...
 
#define GLCD_WRITE(str)   glcd_tiny_draw_string_ammend(str)
 Write string to bottom-most line after scrolling everything else up. More...
 
#define GLCD_WRITE_P(str)   glcd_tiny_draw_string_ammend_P(str)
 Write string from program memory to bottom-most line after scrolling everything else up. More...
 

Functions

void glcd_tiny_draw_char (uint8_t x, uint8_t line, char c)
 Write character to LCD in tiny 5x7 font. More...
 
void glcd_tiny_draw_char_xy (uint8_t x, uint8_t y, char c)
 Write character to LCD in tiny 5x7 font to specified X, Y location. More...
 
void glcd_tiny_draw_string (uint8_t x, uint8_t line, char *str)
 Write string to display buffer in tiny 5x7 font. More...
 
void glcd_tiny_draw_string_ammend (char *str)
 Write string to bottom row of display. More...
 
void glcd_tiny_draw_string_ammend_P (const char *str)
 Write string from flash memory to bottom row of display. More...
 
void glcd_tiny_draw_string_P (uint8_t x, uint8_t line, const char *str)
 Write flash string to display buffer in tiny 5x7 font. More...
 
void glcd_tiny_invert_line (uint8_t line)
 Invert all contents of line number. More...
 
void glcd_tiny_set_font (const char *font_table, uint8_t width, uint8_t height, char start_char, char end_char)
 Set font to be used from now on. More...
 

Detailed Description

Functions relating to using tiny 5x7 text fonts.

Tiny text functions are usually used on a line by line basis. Each line being 8 bits high. Characters start on the top most bit and are 7 bits high, leaving a one bit space underneath.

Macro Definition Documentation

#define GLCD_TEXT_INIT ( )    glcd_tiny_set_font(Font5x7,5,7,32,127);

Initialise 5x7 text.

Definition at line 126 of file glcd_text_tiny.h.

Referenced by glcd_test_tiny_text().

#define GLCD_WRITE (   str)    glcd_tiny_draw_string_ammend(str)

Write string to bottom-most line after scrolling everything else up.

Definition at line 129 of file glcd_text_tiny.h.

Referenced by glcd_test_tiny_text().

#define GLCD_WRITE_P (   str)    glcd_tiny_draw_string_ammend_P(str)

Write string from program memory to bottom-most line after scrolling everything else up.

Definition at line 132 of file glcd_text_tiny.h.

Function Documentation

void glcd_tiny_draw_char ( uint8_t  x,
uint8_t  line,
char  c 
)

Write character to LCD in tiny 5x7 font.

Parameters
xcolumn position to start
lineline number to be written (each line is 8 pixels high)
cchar to be written

Definition at line 51 of file text_tiny.c.

Referenced by glcd_tiny_draw_string(), and glcd_tiny_draw_string_P().

void glcd_tiny_draw_char_xy ( uint8_t  x,
uint8_t  y,
char  c 
)

Write character to LCD in tiny 5x7 font to specified X, Y location.

If position is aligned with 8 bit line heights, use glcd_tiny_draw_char() instead as it will be faster.

Parameters
xcolumn position to start
yrow position to start (pixel based, not 8 bit high rows)
cchar to be written
See Also
glcd_tiny_draw_char()
Note
This does the same thing as glcd_tiny_draw_char_xy() but is limited to Stang format font tables.

Definition at line 145 of file text_tiny.c.

void glcd_tiny_draw_string ( uint8_t  x,
uint8_t  line,
char *  str 
)

Write string to display buffer in tiny 5x7 font.

Will wrap to next line if needed. Screen is not updated. Use glcd_write() to physically update display.

Parameters
xcolumn position to start
lineline number to be written (each line is 8 pixels high)
strstring to be written

Definition at line 81 of file text_tiny.c.

Referenced by glcd_test_hello_world(), glcd_test_rectangles(), and glcd_tiny_draw_string_ammend().

void glcd_tiny_draw_string_ammend ( char *  str)

Write string to bottom row of display.

Screen buffer is scrolled up by one line. Screen is then physically updated.

Parameters
strstring to be written

Definition at line 128 of file text_tiny.c.

void glcd_tiny_draw_string_ammend_P ( const char *  str)

Write string from flash memory to bottom row of display.

Screen buffer is scrolled up by one line. Screen is then physically updated.

Parameters
strstring to be written

Definition at line 134 of file text_tiny.c.

void glcd_tiny_draw_string_P ( uint8_t  x,
uint8_t  line,
const char *  str 
)

Write flash string to display buffer in tiny 5x7 font.

Will wrap to next line if needed. Screen is not updated. Use glcd_write() to physically update display.

Parameters
xcolumn position to start
lineline to be written (each line is 8 pixels high)
strstring stored in flash memory to be written

Definition at line 101 of file text_tiny.c.

Referenced by glcd_tiny_draw_string_ammend_P().

void glcd_tiny_invert_line ( uint8_t  line)

Invert all contents of line number.

Line 0 is the top most line.

Parameters
lineLine number (0 is top most line)

Definition at line 140 of file text_tiny.c.

void glcd_tiny_set_font ( const char *  font_table,
uint8_t  width,
uint8_t  height,
char  start_char,
char  end_char 
)

Set font to be used from now on.

This is the tiny 5x7 monospace font.

Parameters
font_tableflash pointer to start from font table
widthwidth of each character
heightheight of each character
start_charstart character
end_charend character
Note
Only suitable for Stang font storage format. For MikroElektronika format, use glcd_set_font()
See Also
glcd_set_font()

Definition at line 40 of file text_tiny.c.

Referenced by glcd_test_hello_world(), and glcd_test_rectangles().