SD card interface
USBDevice/USBDevice/USBEndpoints.h@0:22612ae617a0, 2012-10-08 (annotated)
- Committer:
- lharoon
- Date:
- Mon Oct 08 11:14:07 2012 +0000
- Revision:
- 0:22612ae617a0
1st edition
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lharoon | 0:22612ae617a0 | 1 | /* USBEndpoints.h */ |
lharoon | 0:22612ae617a0 | 2 | /* USB endpoint configuration */ |
lharoon | 0:22612ae617a0 | 3 | /* Copyright (c) 2011 ARM Limited. All rights reserved. */ |
lharoon | 0:22612ae617a0 | 4 | |
lharoon | 0:22612ae617a0 | 5 | #ifndef USBENDPOINTS_H |
lharoon | 0:22612ae617a0 | 6 | #define USBENDPOINTS_H |
lharoon | 0:22612ae617a0 | 7 | |
lharoon | 0:22612ae617a0 | 8 | /* SETUP packet size */ |
lharoon | 0:22612ae617a0 | 9 | #define SETUP_PACKET_SIZE (8) |
lharoon | 0:22612ae617a0 | 10 | |
lharoon | 0:22612ae617a0 | 11 | /* Options flags for configuring endpoints */ |
lharoon | 0:22612ae617a0 | 12 | #define DEFAULT_OPTIONS (0) |
lharoon | 0:22612ae617a0 | 13 | #define SINGLE_BUFFERED (1U << 0) |
lharoon | 0:22612ae617a0 | 14 | #define ISOCHRONOUS (1U << 1) |
lharoon | 0:22612ae617a0 | 15 | #define RATE_FEEDBACK_MODE (1U << 2) /* Interrupt endpoints only */ |
lharoon | 0:22612ae617a0 | 16 | |
lharoon | 0:22612ae617a0 | 17 | /* Endpoint transfer status, for endpoints > 0 */ |
lharoon | 0:22612ae617a0 | 18 | typedef enum { |
lharoon | 0:22612ae617a0 | 19 | EP_COMPLETED, /* Transfer completed */ |
lharoon | 0:22612ae617a0 | 20 | EP_PENDING, /* Transfer in progress */ |
lharoon | 0:22612ae617a0 | 21 | EP_INVALID, /* Invalid parameter */ |
lharoon | 0:22612ae617a0 | 22 | EP_STALLED, /* Endpoint stalled */ |
lharoon | 0:22612ae617a0 | 23 | } EP_STATUS; |
lharoon | 0:22612ae617a0 | 24 | |
lharoon | 0:22612ae617a0 | 25 | /* Include configuration for specific target */ |
lharoon | 0:22612ae617a0 | 26 | #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) |
lharoon | 0:22612ae617a0 | 27 | #include "USBEndpoints_LPC17_LPC23.h" |
lharoon | 0:22612ae617a0 | 28 | #elif defined(TARGET_LPC11U24) |
lharoon | 0:22612ae617a0 | 29 | #include "USBEndpoints_LPC11U.h" |
lharoon | 0:22612ae617a0 | 30 | #else |
lharoon | 0:22612ae617a0 | 31 | #error "Unknown target type" |
lharoon | 0:22612ae617a0 | 32 | #endif |
lharoon | 0:22612ae617a0 | 33 | |
lharoon | 0:22612ae617a0 | 34 | #endif |