📄 xxgisr.lst
字号:
192 4 if(ControlData.DeviceRequest.wLength > MAX_CONTROLDATA_SIZE) {
193 5 bEPPflags.bits.control_state = USB_IDLE;
194 5 D12_SetEndpointStatus(0, 1);
195 5 D12_SetEndpointStatus(1, 1);
196 5 }
197 4 else {
198 5 bEPPflags.bits.control_state = USB_RECEIVE; /* set command with OUT token */
199 5 }
200 4 } // set command with data
201 3 } // else set command
202 2 } // if setup packet
203 1
204 1 else if (bEPPflags.bits.control_state == USB_RECEIVE) {
205 2 i = D12_ReadEndpoint(0, EP0_PACKET_SIZE,
206 2 ControlData.dataBuffer + ControlData.wCount);
207 2
208 2 ControlData.wCount += i;
209 2 if( i != EP0_PACKET_SIZE || ControlData.wCount >= ControlData.wLength) {
210 3 bEPPflags.bits.setup_packet = 1;
211 3 bEPPflags.bits.control_state = USB_IDLE;
212 3 }
213 2 }
214 1
215 1 else {
216 2 bEPPflags.bits.control_state = USB_IDLE;
217 2 }
218 1
219 1 }
220 //----------------------------------
221 void ep0_txdone(void)
222 {
223 1 short i = ControlData.wLength - ControlData.wCount;
224 1
225 1 D12_ReadLastTransactionStatus(1); // Clear interrupt flag
226 1
227 1 if (bEPPflags.bits.control_state != USB_TRANSMIT)
228 1 return;
229 1 //-------------------------
230 1 if( i >= EP0_PACKET_SIZE) {
231 2 D12_WriteEndpoint(1, EP0_PACKET_SIZE, ControlData.pData + ControlData.wCount);
232 2 ControlData.wCount += EP0_PACKET_SIZE;
233 2
234 2 bEPPflags.bits.control_state = USB_TRANSMIT;
235 2 }
236 1 else if( i != 0) {
237 2 D12_WriteEndpoint(1, i, ControlData.pData + ControlData.wCount);
238 2 ControlData.wCount += i;
239 2
240 2 bEPPflags.bits.control_state = USB_IDLE;
C51 COMPILER V7.02b XXGISR 03/17/2005 23:11:50 PAGE 5
241 2 }
242 1 else if (i == 0){
243 2 D12_WriteEndpoint(1, 0, 0); // Send zero packet at the end ???
244 2
245 2 bEPPflags.bits.control_state = USB_IDLE;
246 2 }
247 1
248 1 }
249 //----------------------------------
250 void ep1_txdone(void)
251 {
252 1 D12_ReadLastTransactionStatus(3); /* Clear interrupt flag */
253 1 }
254
255 void ep1_rxdone(void)
256 {
257 1 unsigned char len;
258 1
259 1 D12_ReadLastTransactionStatus(2); /* Clear interrupt flag */
260 1
261 1 len = D12_ReadEndpoint(2, sizeof(GenEpBuf), GenEpBuf);
262 1
263 1 if(len != 0)
264 1 bEPPflags.bits.ep1_rxdone = 1;
265 1 }
266 //---------------------------------
267 void main_txdone(void)
268 {
269 1 unsigned char len;
270 1
271 1 D12_ReadLastTransactionStatus(5); /* Clear interrupt flag */
272 1
273 1 len = ioSize - ioCount;
274 1 if(len == 0) {
275 2 if(bEPPflags.bits.dma_state == DMA_PENDING)
276 2 bEPPflags.bits.setup_dma ++;
277 2 else
278 2 bEPPflags.bits.dma_state = DMA_IDLE;
279 2 }
280 1 else {
281 2 if(len > 64)
282 2 len = 64;
283 2 if(bNoRAM)
284 2 len = D12_WriteEndpoint(5, len, EpBuf + ioCount);
285 2 else
286 2 len = D12_WriteEndpoint(5, len, MainEpBuf + ioCount);
287 2 ioCount += len;
288 2 }
289 1 }
290
291 void main_rxdone(void)
292 {
293 1 unsigned char len;
294 1
295 1 D12_ReadLastTransactionStatus(4); /* Clear interrupt flag */
296 1
297 1 if(bNoRAM)
298 1 len = D12_ReadEndpoint(4, 64, EpBuf + ioCount);
299 1 else
300 1 len = D12_ReadEndpoint(4, 64, MainEpBuf + ioCount);
301 1 ioCount += len;
302 1 if(bNoRAM)
C51 COMPILER V7.02b XXGISR 03/17/2005 23:11:50 PAGE 6
303 1 len = D12_ReadEndpoint(4, 64, EpBuf + ioCount);
304 1 else
305 1 len = D12_ReadEndpoint(4, 64, MainEpBuf + ioCount);
306 1 ioCount += len;
307 1 if(ioCount >= ioSize) {
308 2 if(bEPPflags.bits.dma_state == DMA_PENDING)
309 2 bEPPflags.bits.setup_dma ++;
310 2 else
311 2 bEPPflags.bits.dma_state = DMA_IDLE;
312 2 }
313 1
314 1 }
315
C51 COMPILER V7.02b XXGISR 03/17/2005 23:11:50 PAGE 7
NAME CLASS MSPACE TYPE OFFSET SIZE
==== ===== ====== ==== ====== ====
P1 . . . . . . . . . . . . . . . . . . SFR DATA U_CHAR 0090H 1
bNoRAM . . . . . . . . . . . . . . . . EXTERN DATA U_CHAR ----- 1
_IO_REQUEST. . . . . . . . . . . . . . * TAG * ----- STRUCT ----- 6
uAddressL. . . . . . . . . . . . . . MEMBER ----- U_INT 0000H 2
bAddressH. . . . . . . . . . . . . . MEMBER ----- U_CHAR 0002H 1
uSize. . . . . . . . . . . . . . . . MEMBER ----- U_INT 0003H 2
bCommand . . . . . . . . . . . . . . MEMBER ----- U_CHAR 0005H 1
EA . . . . . . . . . . . . . . . . . . ABSBIT ----- BIT 00AFH 1
ULONG. . . . . . . . . . . . . . . . . TYPEDEF ----- U_LONG ----- 4
USB_STRING_DESCRIPTOR. . . . . . . . . TYPEDEF ----- STRUCT ----- 3
bLength. . . . . . . . . . . . . . . MEMBER ----- U_CHAR 0000H 1
bDescriptorType. . . . . . . . . . . MEMBER ----- U_CHAR 0001H 1
bString. . . . . . . . . . . . . . . MEMBER ----- ARRAY 0002H 1
USB_CONFIGURATION_DESCRIPTOR . . . . . TYPEDEF ----- STRUCT ----- 9
bLength. . . . . . . . . . . . . . . MEMBER ----- U_CHAR 0000H 1
bDescriptorType. . . . . . . . . . . MEMBER ----- U_CHAR 0001H 1
wTotalLength . . . . . . . . . . . . MEMBER ----- U_INT 0002H 2
bNumInterfaces . . . . . . . . . . . MEMBER ----- U_CHAR 0004H 1
bConfigurationValue. . . . . . . . . MEMBER ----- U_CHAR 0005H 1
iConfiguration . . . . . . . . . . . MEMBER ----- U_CHAR 0006H 1
bmAttributes . . . . . . . . . . . . MEMBER ----- U_CHAR 0007H 1
MaxPower . . . . . . . . . . . . . . MEMBER ----- U_CHAR 0008H 1
USB_HUB_DESCRIPTOR . . . . . . . . . . TYPEDEF ----- STRUCT ----- 71
bDescriptorLength. . . . . . . . . . MEMBER ----- U_CHAR 0000H 1
bDescriptorType. . . . . . . . . . . MEMBER ----- U_CHAR 0001H 1
bNumberOfPorts . . . . . . . . . . . MEMBER ----- U_CHAR 0002H 1
wHubCharacteristics. . . . . . . . . MEMBER ----- U_INT 0003H 2
bPowerOnToPowerGood. . . . . . . . . MEMBER ----- U_CHAR 0005H 1
bHubControlCurrent . . . . . . . . . MEMBER ----- U_CHAR 0006H 1
bRemoveAndPowerMask. . . . . . . . . MEMBER ----- ARRAY 0007H 64
PUSB_POWER_DESCRIPTOR. . . . . . . . . TYPEDEF ----- PTR ----- 3
size_t . . . . . . . . . . . . . . . . TYPEDEF ----- U_INT ----- 2
USB_ENDPOINT_DESCRIPTOR. . . . . . . . TYPEDEF ----- STRUCT ----- 7
bLength. . . . . . . . . . . . . . . MEMBER ----- U_CHAR 0000H 1
bDescriptorType. . . . . . . . . . . MEMBER ----- U_CHAR 0001H 1
bEndpointAddress . . . . . . . . . . MEMBER ----- U_CHAR 0002H 1
bmAttributes . . . . . . . . . . . . MEMBER ----- U_CHAR 0003H 1
wMaxPacketSize . . . . . . . . . . . MEMBER ----- U_INT 0004H 2
bInterval. . . . . . . . . . . . . . MEMBER ----- U_CHAR 0006H 1
_D12_ReadLastTransactionStatus . . . . EXTERN CODE PROC ----- -----
PUSB_INTERFACE_DESCRIPTOR. . . . . . . TYPEDEF ----- PTR ----- 3
_epp_flags . . . . . . . . . . . . . . * TAG * ----- UNION ----- 2
bits . . . . . . . . . . . . . . . . MEMBER ----- STRUCT 0000H 2
value. . . . . . . . . . . . . . . . MEMBER ----- U_INT 0000H 2
_D12_AcknowledgeEndpoint . . . . . . . EXTERN CODE PROC ----- -----
main_rxdone. . . . . . . . . . . . . . PUBLIC CODE PROC 0000H -----
len. . . . . . . . . . . . . . . . . AUTO DATA U_CHAR 0000H 1
main_txdone. . . . . . . . . . . . . . PUBLIC CODE PROC 0000H -----
len. . . . . . . . . . . . . . . . . * REG * DATA U_CHAR 0005H 1
_USB_POWER_DESCRIPTOR. . . . . . . . . * TAG * ----- STRUCT ----- 18
bLength. . . . . . . . . . . . . . . MEMBER ----- U_CHAR 0000H 1
bDescriptorType. . . . . . . . . . . MEMBER ----- U_CHAR 0001H 1
bCapabilitiesFlags . . . . . . . . . MEMBER ----- U_CHAR 0002H 1
EventNotification. . . . . . . . . . MEMBER ----- U_INT 0003H 2
D1LatencyTime. . . . . . . . . . . . MEMBER ----- U_INT 0005H 2
D2LatencyTime. . . . . . . . . . . . MEMBER ----- U_INT 0007H 2
D3LatencyTime. . . . . . . . . . . . MEMBER ----- U_INT 0009H 2
C51 COMPILER V7.02b XXGISR 03/17/2005 23:11:50 PAGE 8
NAME CLASS MSPACE TYPE OFFSET SIZE
==== ===== ====== ==== ====== ====
PowerUnit. . . . . . . . . . . . . . MEMBER ----- U_CHAR 000BH 1
D0PowerConsumption . . . . . . . . . MEMBER ----- U_INT 000CH 2
D1PowerConsumption . . . . . . . . . MEMBER ----- U_INT 000EH 2
D2PowerConsumption . . . . . . . . . MEMBER ----- U_INT 0010H 2
_USB_INTERFACE_DESCRIPTOR. . . . . . . * TAG * ----- STRUCT ----- 9
bLength. . . . . . . . . . . . . . . MEMBER ----- U_CHAR 0000H 1
bDescriptorType. . . . . . . . . . . MEMBER ----- U_CHAR 0001H 1
bInterfaceNumber . . . . . . . . . . MEMBER ----- U_CHAR 0002H 1
bAlternateSetting. . . . . . . . . . MEMBER ----- U_CHAR 0003H 1
bNumEndpoints. . . . . . . . . . . . MEMBER ----- U_CHAR 0004H 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -