GLCD Library
A C Library for Embedded Applications
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
glcd_text_tiny.h
Go to the documentation of this file.
1 
7 /*
8  Copyright (c) 2012, Andy Gock
9 
10  All rights reserved.
11 
12  Redistribution and use in source and binary forms, with or without
13  modification, are permitted provided that the following conditions are met:
14  * Redistributions of source code must retain the above copyright
15  notice, this list of conditions and the following disclaimer.
16  * Redistributions in binary form must reproduce the above copyright
17  notice, this list of conditions and the following disclaimer in the
18  documentation and/or other materials provided with the distribution.
19  * Neither the name of Andy Gock nor the
20  names of its contributors may be used to endorse or promote products
21  derived from this software without specific prior written permission.
22 
23  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  DISCLAIMED. IN NO EVENT SHALL ANDY GOCK BE LIABLE FOR ANY
27  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34 
35 #ifndef GLCD_TEXT_TINY_H
36 #define GLCD_TEXT_TINY_H
37 
57 #if defined(GLCD_DEVICE_AVR8)
58 void glcd_tiny_set_font(PGM_P font_table, uint8_t width, uint8_t height, char start_char, char end_char);
59 #else
60 void glcd_tiny_set_font(const char *font_table, uint8_t width, uint8_t height, char start_char, char end_char);
61 #endif
62 
68 void glcd_tiny_draw_char(uint8_t x, uint8_t line, char c);
69 
76 void glcd_tiny_draw_string(uint8_t x, uint8_t line, char *str);
77 
84 #if defined(GLCD_DEVICE_AVR8)
85 void glcd_tiny_draw_string_P(uint8_t x, uint8_t line, PGM_P str);
86 #else
87 void glcd_tiny_draw_string_P(uint8_t x, uint8_t line, const char *str);
88 #endif
89 
94 void glcd_tiny_draw_string_ammend(char *str);
95 
100 #if defined(GLCD_DEVICE_AVR8)
101 void glcd_tiny_draw_string_ammend_P(PGM_P str);
102 #else
103 void glcd_tiny_draw_string_ammend_P(const char *str);
104 #endif
105 
110 void glcd_tiny_invert_line(uint8_t line);
111 
123 void glcd_tiny_draw_char_xy(uint8_t x, uint8_t y, char c);
124 
126 #define GLCD_TEXT_INIT() glcd_tiny_set_font(Font5x7,5,7,32,127);
127 
129 #define GLCD_WRITE(str) glcd_tiny_draw_string_ammend(str)
130 
132 #define GLCD_WRITE_P(str) glcd_tiny_draw_string_ammend_P(str)
133 
136 #endif
void glcd_tiny_invert_line(uint8_t line)
Invert all contents of line number.
Definition: text_tiny.c:140
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.
Definition: text_tiny.c:101
void glcd_tiny_draw_string_ammend(char *str)
Write string to bottom row of display.
Definition: text_tiny.c:128
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.
Definition: text_tiny.c:145
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.
Definition: text_tiny.c:40
void glcd_tiny_draw_string_ammend_P(const char *str)
Write string from flash memory to bottom row of display.
Definition: text_tiny.c:134
void glcd_tiny_draw_char(uint8_t x, uint8_t line, char c)
Write character to LCD in tiny 5x7 font.
Definition: text_tiny.c:51
void glcd_tiny_draw_string(uint8_t x, uint8_t line, char *str)
Write string to display buffer in tiny 5x7 font.
Definition: text_tiny.c:81