📄 isr.lst
字号:
236
C51 COMPILER V7.06 ISR 08/18/2005 15:30:29 PAGE 5
237
238 void Isr_Ep01Done(void)
239 {
240 1 /*
241 1 UCHAR c;
242 1 c = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP01);
243 1 */
244 1 }
245
246
247 void Isr_Ep02Done(void)
248 {
249 1 /*
250 1 HAR c;
251 1 c = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP02);
252 1 */
253 1
254 1 }
255
256
257 void Isr_Ep03Done(void)
258 {
259 1 UCHAR ep_last;
260 1 ep_last = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP03); /* Clear interrupt flag*/
261 1 /*
262 1 UCHAR ep_last, DoubleBuff=1;
263 1 UCHAR len;
264 1 USHORT far *fp;
265 1 USHORT seg, off;
266 1
267 1 ep_last = (UCHAR)Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP03); // Clear interrupt flag
268 1
269 1 // Check for Double Buffer Condition
270 1 if((ep_last & 0x60) == 0x60)
271 1 DoubleBuff = 2;
272 1 else
273 1 DoubleBuff = 1;
274 1
275 1 if (!(ep_last & (D13REG_EPSTS_DBF0|D13REG_EPSTS_DBF1)) || (ep_last & 0x80))
276 1 {
277 1 printf("ep_last = %x, \n", ep_last);
278 1 return ;
279 1 }
280 1 else //Data Out Packet
281 1 {
282 1 while(DoubleBuff)
283 1 {
284 1 if (ioCount <= ioSize)
285 1 {
286 1 // Initialise the pointer
287 1 seg = (ioBuffer + ioCount)>>4;
288 1 off = (ioBuffer + ioCount)&0xf;
289 1 fp = MK_FP(seg, off);
290 1
291 1 // Determine the Transfer length
292 1 if((ioSize-ioCount) >64)
293 1 len = 64;
294 1 else
295 1 {
296 1 len = ioSize - ioCount;
297 1 if(bD13flags.bits.dma_state == DMA_PENDING)
298 1 bD13flags.bits.setup_dma = 1;
C51 COMPILER V7.06 ISR 08/18/2005 15:30:29 PAGE 6
299 1 else
300 1 bD13flags.bits.dma_state = DMA_IDLE;
301 1 }
302 1 // Read in Data from Endpoint, and update the ioCount
303 1 ioCount += Hal4D13_ReadBulkEndpoint(EPINDEX4EP03, fp, len);
304 1 }
305 1 else
306 1 {
307 1 Hal4D13_ClearBuffer(EPINDEX4EP03);
308 1 if(bD13flags.bits.dma_state == DMA_PENDING)
309 1 bD13flags.bits.setup_dma = 1;
310 1 else
311 1 bD13flags.bits.dma_state = DMA_IDLE;
312 1 }
313 1 DoubleBuff --;
314 1
315 1 if(DoubleBuff == 1)
316 1 ep_last = (UCHAR)Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP03); // Clear interrupt flag
317 1 }
318 1 }
319 1 */
320 1 }
321
322
323 void Isr_Ep04Done(void)
324 {
325 1 UCHAR ep_last;
326 1 ep_last = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP04); /* Clear interrupt flag*/
327 1 /*
328 1 USHORT len;
329 1 USHORT far *fp;
330 1 USHORT seg, off;
331 1 UCHAR DoubleBuff=0;
332 1 UCHAR ep_last;
333 1
334 1 ep_last = (UCHAR)Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP04); // Clear interrupt flag
335 1
336 1 if((ep_last & (D13REG_EPSTS_DBF0|D13REG_EPSTS_DBF1)) == 0x00)
337 1 DoubleBuff = 2;
338 1 else
339 1 DoubleBuff = 1;
340 1
341 1 if((ep_last & (D13REG_EPSTS_DBF0|D13REG_EPSTS_DBF1)) == 0x60)
342 1 {
343 1 // BUFFER IS NOT EMPTY
344 1 printf("ep_last = %x, \n", ep_last);
345 1 return ;
346 1 }
347 1 else // Data IN Packet
348 1 {
349 1 while(DoubleBuff)
350 1 {
351 1 // Initialise the pointer
352 1 seg = (ioBuffer + ioCount)>>4;
353 1 off = (ioBuffer + ioCount)&0xf;
354 1 fp = MK_FP(seg, off);
355 1
356 1 // Determine the Transfer length
357 1 if(ioSize >= ioCount)
358 1 len = ioSize - ioCount;
359 1
360 1 if(len > 64)
C51 COMPILER V7.06 ISR 08/18/2005 15:30:29 PAGE 7
361 1 {
362 1 ioCount += Hal4D13_WriteBulkEndpoint(EPINDEX4EP04, fp, 64);
363 1 bD13flags.bits.dma_state = DMA_IDLE;
364 1 }
365 1 else if(len >= 1)
366 1 {
367 1 ioCount += Hal4D13_WriteBulkEndpoint(EPINDEX4EP04, fp, len);
368 1 bD13flags.bits.dma_state = DMA_IN_DONE;
369 1 }
370 1
371 1 DoubleBuff--;
372 1 if(DoubleBuff == 1)
373 1 ep_last = (UCHAR)Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP04); // Clear interrupt flag
374 1 }
375 1 }
376 1 */
377 1 }
378
379 void Isr_Ep05Done(void)
380 {
381 1 UCHAR ep_last, DoubleBuff=1;
382 1 USHORT ISO_Buffer[512], len;
383 1
384 1 ep_last = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP05); // Clear interrupt flag
385 1
386 1 if((ep_last & (D13REG_EPSTS_DBF0|D13REG_EPSTS_DBF1)) == 0x00)
387 1 DoubleBuff = 2;
388 1 else
389 1 DoubleBuff = 1;
390 1
391 1 if (ep_last | D13REG_EPSTS_DBF0|D13REG_EPSTS_DBF1)
392 1 {
393 2 return ;
394 2 }
395 1
396 1 else //Data Out Packet
397 1 {
398 2
399 2 if((ep_last & 0x60) != 0x00)
400 2 {
401 3
402 3 if(DoubleBuff == 2)
403 3 {
404 4 while(DoubleBuff)
405 4 {
406 5 len = Hal4D13_ReadISOEndpoint(EPINDEX4EP05, ISO_Buffer, 512);
407 5 Hal4D13_WriteISOEndpoint(EPINDEX4EP06, ISO_Buffer, len);
408 5 DoubleBuff--;
409 5 ep_last = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP05); // Clear interrupt flag
410 5 }
411 4 }
412 3 else
413 3 {
414 4 len = Hal4D13_ReadISOEndpoint(EPINDEX4EP05, ISO_Buffer, 512);
415 4 Hal4D13_WriteISOEndpoint(EPINDEX4EP06, ISO_Buffer, len);
416 4
417 4 }
418 3
419 3 }
420 2 }
421 1 }
*** ERROR C241 IN LINE 421 OF ISR.C: 'Isr_Ep05Done': auto segment too large
C51 COMPILER V7.06 ISR 08/18/2005 15:30:29 PAGE 8
422
423 void Isr_Ep06Done(void)
424 {
425 1 UCHAR ep_last;
426 1 ep_last = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP06); /* Clear interrupt flag*/
427 1 }
428
429
430 void Isr_Ep07Done(void)
431 {
432 1
433 1 // UCHAR c;
434 1 // c = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP07); /* Clear interrupt flag */
435 1
436 1 }
437 void Isr_Ep08Done(void)
438 {
439 1 // UCHAR c;
440 1 // c = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP08); /* Clear interrupt flag */
441 1 }
442 void Isr_Ep09Done(void)
443 {
444 1 // UCHAR c;
445 1 // c = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP09); /* Clear interrupt flag */
446 1 }
447 void Isr_Ep0ADone(void)
448 {
449 1 // UCHAR c;
450 1 // c = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP0A); /* Clear interrupt flag */
451 1 }
452 void Isr_Ep0BDone(void)
453 {
454 1 // UCHAR c;
455 1 // c = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP0B); /* Clear interrupt flag */
456 1 }
457 void Isr_Ep0CDone(void)
458 {
459 1 // UCHAR c;
460 1 // c = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP0C); /* Clear interrupt flag */
461 1 }
462 void Isr_Ep0DDone(void)
463 {
464 1 // UCHAR c;
465 1 // c = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP0D); /* Clear interrupt flag */
466 1 }
467 void Isr_Ep0EDone(void)
468 {
469 1 // UCHAR c;
470 1 // c = Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP0E); /* Clear interrupt flag */
471 1 }
472
473 //*********************************************************************
474 // supporting Functions
475 //*********************************************************************
476
477
478
C51 COMPILATION COMPLETE. 1 WARNING(S), 4 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -