library

Dependents:   USB_CDC_MSD_Hello

Committer:
sherckuith
Date:
Fri Aug 24 02:01:51 2012 +0000
Revision:
0:d5bb9a9c3e24
[mbed] converted /USB_CDC_MSD_Hello/USBDevice

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sherckuith 0:d5bb9a9c3e24 1 /* USBEndpoints.h */
sherckuith 0:d5bb9a9c3e24 2 /* USB endpoint configuration */
sherckuith 0:d5bb9a9c3e24 3 /* Copyright (c) 2011 ARM Limited. All rights reserved. */
sherckuith 0:d5bb9a9c3e24 4
sherckuith 0:d5bb9a9c3e24 5 #ifndef USBENDPOINTS_H
sherckuith 0:d5bb9a9c3e24 6 #define USBENDPOINTS_H
sherckuith 0:d5bb9a9c3e24 7
sherckuith 0:d5bb9a9c3e24 8 /* SETUP packet size */
sherckuith 0:d5bb9a9c3e24 9 #define SETUP_PACKET_SIZE (8)
sherckuith 0:d5bb9a9c3e24 10
sherckuith 0:d5bb9a9c3e24 11 /* Options flags for configuring endpoints */
sherckuith 0:d5bb9a9c3e24 12 #define DEFAULT_OPTIONS (0)
sherckuith 0:d5bb9a9c3e24 13 #define SINGLE_BUFFERED (1U << 0)
sherckuith 0:d5bb9a9c3e24 14 #define ISOCHRONOUS (1U << 1)
sherckuith 0:d5bb9a9c3e24 15 #define RATE_FEEDBACK_MODE (1U << 2) /* Interrupt endpoints only */
sherckuith 0:d5bb9a9c3e24 16
sherckuith 0:d5bb9a9c3e24 17 /* Endpoint transfer status, for endpoints > 0 */
sherckuith 0:d5bb9a9c3e24 18 typedef enum {
sherckuith 0:d5bb9a9c3e24 19 EP_COMPLETED, /* Transfer completed */
sherckuith 0:d5bb9a9c3e24 20 EP_PENDING, /* Transfer in progress */
sherckuith 0:d5bb9a9c3e24 21 EP_INVALID, /* Invalid parameter */
sherckuith 0:d5bb9a9c3e24 22 EP_STALLED, /* Endpoint stalled */
sherckuith 0:d5bb9a9c3e24 23 } EP_STATUS;
sherckuith 0:d5bb9a9c3e24 24
sherckuith 0:d5bb9a9c3e24 25 /* Include configuration for specific target */
sherckuith 0:d5bb9a9c3e24 26 #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
sherckuith 0:d5bb9a9c3e24 27 #include "USBEndpoints_LPC17_LPC23.h"
sherckuith 0:d5bb9a9c3e24 28 #elif defined(TARGET_LPC11U24)
sherckuith 0:d5bb9a9c3e24 29 #include "USBEndpoints_LPC11U.h"
sherckuith 0:d5bb9a9c3e24 30 #else
sherckuith 0:d5bb9a9c3e24 31 #error "Unknown target type"
sherckuith 0:d5bb9a9c3e24 32 #endif
sherckuith 0:d5bb9a9c3e24 33
sherckuith 0:d5bb9a9c3e24 34 #endif