📄 disp.lst
字号:
C51 COMPILER V6.20c DISP 07/10/2002 15:17:45 PAGE 1
C51 COMPILER V6.20c, COMPILATION OF MODULE DISP
OBJECT MODULE PLACED IN ..\obj\disp.obj
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE ..\src\display\disp.c BROWSE INCDIR(..\src\system;..\..\..\lib) DEFINE(KEIL
-) DEBUG OBJECTEXTEND PRINT(.\disp.lst) OBJECT(..\obj\disp.obj)
stmt level source
1 /*C**************************************************************************
2 * $RCSfile: disp.c,v $
3 *----------------------------------------------------------------------------
4 * Copyright (c) 2002 Atmel.
5 *----------------------------------------------------------------------------
6 * RELEASE: $Name: DEMO_FAT_1_2_5 $
7 * REVISION: $Revision: 1.6 $
8 * FILE_CVSID: $Id: disp.c,v 1.6 2002/06/06 15:20:50 ffosse Exp $
9 *----------------------------------------------------------------------------
10 * PURPOSE:
11 * This file contains the high level display routines
12 *****************************************************************************/
13
14 /*_____ I N C L U D E S ____________________________________________________*/
15
16 #include "config.h" /* system configuration */
17 #include "..\song\song_drv.h" /* song driver definition */
18 #include "..\file\file.h" /* file definition */
19 #include "disp_task.h" /* display task definition */
20 #include "disp.h" /* display definition */
21
22
23 /*_____ M A C R O S ________________________________________________________*/
24
25
26 /*_____ D E F I N I T I O N ________________________________________________*/
27
28 extern bdata bit gl_kbd_lock; /* set to TRUE if keyboard locked */
29
30
31 /* mode patterns */
32 code Byte cgram_mass[] = { 0x04, 0x06, 0x0D, 0x15, 0x14, 0x04, 0x0E, 0x04 };
33 code Byte cgram_song[] = { 0x03, 0x0F, 0x0D, 0x09, 0x09, 0x0B, 0x1B, 0x18 };
34 code Byte cgram_voice[] = { 0x00, 0x0D, 0x13, 0x13, 0x13, 0x0D, 0x00, 0x00 };
35 code Byte cgram_tools[] = { 0x0E, 0x04, 0x15, 0x1F, 0x11, 0x1F, 0x04, 0x04 };
36
37 /* state patterns */
38 code Byte cgram_stop[] = { 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00 };
39 code Byte cgram_play[] = { 0x00, 0x08, 0x0C, 0x0E, 0x0F, 0x0E, 0x0C, 0x08 };
40 code Byte cgram_pause[] = { 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x00 };
41 code Byte cgram_rec[] = { 0x00, 0x00, 0x1F, 0x0E, 0x04, 0x1F, 0x00, 0x00 };
42
43 /* sound patterns */
44 code Byte cgram_volume[] = { 0x02, 0x06, 0x1A, 0x12, 0x1A, 0x06, 0x02, 0x00 };
45 code Byte cgram_bass[] = { 0x07, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x00 };
46 code Byte cgram_medium[] = { 0x04, 0x0A, 0x0A, 0x0A, 0x11, 0x11, 0x11, 0x00 };
47 code Byte cgram_treble[] = { 0x1C, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00 };
48
49 /* memory patterns */
50 code Byte cgram_df[] = { 0x0E, 0x1B, 0x0A, 0x1B, 0x0A, 0x1B, 0x0E, 0x00 };
51 code Byte cgram_mmc1[] = { 0x1C, 0x12, 0x11, 0x15, 0x11, 0x11, 0x11, 0x1F };
52 code Byte cgram_mmc2[] = { 0x1C, 0x12, 0x11, 0x15, 0x11, 0x15, 0x11, 0x1F };
53
54 /* file pattern */
C51 COMPILER V6.20c DISP 07/10/2002 15:17:45 PAGE 2
55 code Byte cgram_mp3[] = { 0x04, 0x06, 0x07, 0x04, 0x04, 0x0C, 0x1C, 0x08 };
56 code Byte cgram_wav[] = { 0x00, 0x00, 0x02, 0x15, 0x15, 0x08, 0x00, 0x00 };
57 code Byte cgram_dir[] = { 0x00, 0x00, 0x00, 0x0C, 0x13, 0x11, 0x1F, 0x00 };
58
59 /* misc pattern */
60 code Byte cgram_repeat[] = { 0x00, 0x00, 0x0E, 0x01, 0x09, 0x1E, 0x08, 0x00 };
61 code Byte cgram_lock[] = { 0x04, 0x1C, 0x0C, 0x04, 0x04, 0x0C, 0x12, 0x0C };
62 code Byte cgram_blank[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
63 code Byte cgram_error[] = { 0x00, 0x00, 0x00, 0x0A, 0x04, 0x0A, 0x00, 0x00 };
64
65
66 /*_____ D E C L A R A T I O N ______________________________________________*/
67
68
69 /*F**************************************************************************
70 * NAME: print_init
71 *----------------------------------------------------------------------------
72 * PARAMS:
73 *
74 * return:
75 *----------------------------------------------------------------------------
76 * PURPOSE:
77 * Print initialization
78 *----------------------------------------------------------------------------
79 * EXAMPLE:
80 *----------------------------------------------------------------------------
81 * NOTE:
82 *----------------------------------------------------------------------------
83 * REQUIREMENTS:
84 *****************************************************************************/
85 void print_init (void)
86 {
87 1 lcd_init (); /* lcd initialization */
88 1 lcd_cgram(CGRAM_SOUND, cgram_volume); /* init volume icon */
89 1 lcd_cgram(CGRAM_REPEAT, cgram_repeat); /* init repeat icon */
90 1 lcd_cgram(CGRAM_MODE, cgram_song); /* init mode icon to song */
91 1 lcd_cgram(CGRAM_STATE, cgram_stop); /* init state icon to stop */
92 1 print_kbd_lock(); /* set lock icon or not */
93 1 }
94
95
96 /*F**************************************************************************
97 * NAME: print_state_blank
98 *----------------------------------------------------------------------------
99 * PARAMS:
100 *
101 * return:
102 *----------------------------------------------------------------------------
103 * PURPOSE:
104 * Print the blank icon
105 *----------------------------------------------------------------------------
106 * EXAMPLE:
107 *----------------------------------------------------------------------------
108 * NOTE:
109 *----------------------------------------------------------------------------
110 * REQUIREMENTS:
111 *****************************************************************************/
112 void print_state_blank (void)
113 {
114 1 lcd_cgram(CGRAM_STATE, cgram_blank); /* select blank icon */
115 1 }
116
C51 COMPILER V6.20c DISP 07/10/2002 15:17:45 PAGE 3
117
118 /*F**************************************************************************
119 * NAME: print_state_stop
120 *----------------------------------------------------------------------------
121 * PARAMS:
122 *
123 * return:
124 *----------------------------------------------------------------------------
125 * PURPOSE:
126 * Print the stop icon
127 *----------------------------------------------------------------------------
128 * EXAMPLE:
129 *----------------------------------------------------------------------------
130 * NOTE:
131 *----------------------------------------------------------------------------
132 * REQUIREMENTS:
133 *****************************************************************************/
134 void print_state_stop (void)
135 {
136 1 lcd_cgram(CGRAM_STATE, cgram_stop); /* select stop icon */
137 1 }
138
139
140 /*F**************************************************************************
141 * NAME: print_state_play
142 *----------------------------------------------------------------------------
143 * PARAMS:
144 *
145 * return:
146 *----------------------------------------------------------------------------
147 * PURPOSE:
148 * Print the play icon
149 *----------------------------------------------------------------------------
150 * EXAMPLE:
151 *----------------------------------------------------------------------------
152 * NOTE:
153 *----------------------------------------------------------------------------
154 * REQUIREMENTS:
155 *****************************************************************************/
156 void print_state_play (void)
157 {
158 1 lcd_cgram(CGRAM_STATE, cgram_play); /* select play icon */
159 1 }
160
161
162 /*F**************************************************************************
163 * NAME: print_state_pause
164 *----------------------------------------------------------------------------
165 * PARAMS:
166 *
167 * return:
168 *----------------------------------------------------------------------------
169 * PURPOSE:
170 * Print the pause icon
171 *----------------------------------------------------------------------------
172 * EXAMPLE:
173 *----------------------------------------------------------------------------
174 * NOTE:
175 *----------------------------------------------------------------------------
176 * REQUIREMENTS:
177 *****************************************************************************/
178 void print_state_pause (void)
C51 COMPILER V6.20c DISP 07/10/2002 15:17:45 PAGE 4
179 {
180 1 lcd_cgram(CGRAM_STATE, cgram_pause); /* select pause icon */
181 1 }
182
183
184 /*F**************************************************************************
185 * NAME: print_state_record
186 *----------------------------------------------------------------------------
187 * PARAMS:
188 *
189 * return:
190 *----------------------------------------------------------------------------
191 * PURPOSE:
192 * Print the record icon
193 *----------------------------------------------------------------------------
194 * EXAMPLE:
195 *----------------------------------------------------------------------------
196 * NOTE:
197 *----------------------------------------------------------------------------
198 * REQUIREMENTS:
199 *****************************************************************************/
200 void print_state_record (void)
201 {
202 1 lcd_cgram(CGRAM_STATE, cgram_rec); /* select record icon */
203 1 }
204
205
206
207 /*F**************************************************************************
208 * NAME: print_state_error
209 *----------------------------------------------------------------------------
210 * PARAMS:
211 *
212 * return:
213 *----------------------------------------------------------------------------
214 * PURPOSE:
215 * Print the error icon
216 *----------------------------------------------------------------------------
217 * EXAMPLE:
218 *----------------------------------------------------------------------------
219 * NOTE:
220 *----------------------------------------------------------------------------
221 * REQUIREMENTS:
222 *****************************************************************************/
223 void print_state_error (void)
224 {
225 1 lcd_cgram(CGRAM_STATE, cgram_error); /* select error icon */
226 1 }
227
228
229
230 /*F**************************************************************************
231 * NAME: print_mode_song
232 *----------------------------------------------------------------------------
233 * PARAMS:
234 *
235 * return:
236 *----------------------------------------------------------------------------
237 * PURPOSE:
238 * Print the song icon on the LCD
239 *----------------------------------------------------------------------------
240 * EXAMPLE:
C51 COMPILER V6.20c DISP 07/10/2002 15:17:45 PAGE 5
241 *----------------------------------------------------------------------------
242 * NOTE:
243 *----------------------------------------------------------------------------
244 * REQUIREMENTS:
245 *****************************************************************************/
246 void print_mode_song (void)
247 {
248 1 lcd_cgram(CGRAM_MODE, cgram_song); /* select song icon */
249 1 }
250
251
252 /*F**************************************************************************
253 * NAME: print_mode_voice
254 *----------------------------------------------------------------------------
255 * PARAMS:
256 *
257 * return:
258 *----------------------------------------------------------------------------
259 * PURPOSE:
260 * Print the voice icon on the LCD
261 *----------------------------------------------------------------------------
262 * EXAMPLE:
263 *----------------------------------------------------------------------------
264 * NOTE:
265 *----------------------------------------------------------------------------
266 * REQUIREMENTS:
267 *****************************************************************************/
268 void print_mode_voice (void)
269 {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -