-
Notifications
You must be signed in to change notification settings - Fork 1
/
lcd.h
executable file
·93 lines (80 loc) · 1.95 KB
/
lcd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
* Copyright 2013, 2014 Chris Rhodin <chris@notav8.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _LCD_H_
#define _LCD_H_
typedef uint16_t icolor_t;
typedef uint32_t icount_t;
typedef uint8_t lcoor_t;
typedef uint8_t ldim_t;
//typedef struct lpoint {
// lcoor_t x;
// lcoor_t y;
//} lpoint_s;
typedef struct lrect {
lcoor_t x;
ldim_t x_size;
lcoor_t y;
ldim_t y_size;
} lrect_s;
typedef struct lregion {
icolor_t color;
lcoor_t x;
lcoor_t y;
ldim_t x_size;
ldim_t y_size;
} lregion_s;
typedef struct ltypeA {
lcoor_t x0;
lcoor_t y0;
lcoor_t x1;
lcoor_t y1;
} ltypeA_s;
typedef struct ltypeB {
lcoor_t x;
lcoor_t y;
ldim_t x_size;
ldim_t y_size;
} ltypeB_s;
typedef struct ltypeC {
lcoor_t x;
lcoor_t y;
ldim_t x_size;
ldim_t y_size;
icolor_t color;
} ltypeC_s;
typedef struct ltypeD {
lcoor_t x;
lcoor_t y;
ldim_t x_size;
ldim_t y_size;
icolor_t color0;
icolor_t color1;
} ltypeD_s;
typedef uint8_t lsize_t;
typedef uint8_t llen_t;
#define lcd_window_s irect_s
//typedef struct lcd_window {
// uint8_t x;
// uint8_t x_size;
// uint8_t y;
// uint8_t y_size;
//} lcd_window_s;
extern void lcd_init(void);
extern void lcd_reset(void);
extern void lcd_command(uint8_t command);
extern void lcd_data(uint8_t data);
#endif /* _LCD_H_ */