FreeCalypso > hg > ffs-editor
comparison src/cs/drivers/drv_app/r2d/lcd_process.c @ 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 * lcd_process.c : contains switch case on the received messages * | |
4 * in LCD mailbox * | |
5 * * | |
6 * Project : BLUETOOTH * | |
7 * * | |
8 * Author : Davide Carpegna * | |
9 * Version number : 1.0 * | |
10 * Date : 29 September 2000 * | |
11 * * | |
12 * (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved * | |
13 *************************************************************************************/ | |
14 | |
15 #include "rvf/rvf_api.h" | |
16 #include "rv/rv_general.h" | |
17 #include "r2d/lcd_messages.h" | |
18 #include "rvm/rvm_use_id_list.h" | |
19 | |
20 | |
21 void lcd_process(T_RV_HDR * msg_ptr) | |
22 { | |
23 | |
24 switch (msg_ptr->msg_id) | |
25 { | |
26 | |
27 case LCD_INIT_EVT: | |
28 /* LCD_init request by appli/atp */ | |
29 { | |
30 rvf_send_trace("received LCD_init ",20, NULL_PARAM, | |
31 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
32 | |
33 LCD_Init_ll(); | |
34 | |
35 /* free memory used for the DRIVER message */ | |
36 rvf_free_buf ((void *) msg_ptr); | |
37 break; | |
38 }; | |
39 | |
40 case LCD_CLEAR_EVT: | |
41 /* clear_lcd request by appli/atp */ | |
42 { | |
43 rvf_send_trace("received lcd_clear ",20, NULL_PARAM, | |
44 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
45 | |
46 LCD_Clear_ll(); | |
47 | |
48 /* free memory used for the DRIVER message */ | |
49 rvf_free_buf ((void *) msg_ptr); | |
50 break; | |
51 }; | |
52 | |
53 case LCD_WRITE_STRING_EVT: | |
54 /* write string request by appli/atp */ | |
55 { | |
56 rvf_send_trace("received write string ",24, NULL_PARAM, | |
57 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
58 | |
59 LCD_Write_String((((T_LCD_WRITE_STRING *) msg_ptr)->row),(((T_LCD_WRITE_STRING *) msg_ptr)->column),&(((T_LCD_WRITE_STRING *) msg_ptr)->string),(((T_LCD_WRITE_STRING *) msg_ptr)->mode)); | |
60 | |
61 /* free memory used for the DRIVER message */ | |
62 rvf_free_buf ((void *) msg_ptr); | |
63 break; | |
64 }; | |
65 | |
66 case LCD_WRITE_CENTER_EVT: | |
67 /* write_string_center request by appli/atp */ | |
68 { | |
69 rvf_send_trace("received write_string_center ",31, NULL_PARAM, | |
70 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
71 | |
72 LCD_Write_Center(&(((T_LCD_WRITE_CENTER *) msg_ptr)->string)); | |
73 | |
74 /* free memory used for the DRIVER message */ | |
75 rvf_free_buf ((void *) msg_ptr); | |
76 break; | |
77 }; | |
78 | |
79 case LCD_CLEAR_STRING_EVT: | |
80 /* clear_string request by appli/atp */ | |
81 { | |
82 | |
83 rvf_send_trace("received clear string ",24, NULL_PARAM, | |
84 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
85 | |
86 //LCD_Clear_String((((T_LCD_CLEAR_STRING *) msg_ptr)->row)); | |
87 | |
88 /* free memory used for the DRIVER message */ | |
89 rvf_free_buf ((void *) msg_ptr); | |
90 break; | |
91 }; | |
92 | |
93 case LCD_CLEAR_WORD_EVT: | |
94 /* clear_word request by appli/atp */ | |
95 { | |
96 rvf_send_trace("received clear word ",22, NULL_PARAM, | |
97 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
98 | |
99 //LCD_Clear_Word((((T_LCD_CLEAR_WORD *) msg_ptr)->row),(((T_LCD_CLEAR_WORD *) msg_ptr)->column),(((T_LCD_CLEAR_WORD *) msg_ptr)->length)); | |
100 | |
101 /* free memory used for the DRIVER message */ | |
102 rvf_free_buf ((void *) msg_ptr); | |
103 break; | |
104 }; | |
105 | |
106 case LCD_PUT_PIXEL_EVT: | |
107 /* put_pixel request by appli/atp */ | |
108 { | |
109 rvf_send_trace("received put pixel ",21, NULL_PARAM, | |
110 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
111 | |
112 //LCD_Put_Pixel((((T_LCD_PUT_PIXEL *) msg_ptr)->x),(((T_LCD_PUT_PIXEL *) msg_ptr)->y)); | |
113 | |
114 | |
115 /* free memory used for the DRIVER message */ | |
116 rvf_free_buf ((void *) msg_ptr); | |
117 break; | |
118 }; | |
119 | |
120 case LCD_CLEAR_PIXEL_EVT: | |
121 /* clear_pixel request by appli/atp */ | |
122 { | |
123 rvf_send_trace("received clear pixel ",23, NULL_PARAM, | |
124 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
125 | |
126 //LCD_Clear_Pixel((((T_LCD_CLEAR_PIXEL *) msg_ptr)->x),(((T_LCD_CLEAR_PIXEL *) msg_ptr)->y)); | |
127 | |
128 /* free memory used for the DRIVER message */ | |
129 rvf_free_buf ((void *) msg_ptr); | |
130 break; | |
131 }; | |
132 | |
133 case LCD_DRAW_LINE_EVT: | |
134 /* draw_line request by appli/atp */ | |
135 { | |
136 rvf_send_trace("received draw line ",21, NULL_PARAM, | |
137 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
138 | |
139 //LCD_Draw_Line((((T_LCD_DRAW_LINE *) msg_ptr)->x1),(((T_LCD_DRAW_LINE *) msg_ptr)->y1),(((T_LCD_DRAW_LINE *) msg_ptr)->x2),(((T_LCD_DRAW_LINE *) msg_ptr)->y2)); | |
140 | |
141 /* free memory used for the DRIVER message */ | |
142 rvf_free_buf ((void *) msg_ptr); | |
143 break; | |
144 }; | |
145 | |
146 case LCD_CLEAR_LINE_EVT: | |
147 /* clear_line request by appli/atp */ | |
148 { | |
149 rvf_send_trace("received clear line ",22, NULL_PARAM, | |
150 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
151 | |
152 //LCD_Clear_Line((((T_LCD_CLEAR_LINE *) msg_ptr)->x1),(((T_LCD_CLEAR_LINE *) msg_ptr)->y1),(((T_LCD_CLEAR_LINE *) msg_ptr)->x2),(((T_LCD_CLEAR_LINE *) msg_ptr)->y2)); | |
153 | |
154 /* free memory used for the DRIVER message */ | |
155 rvf_free_buf ((void *) msg_ptr); | |
156 break; | |
157 }; | |
158 | |
159 case LCD_DRAW_RECTANGLE_EVT: | |
160 /* draw_rectangle request by appli/atp */ | |
161 { | |
162 rvf_send_trace("received draw rectangle ",26, NULL_PARAM, | |
163 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
164 | |
165 //LCD_Draw_Rectangle((((T_LCD_DRAW_RECTANGLE *) msg_ptr)->x1),(((T_LCD_DRAW_RECTANGLE *) msg_ptr)->y1),(((T_LCD_DRAW_RECTANGLE *) msg_ptr)->x2),(((T_LCD_DRAW_RECTANGLE *) msg_ptr)->y2)); | |
166 | |
167 /* free memory used for the DRIVER message */ | |
168 rvf_free_buf ((void *) msg_ptr); | |
169 break; | |
170 }; | |
171 | |
172 case LCD_CLEAR_RECTANGLE_EVT: | |
173 /* clear_rectangle request by appli/atp */ | |
174 { | |
175 rvf_send_trace("received clear rectangle ",27, NULL_PARAM, | |
176 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
177 | |
178 //LCD_Clear_Rectangle((((T_LCD_CLEAR_RECTANGLE *) msg_ptr)->x1),(((T_LCD_CLEAR_RECTANGLE *) msg_ptr)->y1),(((T_LCD_CLEAR_RECTANGLE *) msg_ptr)->x2),(((T_LCD_CLEAR_RECTANGLE *) msg_ptr)->y2)); | |
179 | |
180 /* free memory used for the DRIVER message */ | |
181 rvf_free_buf ((void *) msg_ptr); | |
182 break; | |
183 }; | |
184 | |
185 case LCD_DRAW_ICON_EVT: | |
186 /* display icon request by appli/atp */ | |
187 { | |
188 rvf_send_trace("received display icon ",24, NULL_PARAM, | |
189 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
190 //LCD_Draw_Icon((((T_LCD_DRAW_ICON *) msg_ptr)->x),(((T_LCD_DRAW_ICON *) msg_ptr)->y),(((T_LCD_DRAW_ICON *) msg_ptr)->icon_id)); | |
191 | |
192 /* free memory used for the DRIVER message */ | |
193 rvf_free_buf ((void *) msg_ptr); | |
194 break; | |
195 }; | |
196 | |
197 case LCD_DRAW_BLOC_EVT: | |
198 /* draw bloc request by appli/atp */ | |
199 { | |
200 rvf_send_trace("received draw bloc ",20, NULL_PARAM, | |
201 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
202 | |
203 //LCD_PixBlt_ll((((T_LCD_DRAW_BLOC *) msg_ptr)->table),(((T_LCD_DRAW_BLOC *) msg_ptr)->x_dim),(((T_LCD_DRAW_BLOC *) msg_ptr)->y_dim),(((T_LCD_DRAW_BLOC *) msg_ptr)->x_pos),(((T_LCD_DRAW_BLOC *) msg_ptr)->y_pos)); | |
204 | |
205 /* free memory used for the DRIVER message */ | |
206 rvf_free_buf((((T_LCD_DRAW_BLOC *) msg_ptr)->table)); | |
207 /* free memory used for the table copy */ | |
208 rvf_free_buf ((void *) msg_ptr); | |
209 rvf_send_trace("free ",10,NULL_PARAM , RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
210 break; | |
211 }; | |
212 | |
213 case LCD_REFRESH_BLOC_EVT: | |
214 /*refresh bloc request by appli/atp */ | |
215 { | |
216 rvf_send_trace("received refresh bloc",21, NULL_PARAM, | |
217 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
218 | |
219 //LCD_Refresh_Bloc((((T_LCD_REFRESH_BLOC *) msg_ptr)->table),(((T_LCD_REFRESH_BLOC *) msg_ptr)->x_dim),(((T_LCD_REFRESH_BLOC *) msg_ptr)->y_dim),(((T_LCD_REFRESH_BLOC *) msg_ptr)->x_pos),(((T_LCD_REFRESH_BLOC *) msg_ptr)->y_pos)); | |
220 | |
221 /* free memory used for the DRIVER message */ | |
222 rvf_free_buf ((void *) msg_ptr); | |
223 break; | |
224 | |
225 }; | |
226 | |
227 case LCD_SET_POWER_EVT: | |
228 /* set_power request by appli/atp */ | |
229 { | |
230 rvf_send_trace("received set power ",20, NULL_PARAM, | |
231 RV_TRACE_LEVEL_DEBUG_LOW, R2D_USE_ID ); | |
232 | |
233 //LCD_Set_Power_ll(); | |
234 | |
235 /* free memory used for the DRIVER message */ | |
236 rvf_free_buf ((void *) msg_ptr); | |
237 break; | |
238 }; | |
239 | |
240 | |
241 } | |
242 | |
243 | |
244 } | |
245 | |
246 | |
247 | |
248 | |
249 | |
250 |