📄 disp.lst
字号:
C51 COMPILER V7.50 DISP 09/20/2005 21:47:47 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE DISP
OBJECT MODULE PLACED IN disp.obj
COMPILER INVOKED BY: e:\Keil\C51\BIN\C51.EXE modules\display\disp.c OPTIMIZE(7,SPEED) BROWSE INCDIR(.\modules\system;.\;
-.\;.\lib_refd) DEFINE(KEIL) DEBUG OBJECTEXTEND PRINT(.\disp.lst) OBJECT(disp.obj)
line level source
1 /*C**************************************************************************
2 * NAME: disp.c
3 *----------------------------------------------------------------------------
4 * Copyright (c) 2003 Atmel.
5 *----------------------------------------------------------------------------
6 * RELEASE: snd1c-refd-nf-4_0_3
7 * REVISION: 1.12
8 *----------------------------------------------------------------------------
9 * PURPOSE:
10 * This file contains the high level display routines
11 *****************************************************************************/
12
13 /*_____ I N C L U D E S ____________________________________________________*/
14
15 #include "config.h" /* system configuration */
16 #include "lib_mcu\kbd\kbd_drv.h" /* Keyboard driver definition */
17 #include "modules\song\song_drv.h" /* song driver definition */
18 #include "modules\file\file.h" /* file definition */
19 #include "disp_task.h" /* display task definition */
20 #include "disp.h" /* display definition */
21 #if CONF_DISPLAY == LED
22 #include "modules\mem\mem_task.h" /* memory task definition */
23 #include "modules\display\led.h" /* led definition */
24 #endif
25
26 /*_____ M A C R O S ________________________________________________________*/
27
28
29 /*_____ D E F I N I T I O N ________________________________________________*/
30
31 #if CONF_DISPLAY == LCD
extern bdata bit gl_kbd_lock; /* set to TRUE if keyboard locked */
extern bdata bit fs_memory; /* selected file system */
/* mode patterns */
code Byte cgram_mass[] = { 0x04, 0x06, 0x0D, 0x15, 0x14, 0x04, 0x0E, 0x04 };
code Byte cgram_song[] = { 0x03, 0x0F, 0x0D, 0x09, 0x09, 0x0B, 0x1B, 0x18 };
code Byte cgram_voice[] = { 0x00, 0x0D, 0x13, 0x13, 0x13, 0x0D, 0x00, 0x00 };
code Byte cgram_tools[] = { 0x0E, 0x04, 0x15, 0x1F, 0x11, 0x1F, 0x04, 0x04 };
/* state patterns */
code Byte cgram_stop[] = { 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00 };
code Byte cgram_play[] = { 0x00, 0x08, 0x0C, 0x0E, 0x0F, 0x0E, 0x0C, 0x08 };
code Byte cgram_pause[] = { 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x00 };
code Byte cgram_rec[] = { 0x00, 0x00, 0x1F, 0x0E, 0x04, 0x1F, 0x00, 0x00 };
/* sound patterns */
code Byte cgram_volume[] = { 0x02, 0x06, 0x1A, 0x12, 0x1A, 0x06, 0x02, 0x00 };
code Byte cgram_bass[] = { 0x07, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x00 };
code Byte cgram_medium[] = { 0x04, 0x0A, 0x0A, 0x0A, 0x11, 0x11, 0x11, 0x00 };
code Byte cgram_treble[] = { 0x1C, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00 };
/* memory patterns */
#if (MEM_CHIP_TYPE != CHIP_HDD)
C51 COMPILER V7.50 DISP 09/20/2005 21:47:47 PAGE 2
code Byte cgram_chip[] = { 0x0E, 0x1B, 0x0A, 0x1B, 0x0A, 0x1B, 0x0E, 0x00 };
#else
code Byte cgram_chip[] = { 0x04, 0xA, 0x15, 0x11, 0x11, 0x15, 0x0A, 0x04 };
#endif
#if (MEM_CARD_TYPE != CARD_CDR)
code Byte cgram_card[] = { 0x1C, 0x12, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1F };
#else
code Byte cgram_card[] = { 0x04, 0x0A, 0x15, 0x15, 0x0A, 0x04, 0x00, 0x00 };
#endif
code Byte cgram_card1[] = { 0x1C, 0x12, 0x11, 0x15, 0x11, 0x11, 0x11, 0x1F };
code Byte cgram_card2[] = { 0x1C, 0x12, 0x11, 0x15, 0x11, 0x15, 0x11, 0x1F };
/* file pattern */
code Byte cgram_mp3[] = { 0x04, 0x06, 0x07, 0x04, 0x04, 0x0C, 0x1C, 0x08 };
code Byte cgram_wav[] = { 0x00, 0x00, 0x02, 0x15, 0x15, 0x08, 0x00, 0x00 };
code Byte cgram_dir[] = { 0x00, 0x00, 0x00, 0x0C, 0x13, 0x11, 0x1F, 0x00 };
/* repeat pattern */
code Byte cgram_repeat[] = { 0x00, 0x00, 0x0E, 0x01, 0x09, 0x1E, 0x08, 0x00 };
code Byte cgram_rep_A[] = { 0x02, 0x1F, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00 };
code Byte cgram_rep_B[] = { 0x02, 0x1F, 0x02, 0x00, 0x00, 0x08, 0x1F, 0x08 };
/* misc pattern */
code Byte cgram_lock[] = { 0x04, 0x1C, 0x0C, 0x04, 0x04, 0x0C, 0x12, 0x0C };
code Byte cgram_blank[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
code Byte cgram_error[] = { 0x00, 0x00, 0x00, 0x0A, 0x04, 0x0A, 0x00, 0x00 };
#else
86 extern xdata Byte func_timeout;
87 extern xdata Byte func_state;
88 extern xdata Byte ref_state;
89 extern bit playing;
90 extern bit recording;
91 extern bit pause;
92 extern bit bargraph;
93 extern Byte song_sound;
94 extern xdata Byte LED_ON;
95 extern xdata Byte LED_FAST;
96 extern Byte mem_state; /* task state */
97 #endif
98
99
100
101 /*_____ D E C L A R A T I O N ______________________________________________*/
102
103
104 /*F**************************************************************************
105 * NAME: print_init
106 *----------------------------------------------------------------------------
107 * PARAMS:
108 *
109 * return:
110 *----------------------------------------------------------------------------
111 * PURPOSE:
112 * Print initialization
113 *----------------------------------------------------------------------------
114 * EXAMPLE:
115 *----------------------------------------------------------------------------
116 * NOTE:
C51 COMPILER V7.50 DISP 09/20/2005 21:47:47 PAGE 3
117 *----------------------------------------------------------------------------
118 * REQUIREMENTS:
119 *****************************************************************************/
120 void print_init (void)
121 {
122 1 #if CONF_DISPLAY == LCD
lcd_init (); /* lcd initialization */
lcd_cgram(CGRAM_SOUND, cgram_volume); /* init volume icon */
lcd_cgram(CGRAM_REPEAT, cgram_repeat); /* init repeat icon */
lcd_cgram(CGRAM_MODE, cgram_song); /* init mode icon to song */
lcd_cgram(CGRAM_STATE, cgram_stop); /* init state icon to stop */
print_kbd_lock(); /* set lock icon or not */
#else
130 1 led_task_init();
131 1 #endif
132 1 }
133
134
135 /*F**************************************************************************
136 * NAME: print_state_blank
137 *----------------------------------------------------------------------------
138 * PARAMS:
139 *
140 * return:
141 *----------------------------------------------------------------------------
142 * PURPOSE:
143 * Print the blank icon
144 *----------------------------------------------------------------------------
145 * EXAMPLE:
146 *----------------------------------------------------------------------------
147 * NOTE:
148 *----------------------------------------------------------------------------
149 * REQUIREMENTS:
150 *****************************************************************************/
151 void print_state_blank (void)
152 {
153 1 #if CONF_DISPLAY == LCD
lcd_cgram(CGRAM_STATE, cgram_blank); /* select blank icon */
#endif
156 1 }
157
158
159 /*F**************************************************************************
160 * NAME: print_state_stop
161 *----------------------------------------------------------------------------
162 * PARAMS:
163 *
164 * return:
165 *----------------------------------------------------------------------------
166 * PURPOSE:
167 * Print the stop icon
168 *----------------------------------------------------------------------------
169 * EXAMPLE:
170 *----------------------------------------------------------------------------
171 * NOTE:
172 *----------------------------------------------------------------------------
173 * REQUIREMENTS:
174 *****************************************************************************/
175 void print_state_stop (void)
176 {
177 1 #if CONF_DISPLAY == LCD
lcd_cgram(CGRAM_STATE, cgram_stop); /* select stop icon */
C51 COMPILER V7.50 DISP 09/20/2005 21:47:47 PAGE 4
#else
180 1 LED_FAST = 3;
181 1 #endif
182 1 }
183
184
185 /*F**************************************************************************
186 * NAME: print_state_play
187 *----------------------------------------------------------------------------
188 * PARAMS:
189 *
190 * return:
191 *----------------------------------------------------------------------------
192 * PURPOSE:
193 * Print the play icon
194 *----------------------------------------------------------------------------
195 * EXAMPLE:
196 *----------------------------------------------------------------------------
197 * NOTE:
198 *----------------------------------------------------------------------------
199 * REQUIREMENTS:
200 *****************************************************************************/
201 void print_state_play (void)
202 {
203 1 #if CONF_DISPLAY == LCD
lcd_cgram(CGRAM_STATE, cgram_play); /* select play icon */
#else
206 1 LED_ON = (8 >> ref_state);
207 1 LED_FAST = 1;
208 1 func_state = 0;
209 1 playing = TRUE;
210 1 #endif
211 1 }
212
213
214 /*F**************************************************************************
215 * NAME: print_state_pause
216 *----------------------------------------------------------------------------
217 * PARAMS:
218 *
219 * return:
220 *----------------------------------------------------------------------------
221 * PURPOSE:
222 * Print the pause icon
223 *----------------------------------------------------------------------------
224 * EXAMPLE:
225 *----------------------------------------------------------------------------
226 * NOTE:
227 *----------------------------------------------------------------------------
228 * REQUIREMENTS:
229 *****************************************************************************/
230 void print_state_pause (void)
231 {
232 1 #if CONF_DISPLAY == LCD
lcd_cgram(CGRAM_STATE, cgram_pause); /* select pause icon */
#else
235 1 LED_ON = (8 >> ref_state);
236 1 if (recording) LED_FAST = 2;
237 1 else LED_FAST = 3;
238 1 func_state = 0;
239 1 playing = FALSE;
240 1 pause = TRUE;
C51 COMPILER V7.50 DISP 09/20/2005 21:47:47 PAGE 5
241 1 #endif
242 1 }
243
244
245 /*F**************************************************************************
246 * NAME: print_state_record
247 *----------------------------------------------------------------------------
248 * PARAMS:
249 *
250 * return:
251 *----------------------------------------------------------------------------
252 * PURPOSE:
253 * Print the record icon
254 *----------------------------------------------------------------------------
255 * EXAMPLE:
256 *----------------------------------------------------------------------------
257 * NOTE:
258 *----------------------------------------------------------------------------
259 * REQUIREMENTS:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -