📄 common.lst
字号:
C51 COMPILER V7.50 COMMON 09/05/2008 09:53:56 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE COMMON
OBJECT MODULE PLACED IN ..\output\output_bin\output_program\common.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\code\ap_main\src\common.c LARGE OPTIMIZE(9,SIZE) BROWSE INCDIR(..\..\
-..\bsp\include;..\..\code\ap_main\src\include;..\..\code\global;..\..\code\include) DEFINE(CONFIG_ASIC,dynamic_load,FIRS
-T) DEBUG OBJECTEXTEND PRINT(..\output\output_bin\output_program\common.lst) OBJECT(..\output\output_bin\output_program\c
-ommon.obj)
line level source
1 /*******************
2 * common.c
3 *******************/
4 #include <string.h>
5 #include "api.h"
6 #include "lcd.h"
7 #include "common.h"
8 #include "display.h"
9 #include "ap_common.h"
10 #include "prefer.h"
11 #include "global_user.h"
12 #include "res.h"
13 #include "res_show.h"
14
15 UINT32 u16TimerCount=0;
16
17 MUSIC_INFORMATION curr_music;
18 UINT16 curr_lyric_time;
19
20 INT8U _buf[256];
21 INT8U vol_flag=0;
22
23 FILE_INFORMATION curr_finfo, curr_dir, play_dir;
24 SCREENLEVEL screen_level;
25
26 UINT16 select;
27 UINT16 totdir, totfile, totitem;
28 UINT8 *search_extstr;
29
30
31 BOOLEAN bHotKeyHandle(UINT8 ekey)
32 {
33 1
34 1 switch(ekey)
35 1 {
36 2 case KEY_LONG_MENU:
37 2 key_menu_long = 1;
38 2 api_bSavePreferenceData(&tUserPreference,sizeof(USER_PREFERENCE_T));
39 2 //close_volume();
40 2 #ifdef dynamic_load
41 2 api_vLoad(Code_USER1,1);
42 2 #else
Print("Load Function\n");
#endif
45 2 break;
46 2 case KEY_LONG_PLAY:
47 2 api_bSavePreferenceData(&tUserPreference,sizeof(USER_PREFERENCE_T));
48 2 vShutDown();
49 2 break;
50 2 default:
51 2 return FALSE;
52 2 }
C51 COMPILER V7.50 COMMON 09/05/2008 09:53:56 PAGE 2
53 1 }
54
55 void key_process(UINT8 key)
56 {
57 1 u16TimerCount=0;
58 1
59 1 //vOpenBackLight();
60 1 if(bLCD_PIN_BACKLIGHT)
61 1 return;
62 1
63 1 //now handle hot key
64 1 bHotKeyHandle(key);
65 1
66 1 //deal other key now.
67 1 if(curr_screen->main)
68 1 curr_screen->main(key);
69 1 }
70
71
72
73
74
75 BOOLEAN close_volume(void)
76 {
77 1 api_bSetVolume(0-api_s8GetVolume());
78 1 *(INT8U xdata*)(0xF96E) = 0x03;
79 1 return 1;
80 1 }
81
82
83 //--------------------------------------------------------------------------
84 void vKeyTimeOut(void)
85 {
86 1 if (u16TimerCount == 0)
87 1 {
88 2 if(tUserPreference.u8BackLightTime!=0)
89 2 vOpenBackLight();
90 2 }
91 1
92 1 u16TimerCount++;
93 1
94 1 if((u16TimerCount>=tUserPreference.u8BackLightTime*4) && (tUserPreference.u8BackLightTime>0))
95 1 vCloseBackLight();
96 1
97 1 if((u16TimerCount>=tUserPreference.u8ShutDownTime*240) && (tUserPreference.u8ShutDownTime>0))
98 1 vShutDown();
99 1
100 1 }
101
102 void vShutDown()
103 {
104 1 INT16U i;
105 1
106 1 api_bSetVolume(0-api_s8GetVolume());
107 1 for(i=0;i<9;i++)
108 1 {
109 2 delay(20);
110 2 bResShowPic(GJI01+i,0,0);
111 2 }
112 1
113 1 delay(20);
114 1 vCloseBackLight();
C51 COMPILER V7.50 COMMON 09/05/2008 09:53:56 PAGE 3
115 1 lcd_clear();
116 1 delay(20);
117 1
118 1 api_bSetPowerDownMode(POWER_DOWN_ADDA_OFF);
119 1 delay(200);
120 1 b_PIN_POWEROFF = 0;
121 1 while(1){;}
122 1 }
123
124 void vOpenBackLight(void)
125 {
126 1 bLCD_PIN_BACKLIGHT = 0;
127 1 }
128
129 void vCloseBackLight(void)
130 {
131 1 bLCD_PIN_BACKLIGHT = 1;
132 1 }
133
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 387 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 344 3
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -