16FXlib
lcd.h
Go to the documentation of this file.
1 
2 //*****************************************************************************
3 // Author : Christian Illy
4 // Created : 09.04.2009
5 // Revised : 06.06.2009
6 // Version : 0.1
7 // Target MCU : Fujitsu MB96300 series
8 //
9 // This program is free software: you can redistribute it and/or modify
10 // it under the terms of the GNU General Public License as published by
11 // the Free Software Foundation, either version 3 of the License, or
12 // (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 //
27 //*****************************************************************************
29 #ifndef LCD_H_
30 #define LCD_H_
31 
32 #include "inttypes.h"
33 #include "lcd.cfg.h"
34 
35 #define LCD_COLOR_BLACK (1)
36 #define LCD_COLOR_WHITE (0)
37 
38 #define LCD_ALIGNMENT_LEFT (0)
39 #define LCD_ALIGNMENT_CENTER (1)
40 #define LCD_ALIGNMENT_RIGHT (2)
41 
42 #define LCD_ALIGNMENT_TOP (0)
43 #define LCD_ALIGNMENT_MIDDLE (4)
44 #define LCD_ALIGNMENT_BOTTOM (8)
45 
46 #define LCD_ORIENTATION_0 (0)
47 #define LCD_ORIENTATION_90 (16)
48 #define LCD_ORIENTATION_180 (32)
49 #define LCD_ORIENTATION_270 (64)
50 
54 extern void lcd_init(void);
55 
60 extern void lcd_clear(uint8_t color);
61 
68 extern void lcd_drawPage(uint8_t x, uint8_t page, uint8_t data);
69 
76 extern int8_t lcd_getPixel(int16_t x, int16_t y);
77 
84 extern void lcd_drawPixel(int16_t x, int16_t y, uint8_t color);
85 
94 extern void lcd_drawCircle(int16_t x, int16_t y, uint8_t r, uint8_t color, uint8_t filled);
95 
105 extern void lcd_drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint8_t color, uint8_t filled);
106 
115 extern void lcd_drawLine(int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t color);
116 
127 extern uint8_t lcd_drawCharacter(uint8_t x, uint8_t page, char ascii, uint8_t color, uint8_t overlay);
128 
143 extern uint8_t lcd_drawString(uint8_t x1, uint8_t page1, uint8_t x2, uint8_t page2, uint8_t wrap,
144  uint16_t delay, char* firstChar, uint8_t color, uint8_t overlay);
145 
156 extern int16_t lcd_drawCharacterPrecise(int16_t x, int16_t y, char ascii, uint8_t color, uint8_t orientation, uint8_t font);
157 
168 extern int16_t lcd_drawStringPrecise(int16_t x, int16_t y, char* firstChar, uint8_t color, uint8_t settings, uint8_t font);
169 
173 extern void lcd_flush(void);
174 
180 
184 #define LCD_WIDTH 128
185 
188 #define LCD_HEIGHT 64
189 
190 
191 #endif /* LCD_H_ */
192 
unsigned int uint16_t
Definition: inttypes.h:50
void lcd_drawLine(int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t color)
Definition: lcd.c:310
unsigned char uint8_t
Definition: inttypes.h:35
char int8_t
Definition: inttypes.h:45
int int16_t
Definition: inttypes.h:55
int16_t lcd_drawCharacterPrecise(int16_t x, int16_t y, char ascii, uint8_t color, uint8_t orientation, uint8_t font)
Definition: lcd.c:462
void lcd_init(void)
Definition: lcd.c:109
int16_t lcd_drawStringPrecise(int16_t x, int16_t y, char *firstChar, uint8_t color, uint8_t settings, uint8_t font)
Definition: lcd.c:522
uint8_t lcd_drawCharacter(uint8_t x, uint8_t page, char ascii, uint8_t color, uint8_t overlay)
Definition: lcd.c:380
void lcd_flush(void)
Definition: lcd.c:603
void lcd_drawPage(uint8_t x, uint8_t page, uint8_t data)
Definition: lcd.c:140
void lcd_drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint8_t color, uint8_t filled)
Definition: lcd.c:244
int8_t lcd_getPixel(int16_t x, int16_t y)
Definition: lcd.c:181
void delay(uint16_t del)
Definition: util.c:28
void lcd_clear(uint8_t color)
Definition: lcd.c:120
void lcd_drawCircle(int16_t x, int16_t y, uint8_t r, uint8_t color, uint8_t filled)
Definition: lcd.c:196
void lcd_drawPixel(int16_t x, int16_t y, uint8_t color)
Definition: lcd.c:154
uint8_t lcd_drawString(uint8_t x1, uint8_t page1, uint8_t x2, uint8_t page2, uint8_t wrap, uint16_t delay, char *firstChar, uint8_t color, uint8_t overlay)
Definition: lcd.c:422