📄 voice_display.lst
字号:
C51 COMPILER V7.50 VOICE_DISPLAY 08/20/2008 17:10:37 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE VOICE_DISPLAY
OBJECT MODULE PLACED IN ..\output\output_bin\output_voice\voice_display.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\code\ap_voice\src\voice_display.c LARGE OPTIMIZE(9,SIZE) BROWSE INCDI
-R(..\..\..\bsp\include;..\..\code\ap_voice\src\include;..\..\code\global;..\..\code\include) DEFINE(CONFIG_ASIC,dynamic_
-load) DEBUG OBJECTEXTEND PRINT(..\output\output_bin\output_voice\voice_display.lst) OBJECT(..\output\output_bin\output_v
-oice\voice_display.obj)
line level source
1 /************************
2 * mp3_display.c
3 ************************/
4
5 #include <string.h>
6 #include "api.h"
7 #include "lcd.h"
8 #include "common.h"
9 #include "display.h"
10 #include "file_brower.h"
11 #include "voice_main.h"
12 //#include "lrc_parse.h"
13 #include "voice_display.h"
14 #include "voice_utile.h"
15 #include "res.h"
16 #include "res_show.h"
17 #include "ap_common.h"
18 #include "ui_main.h"
19 #include "prefer.h"
20 #include "global_user.h"
21
22 #define PROGRESS_Y 24
23 #define PROGRESS_X 4
24 #define FILE_NAME_X 2
25 #define FILE_NAME_Y 95
26
27 static UINT32 last_time = 0;
28 INT16U code loop_id[3] ={MLOOP1,MLOOP2,MLOOP5};
29 extern void song_timeon(SONGTIME type);
30
31
32 void vShowMusicType()
33 {
34 1 //ui_show_a(MMUSIC);
35 1 ui_show_a(MMP3);
36 1 }
37
38 void vShowBitrate()
39 {
40 1 ui_show_a(RWAV32K);
41 1 my_sprintf(_buf, "%03d", curr_music.u16BitRate);
42 1 bResShowPic(KBPS, 75 , 10);
43 1 bResShowPic(MBIT0+_buf[0] - 0x30, POS_BITRATE , POSY_BITRATE);
44 1 bResShowPic(MBIT0+_buf[1] - 0x30, POS_BITRATE+5, POSY_BITRATE);
45 1 bResShowPic(MBIT0+_buf[2] - 0x30, POS_BITRATE+10, POSY_BITRATE);
46 1 }
47
48 void vShowLoop()
49 {
50 1 ui_show_b(loop_id[tUserPreference.u8RepeatMode]);
51 1 }
52
C51 COMPILER V7.50 VOICE_DISPLAY 08/20/2008 17:10:37 PAGE 2
53 void vShowEq()
54 {
55 1 ui_show_c(tUserPreference.u8EqMode+MEQICON1);
56 1 }
57
58 void vShowRepeat()
59 {
60 1 if(api_eGetRepeatMode() == REPEAT_MODE_SETA_OK)
61 1 ui_show_a(MRPLNOA);
62 1 else if(api_eGetRepeatMode() == REPEAT_MODE_SETAB_OK)
63 1 ui_show_a(MRPLNOB);
64 1 else
65 1 vShowBitrate();
66 1 }
67
68 void ui_show_data3(char *buf, UINT8 x, UINT8 y)
69 {
70 1 // if(scr_en2) return;
71 1
72 1 while(1)
73 1 {
74 2 if(*buf!=0)bResShowPic(MNUM0+*buf-0x30, x, y);
75 2 else
76 2 break;
77 2 buf++;
78 2 x+=5;
79 2 }
80 1 }
81
82
83 void vShowSequence()
84 {
85 1 my_sprintf(_buf, "%03d", curr_music.u16Order);
86 1 _buf[3] = ';';
87 1 my_sprintf(&_buf[4], "%03d",totfile);
88 1 //ui_show_data3(_buf,90,109);
89 1 ui_show_data2(_buf,3, 115);
90 1 }
91
92 void vShowTotalTime()
93 {
94 1 song_timeon(TIME_TOTAL);
95 1 ui_show_d(_buf, 1);
96 1 }
97
98 void vShowCurrentTime()
99 {
100 1 song_timeon(TIME_PLAY);
101 1 ui_show_d(_buf, 0);
102 1 }
103
104 void ui_draw(void)
105 {
106 1 //shoud show background now
107 1 bResShowPic(BACKDROP,0,0);
108 1 if(!api_bGetCurrMusicInfo(&curr_music))
109 1 return;
110 1 //show music type.
111 1 //vShowMusicType();
112 1 vShowBitrate();
113 1 //show speaker
114 1 //ui_show_spk(1);
C51 COMPILER V7.50 VOICE_DISPLAY 08/20/2008 17:10:37 PAGE 3
115 1 //show eq type.
116 1 vShowEq();
117 1 //show loop type
118 1 vShowLoop();
119 1 //show music order
120 1 vShowSequence();
121 1
122 1 //vLcd_SongName();
123 1 //show total time.
124 1 vShowTotalTime();
125 1 //show current time
126 1 vShowCurrentTime();
127 1
128 1 //play_time_update(0);
129 1 last_time = 0;
130 1 bResShowPic(SCHEDU00, 16 , 5);
131 1
132 1 bResShowPic(RPLAY3,2,51);
133 1 //show progress
134 1 //gfx_progress(1);
135 1 //show volume.
136 1 ui_show_vol();
137 1 //show battary
138 1 ui_show_batt();
139 1 //show media type
140 1 bg_color = 0x1d1f;
141 1 fg_color = COLOR_UNSELECT;
142 1 if(my_disk==0) //sd
143 1 {
144 2 lcd_puts(56, 17, "SD",FONTSIZE_HYPER);
145 2 }
146 1 else //nand
147 1 {
148 2 lcd_puts(48, 17, "NAND", FONTSIZE_HYPER);
149 2 }
150 1 //show file name.
151 1 gfx_songname();
152 1 bResShowPic(STOP_PIC, 0 , 2);
153 1 }
154
155
156 void play_time_update(UINT8 para)
157 {
158 1 //static UINT32 last_time;
159 1 INT32U data time;
160 1
161 1 time = api_u32GetPlayingTime();
162 1 if(last_time != time) {
163 2 if(curr_screen->id == SCREEN_VOICE) {
164 3 vShowCurrentTime();
165 3 bResShowPic(SCHEDU00+ (38 * last_time / curr_music.u32Length)%38, 16 , 5);
166 3 last_time = api_u32GetPlayingTime();
167 3 }
168 2 }
169 1 }
*** WARNING C280 IN LINE 156 OF ..\..\CODE\AP_VOICE\SRC\VOICE_DISPLAY.C: 'para': unreferenced local variable
170
171 void gfx_songname(void)
172 {
173 1 bg_color = COLOR_BLACK;
174 1 gfx_set_bg(COLOR_BLACK);
175 1 gfx_bg_rectangle(0,30, 128, 16);
C51 COMPILER V7.50 VOICE_DISPLAY 08/20/2008 17:10:37 PAGE 4
176 1 fg_color = COLOR_UNSELECT;
177 1 /* Draw song file name */
178 1 lcd_max_str = 14;
179 1 gfx_filename(0,30);
180 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 625 ----
CONSTANT SIZE = 19 ----
XDATA SIZE = 4 6
PDATA SIZE = ---- ----
DATA SIZE = ---- 4
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 1 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -