📄 periph.lst
字号:
C51 COMPILER V7.07 PERIPH 12/25/2006 14:02:14 PAGE 1
C51 COMPILER V7.07, COMPILATION OF MODULE PERIPH
OBJECT MODULE PLACED IN periph.OBJ
COMPILER INVOKED BY: D:\Keil\C51\BIN\C51.EXE periph.c OPTIMIZE(4,SPEED) BROWSE DEBUG OBJECTEXTEND
stmt level source
1
2
3
4 #pragma NOIV // Do not generate interrupt vectors
5 //-----------------------------------------------------------------------------
6 // File: periph.c
7 // Contents: Hooks required to implement USB peripheral function.
8 //
9 // Copyright (c) 1997 AnchorChips, Inc. All rights reserved
10 //-----------------------------------------------------------------------------
11 #include "fx2.h"
12 #include "fx2regs.h"
13 #include "fx2sdly.h"
14 //#include "io.h"
15 //#include "led.h"
16 //#include "serial.h"
17
18
19
20 #define TIMER0 0xC0;//0x85;
21 extern BOOL GotSUD; // Received setup data flag
22 extern BOOL Sleep;
23 extern BOOL Rwuen;
24 extern BOOL Selfpwr;
25 //extern WORD M,W2;
26 BYTE Configuration; // Current configuration
27 BYTE AlternateSetting; // Alternate settings
28 WORD EndPoint6_MaxInLength;
29
30 extern WORD AD_Result;
31 extern BYTE CON[4];
32 extern BYTE AD_State; // 1 send command ; 2 recive AD data
33 extern BYTE AD_Cfg_State; //0-7 send 0-7 commnad bits
34 extern BYTE AD_Rec_State; //0-11 recive 12 bits AD data
35
36 extern BYTE AD_Cfg_Byte;
37 extern BYTE AD_Rec_Data;
38 extern BYTE AD_Channel;
39 extern WORD tmp_data;
40 BYTE num_count;
41 extern BYTE data_enable;
42 //定义用到的全局变量
43 extern BYTE Channel_Cha;
44
45 //-----------------------------------------------------------------------------
46 // Task Dispatcher hooks
47 // The following hooks are called by the task dispatcher.
48 //-----------------------------------------------------------------------------
49
50 void TD_Init(void) // Called once at startup
51 {
52 1 BREAKPT &= ~bmBPEN; // to see BKPT LED go out TGE
53 1 Rwuen = TRUE; // Enable remote-wakeup
54 1 REVCTL = 0x03;
55 1 CPUCS=(CPUCS|0x10)&0xF7;
C51 COMPILER V7.07 PERIPH 12/25/2006 14:02:14 PAGE 2
56 1 T0M=1;
57 1
58 1 SYNCDELAY;
59 1 EP2CFG=0xE0;//端点2为IN,块传输,双重缓冲,对应缓存EP2BUF
60 1 SYNCDELAY;
61 1 EP6CFG=0xA0;//端点6为out,块传输,双重缓冲6杂
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -