📄 iso.lst
字号:
C51 COMPILER V8.01 ISO 04/20/2006 14:46:05 PAGE 1
C51 COMPILER V8.01, COMPILATION OF MODULE ISO
OBJECT MODULE PLACED IN ISO.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ISO.C BROWSE DEBUG OBJECTEXTEND
line level source
1 /*
2 //*************************************************************************
3 //
4 // P H I L I P S P R O P R I E T A R Y
5 //
6 // COPYRIGHT (c) 1997 BY PHILIPS SINGAPORE.
7 // -- ALL RIGHTS RESERVED --
8 //
9 // File Name: TWAIN.C
10 // Author: Wenkai Du
11 // Created: 18 Aug 98
12 // Modified:
13 // Revision: 1.0
14 //
15 //*************************************************************************
16 */
17
18 #include <stdio.h>
19 #include <string.h>
20
21 #ifdef __C51__
22 //#include <reg51.h> /* special function register declarations */
23 #include "hardware.h"
24 #else
#include <dos.h>
#endif
27
28 #include "d12ci.h"
29 #include "mainloop.h"
30 #include "usb100.h"
31 #include "chap_9.h"
32 #include "iso.h"
33
34 extern CONTROL_XFER ControlData;
35 extern IO_REQUEST idata ioRequest;
36 extern EPPFLAGS bEPPflags;
37
38 unsigned char c1,c2;
39
40 unsigned char IsoDisable =1;
41 unsigned char IsoMode = 0; //ISO_IN|ISO_OUT;
42 unsigned char IsoOutPattern=0xF0;
43 unsigned char IsoOutPktLen=0;
44 unsigned char IsoOutDataBuff[4];
45 unsigned char IsoInPattern=0xF8;
46 unsigned char IsoInPktLen=0;
47 unsigned char IsoInDataBuff[4];
48
49 void EnableIsoMode()
50 {
51 1 if( ControlData.DeviceRequest.wLength == 0)
52 1 {
53 2 IsoMode &= ~ControlData.DeviceRequest.wIndex;
54 2 IsoMode |= ControlData.DeviceRequest.wValue;
55 2
C51 COMPILER V8.01 ISO 04/20/2006 14:46:05 PAGE 2
56 2 printf("IsoMode %x\n",IsoMode );
57 2
58 2 if(IsoMode&ISO_LOOP)
59 2 {
60 3 IsoDisable =0;
61 3 IsoInPattern = 0;
62 3 IsoInPktLen = 17;
63 3 D12_SetEndpointStatus(5,0);
64 3 IsoOutPattern = 0;
65 3 IsoOutPktLen = 17;
66 3 D12_SetEndpointStatus(4,0);
67 3 }
68 2 else
69 2 {
70 3 if(IsoMode&ISO_IN)
71 3 {
72 4 IsoDisable =0;
73 4
74 4
75 4 IsoInPattern = 0xf8;
76 4 IsoInPktLen = 17;
77 4 D12_SetEndpointStatus(5,0);
78 4
79 4 printf("Iso-In Pattern %x, PktLen %x\n",IsoInPattern,IsoInPktLen);
80 4 memset(IsoInDataBuff,IsoInPattern,IsoInPktLen );
81 4 D12_WriteEndpoint(5,IsoInDataBuff,IsoInPktLen);
82 4 IsoInPattern ++ ;
83 4
84 4 printf("Iso-In Pattern %x, PktLen %x\n",IsoInPattern,IsoInPktLen);
85 4 memset(IsoInDataBuff,IsoInPattern,IsoInPktLen );
86 4 D12_WriteEndpoint(5,IsoInDataBuff,IsoInPktLen);
87 4 IsoInPattern ++ ;
88 4
89 4 }
90 3
91 3 if(IsoMode&ISO_OUT)
92 3 {
93 4 IsoDisable =0;
94 4 IsoOutPattern = 0;
95 4 IsoOutPktLen = 17;
96 4 D12_SetEndpointStatus(4,0);
97 4 }
98 3
99 3 }
100 2 single_transmit(0, 0);
101 2
102 2 }
103 1
104 1 else
105 1 stall_ep0();
106 1 }
107
108 #ifndef __C51__
void Wait4Ns( unsigned long timeNs)
{
unsigned long i;
for(i=0; i<timeNs; i++)
;
}
#endif
C51 COMPILER V8.01 ISO 04/20/2006 14:46:05 PAGE 3
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 198 ----
CONSTANT SIZE = 42 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 16 ----
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 + -