📄 periph.lst
字号:
252 2 EP6AUTOINLENH = 0x02; //ep6 auto commit length 512
253 2 SYNCDELAY;
254 2 EP6AUTOINLENL = 0x00;
255 2 SYNCDELAY;
256 2 }
257 1 else
258 1 {
259 2 SYNCDELAY; //
260 2 EP2AUTOINLENH = 0x00; //ep2 auto commit length 64
261 2 SYNCDELAY;
262 2 EP2AUTOINLENL = 0x40;
263 2 SYNCDELAY;
264 2 EP6AUTOINLENH = 0x00; //ep6 auto commit length 64
265 2 SYNCDELAY;
266 2 EP6AUTOINLENL = 0x40;
267 2 SYNCDELAY;
268 2 }
269 1 return(TRUE); // Handled by user code
270 1 }
271
272 BOOL DR_GetConfiguration(void) // Called when a Get Configuration command is received
273 {
274 1 EP0BUF[0] = Configuration;
275 1 EP0BCH = 0;
276 1 EP0BCL = 1;
277 1 return(TRUE); // Handled by user code
278 1 }
279
280 BOOL DR_SetInterface(void) // Called when a Set Interface command is received
281 {
282 1 AlternateSetting = SETUPDAT[2];
283 1 return(TRUE); // Handled by user code
284 1 }
285
286 BOOL DR_GetInterface(void) // Called when a Set Interface command is received
287 {
288 1 EP0BUF[0] = AlternateSetting;
289 1 EP0BCH = 0;
290 1 EP0BCL = 1;
291 1 return(TRUE); // Handled by user code
292 1 }
293
294 BOOL DR_GetStatus(void)
295 {
296 1 return(TRUE);
297 1 }
298
299 BOOL DR_ClearFeature(void)
300 {
301 1 return(TRUE);
302 1 }
303
C51 COMPILER V7.10 PERIPH 11/13/2005 15:55:34 PAGE 6
304 BOOL DR_SetFeature(void)
305 {
306 1 return(TRUE);
307 1 }
308
309 BOOL DR_VendorCmnd(void)
310 {
311 1 return(FALSE);
312 1 }
313
314 //-----------------------------------------------------------------------------
315 // USB Interrupt Handlers
316 // The following functions are called by the USB interrupt jump table.
317 //-----------------------------------------------------------------------------
318
319 // Setup Data Available Interrupt Handler
320 void ISR_Sudav(void) interrupt 0
321 {
322 1 GotSUD = TRUE; // Set flag
323 1 EZUSB_IRQ_CLEAR();
324 1 USBIRQ = bmSUDAV; // Clear SUDAV IRQ
325 1 }
326
327 // Setup Token Interrupt Handler
328 void ISR_Sutok(void) interrupt 0
329 {
330 1 EZUSB_IRQ_CLEAR();
331 1 USBIRQ = bmSUTOK; // Clear SUTOK IRQ
332 1 }
333
334 void ISR_Sof(void) interrupt 0
335 {
336 1 EZUSB_IRQ_CLEAR();
337 1 USBIRQ = bmSOF; // Clear SOF IRQ
338 1 }
339
340 void ISR_Ures(void) interrupt 0
341 {
342 1 // whenever we get a USB reset, we should revert to full speed mode
343 1 pConfigDscr = pFullSpeedConfigDscr;
344 1 ((CONFIGDSCR xdata *) pConfigDscr)->type = CONFIG_DSCR;
345 1 pOtherConfigDscr = pHighSpeedConfigDscr;
346 1 ((CONFIGDSCR xdata *) pOtherConfigDscr)->type = OTHERSPEED_DSCR;
347 1 High_Full_Flag = 0;
348 1
349 1 EZUSB_IRQ_CLEAR();
350 1 USBIRQ = bmURES; // Clear URES IRQ
351 1 }
352
353 void ISR_Susp(void) interrupt 0
354 {
355 1 Sleep = TRUE;
356 1 EZUSB_IRQ_CLEAR();
357 1 USBIRQ = bmSUSP;
358 1 }
359
360 void ISR_Highspeed(void) interrupt 0
361 {
362 1 if (EZUSB_HIGHSPEED())
363 1 {
364 2 pConfigDscr = pHighSpeedConfigDscr;
365 2 ((CONFIGDSCR xdata *) pConfigDscr)->type = CONFIG_DSCR;
C51 COMPILER V7.10 PERIPH 11/13/2005 15:55:34 PAGE 7
366 2 pOtherConfigDscr = pFullSpeedConfigDscr;
367 2 ((CONFIGDSCR xdata *) pOtherConfigDscr)->type = OTHERSPEED_DSCR;
368 2 High_Full_Flag = 1;
369 2 }
370 1
371 1 EZUSB_IRQ_CLEAR();
372 1 USBIRQ = bmHSGRANT;
373 1 }
374 /*void ISR_Ep0ack(void) interrupt 0
375 {
376 }
377 void ISR_Stub(void) interrupt 0
378 {
379 }
380 void ISR_Ep0in(void) interrupt 0
381 {
382 }
383 void ISR_Ep0out(void) interrupt 0
384 {
385 }
386 void ISR_Ep1in(void) interrupt 0
387 {
388 }
389 void ISR_Ep1out(void) interrupt 0
390 {
391 }
392 void ISR_Ep2inout(void) interrupt 0
393 {
394 }
395 void ISR_Ep4inout(void) interrupt 0
396 {
397 }
398 void ISR_Ep6inout(void) interrupt 0
399 {
400 }
401 void ISR_Ep8inout(void) interrupt 0
402 {
403 }
404 void ISR_Ibn(void) interrupt 0
405 {
406 }
407 void ISR_Ep0pingnak(void) interrupt 0
408 {
409 }
410 void ISR_Ep1pingnak(void) interrupt 0
411 {
412 }
413 void ISR_Ep2pingnak(void) interrupt 0
414 {
415 }
416 void ISR_Ep4pingnak(void) interrupt 0
417 {
418 }
419 void ISR_Ep6pingnak(void) interrupt 0
420 {
421 }
422 void ISR_Ep8pingnak(void) interrupt 0
423 {
424 }
425 void ISR_Errorlimit(void) interrupt 0
426 {
427 }
C51 COMPILER V7.10 PERIPH 11/13/2005 15:55:34 PAGE 8
428 void ISR_Ep2piderror(void) interrupt 0
429 {
430 }
431 void ISR_Ep4piderror(void) interrupt 0
432 {
433 }
434 void ISR_Ep6piderror(void) interrupt 0
435 {
436 }
437 void ISR_Ep8piderror(void) interrupt 0
438 {
439 }
440 void ISR_Ep2pflag(void) interrupt 0
441 {
442 }
443 void ISR_Ep4pflag(void) interrupt 0
444 {
445 }
446 void ISR_Ep6pflag(void) interrupt 0
447 {
448 }
449 void ISR_Ep8pflag(void) interrupt 0
450 {
451 }
452 void ISR_Ep2eflag(void) interrupt 0
453 {
454 }
455 void ISR_Ep4eflag(void) interrupt 0
456 {
457 }
458 void ISR_Ep6eflag(void) interrupt 0
459 {
460 }
461 void ISR_Ep8eflag(void) interrupt 0
462 {
463 }
464 void ISR_Ep2fflag(void) interrupt 0
465 {
466 }
467 void ISR_Ep4fflag(void) interrupt 0
468 {
469 }
470 void ISR_Ep6fflag(void) interrupt 0
471 {
472 }
473 void ISR_Ep8fflag(void) interrupt 0
474 {
475 }*/
476 void ISR_GpifComplete(void) interrupt 0
477 {
478 1 WORD xdata *pTemp_gpif;
479 1 GpifFinishFlag = 1;
480 1 if(PowerDown_Flag == 0)
481 1 {
482 2 if(GpifReadWriteFlag == 1)
483 2 {
484 3 Peripheral_SingleWordRead(pTemp_gpif);
485 3 // GpifReadWriteFlag = 0; //write
486 3 }
487 2 }
488 1 EXIF &= ~0x40;
489 1 INT4CLR = 0xFF; // automatically enabled at POR
C51 COMPILER V7.10 PERIPH 11/13/2005 15:55:34 PAGE 9
490 1 }
491 void ISR_GpifWaveform(void) interrupt 0
492 {
493 1 EXIF &= ~0x40;
494 1 INT4CLR = 0xFF; // automatically enabled at POR
495 1 }
496
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 875 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 8 15
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 + -