comparison src/cs/drivers/drv_app/r2d/lcd_messages.h @ 0:92470e5d0b9e

src: partial import from FC Selenite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 15 May 2020 01:28:16 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:92470e5d0b9e
1 /****************************************************************************/
2 /* */
3 /* File Name: lcd_messages.h */
4 /* */
5 /* Purpose: This file contains data structures and functions prototypes */
6 /* used to send events to the LCD SWE. */
7 /* */
8 /* Version 0.1 */
9 /* */
10 /* Date Modification */
11 /* ------------------------------------ */
12 /* 29/09/2000 Create */
13 /* */
14 /* Author Davide Carpegna */
15 /* */
16 /* (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved*/
17 /****************************************************************************/
18 #ifndef __LCD_MESSAGES_H_
19 #define __LCD_MESSAGES_H_
20
21 #include "r2d/lcd_functions.h"
22
23 #ifdef __cplusplus
24 extern "C"
25 {
26 #endif
27
28
29 /* the message offset must differ for each SWE in order to have unique msg_id in the system */
30 #define LCD_MESSAGES_OFFSET (0x34 << 10)
31
32
33 #define LCD_INIT_EVT 1
34 #define LCD_CLEAR_EVT 2
35 #define LCD_WRITE_STRING_EVT 3
36 #define LCD_WRITE_CENTER_EVT 4
37 #define LCD_CLEAR_STRING_EVT 5
38 #define LCD_CLEAR_WORD_EVT 6
39 #define LCD_PUT_PIXEL_EVT 7
40 #define LCD_CLEAR_PIXEL_EVT 8
41 #define LCD_DRAW_LINE_EVT 9
42 #define LCD_DRAW_RECTANGLE_EVT 10
43 #define LCD_CLEAR_LINE_EVT 11
44 #define LCD_CLEAR_RECTANGLE_EVT 12
45 #define LCD_DRAW_ICON_EVT 13
46 #define LCD_DRAW_BLOC_EVT 14
47 #define LCD_REFRESH_BLOC_EVT 15
48 #define LCD_SET_POWER_EVT 16
49
50
51 /* structures of messages send to LCD */
52
53
54 /******* LCD INIT **********/
55
56 typedef struct
57 {
58 T_RV_HDR os_hdr;
59 UINT8 empty;
60
61 } T_LCD_INIT;
62
63 /******* LCD CLEAR **********/
64
65 typedef struct
66 {
67 T_RV_HDR os_hdr;
68 UINT8 empty;
69
70 } T_LCD_CLEAR;
71
72 /******* WRITE STRING **********/
73
74 typedef struct
75 {
76 T_RV_HDR os_hdr;
77 UINT8 row;
78 UINT8 column;
79 T_VIDEO_MODE mode;
80 char string;
81
82 } T_LCD_WRITE_STRING;
83
84 /******* WRITE STRING CENTER**********/
85
86 typedef struct
87 {
88 T_RV_HDR os_hdr;
89 char string;
90
91 } T_LCD_WRITE_CENTER;
92
93 /******* CLEAR STRING **********/
94 typedef struct
95 {
96 T_RV_HDR os_hdr;
97 UINT8 row;
98
99 } T_LCD_CLEAR_STRING;
100
101 /******* CLEAR WORD **********/
102 typedef struct
103 {
104 T_RV_HDR os_hdr;
105 UINT8 row;
106 UINT8 column;
107 UINT16 length;
108
109 } T_LCD_CLEAR_WORD;
110
111 /******* PUT PIXEL **********/
112 typedef struct
113 {
114 T_RV_HDR os_hdr;
115 UINT8 x;
116 UINT8 y;
117
118
119 } T_LCD_PUT_PIXEL;
120
121 /******* CLEAR PIXEL **********/
122 typedef struct
123 {
124 T_RV_HDR os_hdr;
125 UINT8 x;
126 UINT8 y;
127
128 } T_LCD_CLEAR_PIXEL;
129
130 /******* DRAW LINE **********/
131 typedef struct
132 {
133 T_RV_HDR os_hdr;
134 UINT8 x1;
135 UINT8 y1;
136 UINT8 x2;
137 UINT8 y2;
138
139 } T_LCD_DRAW_LINE;
140
141 /******* DRAW RECTANGLE **********/
142 typedef struct
143 {
144 T_RV_HDR os_hdr;
145 UINT8 x1;
146 UINT8 y1;
147 UINT8 x2;
148 UINT8 y2;
149
150 } T_LCD_DRAW_RECTANGLE;
151
152
153 /******* CLEAR LINE **********/
154 typedef struct
155 {
156 T_RV_HDR os_hdr;
157 UINT8 x1;
158 UINT8 y1;
159 UINT8 x2;
160 UINT8 y2;
161
162 } T_LCD_CLEAR_LINE;
163
164 /******* CLEAR RECTANGLE **********/
165 typedef struct
166 {
167 T_RV_HDR os_hdr;
168 UINT8 x1;
169 UINT8 y1;
170 UINT8 x2;
171 UINT8 y2;
172
173 } T_LCD_CLEAR_RECTANGLE;
174
175 /******* DRAW ICON **********/
176 typedef struct
177 {
178 T_RV_HDR os_hdr;
179 UINT8 icon_id;
180 UINT8 x;
181 UINT8 y;
182
183 } T_LCD_DRAW_ICON;
184
185 /******* DRAW BLOC **********/
186 typedef struct
187 {
188 T_RV_HDR os_hdr;
189 char *table;
190 UINT8 x_dim;
191 UINT8 y_dim;
192 UINT8 x_pos;
193 UINT8 y_pos;
194
195 } T_LCD_DRAW_BLOC;
196
197 /******* REFRESH BLOC **********/
198 typedef struct
199 {
200 T_RV_HDR os_hdr;
201 char *table;
202 UINT8 x_dim;
203 UINT8 y_dim;
204 UINT8 x_pos;
205 UINT8 y_pos;
206 } T_LCD_REFRESH_BLOC;
207
208 /******* SET POWER **********/
209 typedef struct
210 {
211 T_RV_HDR os_hdr;
212
213 } T_LCD_SET_POWER;
214
215 /****** function prototypes ********/
216
217 T_RV_RET lcd_reset(void);
218 T_RV_RET lcd_clear(void);
219 T_RV_RET lcd_init(void);
220 T_RV_RET lcd_write_string(UINT8 row, UINT8 column, char *string,T_VIDEO_MODE mode);
221 T_RV_RET lcd_write_center( char *string);
222 T_RV_RET lcd_clear_string(UINT8 row);
223 T_RV_RET lcd_clear_word(UINT8 row, UINT8 column, UINT16 length);
224 T_RV_RET lcd_put_pixel(UINT8 x, UINT8 y);
225 T_RV_RET lcd_clear_pixel(UINT8 x, UINT8 y);
226 T_RV_RET lcd_draw_line(UINT8 x1, UINT8 y1, UINT8 x2, UINT8 y2);
227 T_RV_RET lcd_clear_line(UINT8 x1, UINT8 y1, UINT8 x2, UINT8 y2);
228 T_RV_RET lcd_draw_rectangle(UINT8 x1, UINT8 y1, UINT8 x2, UINT8 y2);
229 T_RV_RET lcd_clear_rectangle(UINT8 x1, UINT8 y1, UINT8 x2, UINT8 y2);
230 T_RV_RET lcd_draw_icon(UINT8 x,UINT8 y,UINT8 icon_id);
231 T_RV_RET lcd_refresh_bloc(char *table,UINT8 x_dim,UINT8 y_dim,UINT8 x_pos,UINT8 y_pos);
232 T_RV_RET lcd_pix_blt(int x_pos,int y_pos,int x_dim,int y_dim,char *table);
233 T_RV_RET lcd_enable(UINT8 x);
234 T_RV_RET lcd_set_power();
235 T_RV_RET lcd_cursor(UINT8 y,UINT8 x);
236
237
238 #ifdef __cplusplus
239 }
240 #endif
241
242
243 #endif /* __LCD_MESSAGES_H_ */
244