📄 userinit.lst
字号:
C51 COMPILER V7.20 USERINIT 07/12/2006 09:11:37 PAGE 1
C51 COMPILER V7.20, COMPILATION OF MODULE USERINIT
OBJECT MODULE PLACED IN .\obj\userinit.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE USER\userinit.c LARGE OPTIMIZE(9,SIZE) BROWSE NOAREGS DEFINE(K_CARD_TYPE=0x
-01,K_CARD_TOTAL=0x01) DEBUG OBJECTEXTEND PRINT(.\lst\userinit.lst) OBJECT(.\obj\userinit.obj)
line level source
1 //===========================================================
2 // Project Name(项目名称): SPCA755 rebuild
3 // File Name(模块名称): userinit.c
4 // Built Date(创建日期):2004-09-14
5 // Abstract(模块描述): 用户初始化功能函数模块
6 // Revision History(版本信息):
7 // Rev Date Author Comment(修改说明)
8 // 1.0 2004-09-14 XYQ created
9 //============================================================
10 #include "..\userdefine.h"
11 #include "userinit.h"
12 #include "user.h"
13 #include "interrupt.h"
14 #include "main.h"
15 //================================================================================================
16 code U8 User_Dir[K_USER_DIR_NUM][12] =
17 {
18 'D','V','R',0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x10,
19 };//==================注意:目录名字母必须大写=====================================
20 #define USER_SETTING_CHECKSUM_LENTH 10
21 code U8 LogFileName[] =
22 {
23 'U','S','E','R','S','E','T',' ','L','O','G'
24 };
25
26
27 //***************************************** USB DESCRIPTOR ******************************************
28 //================================================================================================
29 code U8 K_MSDC_DeviceDescriptor[] =
30 {
31 //-------------------------------------------------------------------
32 //TotalLength = 0x0012 byte
33 //-------------------------------------------------------------------
34
35 //Device (0x12 byte)
36 0x12, //bLength: 0x12 byte
37 0x01, //bDescriptorType: DEVICE
38 0x10, 0x01, //bcdUSB: version 1.10
39 0x00, //bDeviceClass: independent interfaces
40 0x00, //bDeviceSubClass: 0
41 0x00, //bDeviceProtocol: class specific protocols NOT used on device basis
42 0x40, //bMaxPacketSize0: maximum packet size for endpoint zero
43 0xFC, 0x04, //idVendor: vendor ID
44 0x7A, 0x75, //idProduct: product ID (for MSDC)
45 0x00, 0x01, //bcdDevice: device release number in BCD
46 0x01, //iManufacturer: index of string
47 0x02, //iProduct: index of string
48 0x00, //iSerialNumber: index of string
49 0x01, //bNumConfigurations: 1 configuration
50 };
51
52 //================================================================================================
53 code U8 K_ManufacturerString[] =
54 {
C51 COMPILER V7.20 USERINIT 07/12/2006 09:11:37 PAGE 2
55 //----------
56 //0x20 Bytes
57 //----------
58 0x20, //bLength
59 0x03, //bDescriptorType: STRING
60 'S', 0x00, //bString: Sunplus Co Ltd
61 'u', 0x00,
62 'n', 0x00,
63 'p', 0x00,
64 'l', 0x00,
65 'u', 0x00,
66 's', 0x00,
67 ' ', 0x00,
68 'C', 0x00,
69 'o', 0x00,
70 ' ', 0x00,
71 'L', 0x00,
72 't', 0x00,
73 'd', 0x00,
74 ' ', 0x00,
75 };
76 //================================================================================================
77 code U8 K_ProductString[] =
78 {
79 //----------
80 //0x30 Bytes
81 //----------
82 0x30, //bLength
83 0x03, //bDescriptorType: STRING
84 'S', 0x00, //bString: Sunplus SPCA755/SPCA757
85 'u', 0x00,
86 'n', 0x00,
87 'p', 0x00,
88 'l', 0x00,
89 'u', 0x00,
90 's', 0x00,
91 ' ', 0x00,
92 'M', 0x00,
93 'u', 0x00,
94 'l', 0x00,
95 't', 0x00,
96 'i', 0x00,
97 'M', 0x00,
98 'e', 0x00,
99 'd', 0x00,
100 'i', 0x00,
101 'a', 0x00,
102 ' ', 0x00,
103 'd', 0x00,
104 'i', 0x00,
105 's', 0x00,
106 'k', 0x00,
107 };
108 //================================================================================================
109 code U8 K_SerialNumberString[] =
110 {
111 //----------
112 //0x1a Bytes
113 //----------
114 //----------
115 0x12, //bLength
116 0x03, //bDescriptorType: STRING
C51 COMPILER V7.20 USERINIT 07/12/2006 09:11:37 PAGE 3
117 '0', 0x00, //bString: 01.00.00
118 '1', 0x00,
119 '.', 0x00,
120 '0', 0x00,
121 '0', 0x00,
122 '.', 0x00,
123 '0', 0x00,
124 '0', 0x00,
125 };
126 //================================================================================================
127 code U8 K_ScsiVendorInformation[8] =//注意长度不能改动
128 {
129 'S', 'u', 'n', 'p', 'l', 'u', 's', 0x20,
130 };
131 //================================================================================================
132 code U8 K_ScsiProductIdentification[16] =//注意长度不能改动
133 {
134 'M', 'u', 'l', 't', 'i', 'M', 'e', 'd',
135 'i', 'a', '-', 'D', 'i', 's', 'k', 0x20,
136 };
137 //================================================================================================
138 code U8 K_ScsiProductRevisionLevel[4] =//注意长度不能改动
139 {
140 '1', '.', '0', '0',
141 };
142
143
144 //-----------------------------------------------------------------------------------
145 code U8 gc_CustomerID1 = 0x00;
146 code U8 gc_CustomerID2 = 0x00;
147 code U8 gc_CustomerID3 = 0x00;
148 //----------------------------------------------------------------------------------
149 xdata U32 gdw_USER_DirClus[K_USER_DIR_NUM];
150 data U8 gc_SystemStateMode;
151 xdata U8 gc_KeyLockState;
152 xdata U8 gc_PLAY_DPC;
153 xdata U8 gc_DSP_Volume;
154 xdata U8 gc_PlayEQMode;
155 data U8 gc_UIMode;
156 xdata U8 G_Current_Contrast;
157 xdata U16 gw_Code;
158 xdata U8 gc_UserBacklightLevel;//lyh add
159 xdata U8 gc_LrcFileName_Exist;
160
161 //================================================================================================
162 void User_initialize(void);
163 void User_initialize2(void);
164 //void User_initialize3(void);//lyh add
165 void L2_ConfigureIO(void);
166 //===================================================================================================
167 void User_initialize2()
168 {
169 1 U8 i;
170 1 gw_Code = SYS_VersionCode;
171 1 gw_Code = USB_VersionCode;
172 1 gw_Code = Nand_VersionCode;
173 1 gw_Code = DSP_VersionCode;
174 1 gw_Code = ID3_VersionCode;
175 1 gw_Code = LRC_VersionCode;
176 1 gw_Code = Dos_VersionCode;
177 1 #ifdef SUPPORT_MLUN
gw_Code = Mlun_VersionCode;
C51 COMPILER V7.20 USERINIT 07/12/2006 09:11:37 PAGE 4
#endif
180 1 #ifdef SUPPORT_SELECTIVE_FUNC
gw_Code = Selective_VersionCode;
#endif
183 1 // Usb_WriteProtectInitio(DbgP11);
184 1 gc_SecondTimer = SECONDTIMER_VALUE;
185 1 gc_basetimerx4= BASETIMERX4_VALUE;//lyh add
186 1
187 1 // gc_CardTotal = K_CARD_TOTAL;
188 1 gc_DSP_Volume = 21; // Volume
189 1 gc_PlayEQMode = 0; // EQ
190 1 gc_PLAY_DPC = 12; // Speed control
191 1 G_CurrentHZK = Language_GB2312;
192 1 gc_UserBacklightLevel = 0; //lizhn debug
193 1
194 1 gc_UIMode=0; // UIMode = 0x00 is music file
195 1 // UIMode = 0x01 is record file
196 1
197 1 gc_LrcFileName_Exist = 0;
198 1
199 1 gc_RECLowBattValue = K_REC_MINBATTERYVALUE;
200 1
201 1 gc_SystemStateMode = SYSTEM_STATE0_IDLE;//default idle state
202 1 gc_DispTime[0] = 0;
203 1 gc_DispTime[1] = 0;
204 1 gc_DispTime[2] = 0;
205 1 MlunSequence[0] = 0;
206 1 MlunSequence[1] = 1;
207 1
208 1 gc_KeyLockState = 0;
209 1
210 1 gc_KeyValue = 0;
211 1 #ifdef SUPPORT_MLUN
// gb_MlunEnable = 1;
#else
214 1 // gb_MlunEnable = 0;
215 1 #endif
216 1 #if (K_CARD_TYPE == 0x03)
SMC_STORAGE_Initialize();
if (gc_DOS_ErrorStatus = SD_STORAGE_Initialize())//try to initialize SD card
#endif
220 1 {//if SD card is not exist
221 2 gc_DOS_ErrorStatus = SMC_STORAGE_Initialize();//try to initialize SMC
222 2 }
223 1 if (gc_DOS_ErrorStatus == 0)
224 1 {
225 2 USER_FindDir(0,gdw_DOS_RootDirClus);//detect DVR dir
226 2 }
227 1
228 1 SPLC501_Init();
229 1 // SPLC501_Disp_MyMP3Logo();
230 1 SPLC501_ShowCompanyLogo();
231 1 SPLC501_Disp_TASOLogo();
*** WARNING C206 IN LINE 231 OF USER\USERINIT.C: 'SPLC501_Disp_TASOLogo': missing function-prototype
232 1
233 1 for(i=0;i<10;i++)
234 1 {
235 2 USER_DelayDTms(250);
236 2 }
237 1
238 1 if(!USB_PlugDetect())
239 1 {
C51 COMPILER V7.20 USERINIT 07/12/2006 09:11:37 PAGE 5
240 2 //battery port power
241 2 // if(LockPin_Locked)//xyq040210 locked lss 060612
242 2 if(0)//xyq040210 locked
243 2 {
244 3 unsigned char i;
245 3
246 3 for(i=0;i<12;i++)
247 3 {
248 4 USER_DelayDTms(250);
249 4 }
250 3 POWER_CTRL_LOW;//DbgP30=0;//Low for Power Off
251 3 while(1);
252 3 }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -