|
47 | 47 | #include <stdbool.h>
|
48 | 48 | #include <stdint.h>
|
49 | 49 |
|
50 |
| -#include "system.h" |
51 |
| -#include "system_config.h" |
52 |
| - |
53 | 50 | // *****************************************************************************
|
54 | 51 | // *****************************************************************************
|
55 | 52 | // Section: USB Constants
|
@@ -465,108 +462,6 @@ stalled (ie. bit 0 = EP0, bit 1 = EP1, etc.)
|
465 | 462 |
|
466 | 463 | typedef bool (*USB_EVENT_HANDLER) ( USB_EVENT event, void *data, unsigned int size );
|
467 | 464 |
|
468 |
| - |
469 |
| -// ***************************************************************************** |
470 |
| -// ***************************************************************************** |
471 |
| -// Section: USB Application Program Interface (API) Routines |
472 |
| -// ***************************************************************************** |
473 |
| -// ***************************************************************************** |
474 |
| - |
475 |
| -/**************************************************************************** |
476 |
| - Function: |
477 |
| - bool USBInitialize ( unsigned long flags ) |
478 |
| -
|
479 |
| - Summary: |
480 |
| - This interface initializes the variables of the USB host stack. |
481 |
| -
|
482 |
| - Description: |
483 |
| - This interface initializes the USB stack. |
484 |
| -
|
485 |
| - Precondition: |
486 |
| - None |
487 |
| -
|
488 |
| - Parameters: |
489 |
| - flags - reserved |
490 |
| -
|
491 |
| - Return Values: |
492 |
| - true - Initialization successful |
493 |
| - false - Initialization failure |
494 |
| -
|
495 |
| - Remarks: |
496 |
| - This interface is implemented as a macro that can be defined by the |
497 |
| - application or by default is defined correctly for the stack mode. |
498 |
| - |
499 |
| - ***************************************************************************/ |
500 |
| - |
501 |
| -#ifndef USBInitialize |
502 |
| - #if defined( USB_SUPPORT_DEVICE ) |
503 |
| - #if defined( USB_SUPPORT_HOST ) |
504 |
| - #if defined( USB_SUPPORT_OTG ) |
505 |
| - #error "USB OTG is not yet supported." |
506 |
| - #else |
507 |
| - #define USBInitialize(f) \ |
508 |
| - (USBDEVInitialize(f) && USBHostInit(f)) ? \ |
509 |
| - true : false |
510 |
| - #endif |
511 |
| - #else |
512 |
| - #define USBInitialize(f) USBDeviceInit() |
513 |
| - #endif |
514 |
| - #else |
515 |
| - #if defined( USB_SUPPORT_HOST ) |
516 |
| - #define USBInitialize(f) USBHostInit(f) |
517 |
| - #else |
518 |
| - #error "Application must define support mode in usb_config.h" |
519 |
| - #endif |
520 |
| - #endif |
521 |
| -#endif |
522 |
| - |
523 |
| - |
524 |
| -/**************************************************************************** |
525 |
| - Function: |
526 |
| - void USBTasks( void ) |
527 |
| -
|
528 |
| - Summary: |
529 |
| - This function executes the tasks for USB operation. |
530 |
| -
|
531 |
| - Description: |
532 |
| - This function executes the tasks for USB host operation. It must be |
533 |
| - executed on a regular basis to keep everything functioning. |
534 |
| -
|
535 |
| - Precondition: |
536 |
| - USBInitialize() has been called. |
537 |
| -
|
538 |
| - Parameters: |
539 |
| - None |
540 |
| -
|
541 |
| - Returns: |
542 |
| - None |
543 |
| -
|
544 |
| - Remarks: |
545 |
| - This interface is implemented as a macro that can be defined by the |
546 |
| - application or by default is defined correctly for the stack mode. |
547 |
| - |
548 |
| - ***************************************************************************/ |
549 |
| - |
550 |
| -#ifndef USBTasks // Implemented as a macro that can be overridden. |
551 |
| - #if defined( USB_SUPPORT_DEVICE ) |
552 |
| - #if defined( USB_SUPPORT_HOST ) |
553 |
| - #if defined( USB_SUPPORT_OTG ) |
554 |
| - #error "USB OTG is not yet supported." |
555 |
| - #else |
556 |
| - #define USBTasks() {USBHostTasks(); USBHALHandleBusEvent();} |
557 |
| - #endif |
558 |
| - #else |
559 |
| - #define USBTasks() USBDeviceTasks() |
560 |
| - #endif |
561 |
| - #else |
562 |
| - #if defined( USB_SUPPORT_HOST ) |
563 |
| - #define USBTasks() USBHostTasks() |
564 |
| - #else |
565 |
| - #error "Application must define support mode in usb_config.h" |
566 |
| - #endif |
567 |
| - #endif |
568 |
| -#endif |
569 |
| - |
570 | 465 | #define USB_PING_PONG__NO_PING_PONG 0x00 //0b00
|
571 | 466 | #define USB_PING_PONG__EP0_OUT_ONLY 0x01 //0b01
|
572 | 467 | #define USB_PING_PONG__FULL_PING_PONG 0x02 //0b10
|
|
0 commit comments