Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers USBEndpoints.h Source File

USBEndpoints.h

00001 /* USBEndpoints.h */
00002 /* USB endpoint configuration */
00003 /* Copyright (c) 2011 ARM Limited. All rights reserved. */
00004 
00005 #ifndef USB_ENDPOINTS
00006 #define USB_ENDPOINTS
00007 
00008 /* SETUP packet size */
00009 #define SETUP_PACKET_SIZE (8)
00010 
00011 /* Options flags for configuring endpoints */
00012 #define DEFAULT_OPTIONS     (0)
00013 #define SINGLE_BUFFERED     (1U << 0)
00014 #define ISOCHRONOUS         (1U << 1)
00015 #define RATE_FEEDBACK_MODE  (1U << 2) /* Interrupt endpoints only */
00016 
00017 /* Endpoint transfer status, for endpoints > 0 */
00018 typedef enum {
00019     EP_COMPLETED,   /* Transfer completed */
00020     EP_PENDING,     /* Transfer in progress */
00021     EP_INVALID,     /* Invalid parameter */
00022     EP_STALLED,     /* Endpoint stalled */
00023 } EP_STATUS;
00024 
00025 /* Include configuration for specific target */
00026 #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
00027 #include "USBEndpoints_LPC17_LPC23.h"
00028 #elif defined(TARGET_LPC11U24)
00029 #include "USBEndpoints_LPC11U.h"
00030 #else
00031 #error "Unknown target type"
00032 #endif
00033 
00034 #endif