USB Mouse (relative) example for mbed NXP LPC11U24 beta
USB_HID_STACK/USBEndpoints.h@1:e089be2a6aa1, 2011-11-09 (annotated)
- Committer:
- chris
- Date:
- Wed Nov 09 15:55:10 2011 +0000
- Revision:
- 1:e089be2a6aa1
- Parent:
- 0:163560051396
removed include for <math.h> that is already included by mbed.h
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chris | 0:163560051396 | 1 | /* USBEndpoints.h */ |
chris | 0:163560051396 | 2 | /* USB endpoint configuration */ |
chris | 0:163560051396 | 3 | /* Copyright (c) 2011 ARM Limited. All rights reserved. */ |
chris | 0:163560051396 | 4 | |
chris | 0:163560051396 | 5 | #ifndef USB_ENDPOINTS |
chris | 0:163560051396 | 6 | #define USB_ENDPOINTS |
chris | 0:163560051396 | 7 | |
chris | 0:163560051396 | 8 | /* SETUP packet size */ |
chris | 0:163560051396 | 9 | #define SETUP_PACKET_SIZE (8) |
chris | 0:163560051396 | 10 | |
chris | 0:163560051396 | 11 | /* Options flags for configuring endpoints */ |
chris | 0:163560051396 | 12 | #define DEFAULT_OPTIONS (0) |
chris | 0:163560051396 | 13 | #define SINGLE_BUFFERED (1U << 0) |
chris | 0:163560051396 | 14 | #define ISOCHRONOUS (1U << 1) |
chris | 0:163560051396 | 15 | #define RATE_FEEDBACK_MODE (1U << 2) /* Interrupt endpoints only */ |
chris | 0:163560051396 | 16 | |
chris | 0:163560051396 | 17 | /* Endpoint transfer status, for endpoints > 0 */ |
chris | 0:163560051396 | 18 | typedef enum { |
chris | 0:163560051396 | 19 | EP_COMPLETED, /* Transfer completed */ |
chris | 0:163560051396 | 20 | EP_PENDING, /* Transfer in progress */ |
chris | 0:163560051396 | 21 | EP_INVALID, /* Invalid parameter */ |
chris | 0:163560051396 | 22 | EP_STALLED, /* Endpoint stalled */ |
chris | 0:163560051396 | 23 | } EP_STATUS; |
chris | 0:163560051396 | 24 | |
chris | 0:163560051396 | 25 | /* Include configuration for specific target */ |
chris | 0:163560051396 | 26 | #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) |
chris | 0:163560051396 | 27 | #include "USBEndpoints_LPC17_LPC23.h" |
chris | 0:163560051396 | 28 | #elif defined(TARGET_LPC11U24) |
chris | 0:163560051396 | 29 | #include "USBEndpoints_LPC11U.h" |
chris | 0:163560051396 | 30 | #else |
chris | 0:163560051396 | 31 | #error "Unknown target type" |
chris | 0:163560051396 | 32 | #endif |
chris | 0:163560051396 | 33 | |
chris | 0:163560051396 | 34 | #endif |