Isr.LST
资源名称:USB_2.0.rar [点击查看]
上传用户:ids068
上传日期:2013-04-04
资源大小:639k
文件大小:11k
源码类别:
USB编程
开发平台:
C/C++
- C51 COMPILER V7.06 ISR 07/02/2003 10:05:12 PAGE 1
- C51 COMPILER V7.06, COMPILATION OF MODULE ISR
- OBJECT MODULE PLACED IN Isr.OBJ
- COMPILER INVOKED BY: C:KEILC51BINC51.EXE Isr.c OPTIMIZE(2,SPEED) BROWSE DEBUG OBJECTEXTEND
- stmt level source
- 1 //***********************************************************************
- 2 // *
- 3 // P H I L I P S P R O P R I E T A R Y *
- 4 // *
- 5 // COPYRIGHT (c) 1999 BY PHILIPS SINGAPORE (APIC). *
- 6 // -- ALL RIGHTS RESERVED -- *
- 7 // *
- 8 // File Name : Kernel.c *
- 9 // Author : Albert Goh *
- 10 // Created : 3 March 2000 *
- 11 // *
- 12 //***********************************************************************
- 13 //***********************************************************************
- 14 // *
- 15 // Kernel.c is the control centre for this evaluation firmware. It will *
- 16 // control where should the firmware branch through via the selection *
- 17 // of the UART port of the 8051. if not via the UART, it will be from *
- 18 // the selection of the code defintion *
- 19 // *
- 20 //***********************************************************************
- 21 //***********************************************************************
- 22 // *
- 23 // Module History *
- 24 // ************** *
- 25 // *
- 26 // Date Version Author Changes *
- 27 // ==== ======= ====== ======= *
- 28 // 030300 0.1 Albert Created *
- 29 // *
- 30 // *
- 31 //***********************************************************************
- 32 //***********************************************************************
- 33 //* *
- 34 //* Include Files Definition *
- 35 //* *
- 36 //***********************************************************************
- 37
- 38 #include "standard.h"
- 39 #include "Kernel.h"
- 40 #include "D14.h"
- 41
- 42 extern KERNEL Kernel_Flag;
- 43 extern D14_CNTRL_REG xdata *D14_Cntrl_Ptr;
- 44 extern volatile D14_CNTRL_REG xdata D14_Cntrl_Reg;
- 45
- 46 extern DMA_INT_FLAG DMA_Int_Flag;
- 47 extern USB_INT_FLAG USB_Int_Flag;
- 48 extern void Init_D14(void);
- 49 extern UC ATAPI_State;
- 50 extern DRIVE_CONFIG Drive_Setup;
- 51 extern void Set_USB(void);
- 52 extern ULI bytecount;
- 53 extern UI PIO_Count;
- 54
- 55 //***********************************************************************
- C51 COMPILER V7.06 ISR 07/02/2003 10:05:12 PAGE 2
- 56 //* *
- 57 //* Variable Definition *
- 58 //* *
- 59 //***********************************************************************
- 60
- 61
- 62 UI idata Data;
- 63 ULI USB_Interrupt;
- 64 UI DMA_Interrupt;
- 65 UC timecouter=0;
- 66
- 67 //***********************************************************************
- 68 //* *
- 69 //* Routine Definition *
- 70 //* *
- 71 //***********************************************************************
- 72
- 73 void Int_2(void) interrupt 2 using 0
- 74 {
- 75 1 }
- 76
- 77 void Int_3(void) interrupt 3 using 0
- 78 {
- 79 1
- 80 1 TH1=60;
- 81 1 TL1=80;
- 82 1 timecouter++;
- 83 1 }
- 84
- 85 void Int_4(void) interrupt 4 using 0
- 86 {
- 87 1 }
- 88
- 89 void Int_5(void) interrupt 5 using 0
- 90 {
- 91 1 }
- 92
- 93 //***********************************************************************
- 94 //* *
- 95 //* Routine : Int_Timer0 *
- 96 //* Input : Timer 0 overflow *
- 97 //* Output : Set time up flag *
- 98 //* Function : To set the time up flag *
- 99 //* *
- 100 //***********************************************************************
- 101
- 102 void Int_Timer0(void) interrupt 1 using 0
- 103 {
- 104 1
- 105 1 Kernel_Flag.BITS.Timer_Expired = 1;
- 106 1 }
- 107
- 108 //***********************************************************************
- 109 //* *
- 110 //* Routine : Int Ext 0 *
- 111 //* Input : External Interrupt from ISP1581 *
- 112 //* Output : None *
- 113 //* Function : To read and keep a copy of the interrupt source of *
- 114 //* ISP1581 *
- 115 //***********************************************************************
- 116
- 117 void Int_Ext_0(void) interrupt 0 using 1
- C51 COMPILER V7.06 ISR 07/02/2003 10:05:12 PAGE 3
- 118 {
- 119 1
- 120 1 //read in USB interrupt register and keep a copy
- 121 1 // USB_Interrupt = D14_Cntrl_Reg.D14_INT.VALUE;
- 122 1 // USB_Int_Flag.VALUE |= USB_Interrupt;
- 123 1
- 124 1 //读取ISP1581中断寄存器
- 125 1 USB_Int_Flag.VALUE |= D14_Cntrl_Reg.D14_INT.VALUE;
- 126 1 //回写ISP1581中断寄存器
- 127 1 D14_Cntrl_Reg.D14_INT.VALUE = USB_Int_Flag.VALUE;
- 128 1
- 129 1 // if (USB_Int_Flag.BITS.EP1RX)
- 130 1 // USB_Int_Flag.BITS.EP1RX = 0;
- 131 1
- 132 1 //总线复位处理
- 133 1 if(USB_Int_Flag.BITS.RESET)
- 134 1 {
- 135 2 //清除总线复位中断位
- 136 2 USB_Int_Flag.BITS.RESET = 0;
- 137 2 //设置总线复位标志
- 138 2 Kernel_Flag.BITS.Bus_Reset = 1;
- 139 2
- 140 2 PIO_Count = 64;
- 141 2
- 142 2 //切换到全速模式
- 143 2 HS_FS_LED = FULL_SPEED_LED;
- 144 2 Kernel_Flag.BITS.HS_FS_State = FULL_SPEED;
- 145 2 //初始化ISP1581
- 146 2 Init_D14();
- 147 2 //设置softconnect
- 148 2 D14_Cntrl_Reg.D14_MODE.BITS.SOFTCT = 1;
- 149 2 }
- 150 1
- 151 1 }
- MODULE INFORMATION: STATIC OVERLAYABLE
- CODE SIZE = 155 ----
- CONSTANT SIZE = ---- ----
- XDATA SIZE = ---- ----
- PDATA SIZE = ---- ----
- DATA SIZE = 7 ----
- IDATA SIZE = 2 ----
- BIT SIZE = ---- ----
- END OF MODULE INFORMATION.
- C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)