CDC/ECM driver for mbed, based on USBDevice by mbed-official. Uses PicoTCP to access Ethernet USB device. License: GPLv2

Dependents:   USBEthernet_TEST

Fork of USB_Ethernet by Daniele Lacamera

Committer:
daniele
Date:
Sat Aug 03 13:16:14 2013 +0000
Revision:
2:540f6e142d59
Moved to single package

Who changed what in which revision?

UserRevisionLine numberNew contents of line
daniele 2:540f6e142d59 1 /* Copyright (c) 2010-2011 mbed.org, MIT License
daniele 2:540f6e142d59 2 *
daniele 2:540f6e142d59 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
daniele 2:540f6e142d59 4 * and associated documentation files (the "Software"), to deal in the Software without
daniele 2:540f6e142d59 5 * restriction, including without limitation the rights to use, copy, modify, merge, publish,
daniele 2:540f6e142d59 6 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
daniele 2:540f6e142d59 7 * Software is furnished to do so, subject to the following conditions:
daniele 2:540f6e142d59 8 *
daniele 2:540f6e142d59 9 * The above copyright notice and this permission notice shall be included in all copies or
daniele 2:540f6e142d59 10 * substantial portions of the Software.
daniele 2:540f6e142d59 11 *
daniele 2:540f6e142d59 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
daniele 2:540f6e142d59 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
daniele 2:540f6e142d59 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
daniele 2:540f6e142d59 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
daniele 2:540f6e142d59 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
daniele 2:540f6e142d59 17 */
daniele 2:540f6e142d59 18
daniele 2:540f6e142d59 19 #ifndef USBENDPOINTS_H
daniele 2:540f6e142d59 20 #define USBENDPOINTS_H
daniele 2:540f6e142d59 21
daniele 2:540f6e142d59 22 /* SETUP packet size */
daniele 2:540f6e142d59 23 #define SETUP_PACKET_SIZE (8)
daniele 2:540f6e142d59 24
daniele 2:540f6e142d59 25 /* Options flags for configuring endpoints */
daniele 2:540f6e142d59 26 #define DEFAULT_OPTIONS (0)
daniele 2:540f6e142d59 27 #define SINGLE_BUFFERED (1U << 0)
daniele 2:540f6e142d59 28 #define ISOCHRONOUS (1U << 1)
daniele 2:540f6e142d59 29 #define RATE_FEEDBACK_MODE (1U << 2) /* Interrupt endpoints only */
daniele 2:540f6e142d59 30
daniele 2:540f6e142d59 31 /* Endpoint transfer status, for endpoints > 0 */
daniele 2:540f6e142d59 32 typedef enum {
daniele 2:540f6e142d59 33 EP_COMPLETED, /* Transfer completed */
daniele 2:540f6e142d59 34 EP_PENDING, /* Transfer in progress */
daniele 2:540f6e142d59 35 EP_INVALID, /* Invalid parameter */
daniele 2:540f6e142d59 36 EP_STALLED, /* Endpoint stalled */
daniele 2:540f6e142d59 37 } EP_STATUS;
daniele 2:540f6e142d59 38
daniele 2:540f6e142d59 39 /* Include configuration for specific target */
daniele 2:540f6e142d59 40 #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088)
daniele 2:540f6e142d59 41 #include "USBEndpoints_LPC17_LPC23.h"
daniele 2:540f6e142d59 42 #elif defined(TARGET_LPC11U24)
daniele 2:540f6e142d59 43 #include "USBEndpoints_LPC11U.h"
daniele 2:540f6e142d59 44 #elif defined(TARGET_KL25Z)
daniele 2:540f6e142d59 45 #include "USBEndpoints_KL25Z.h"
daniele 2:540f6e142d59 46 #else
daniele 2:540f6e142d59 47 #error "Unknown target type"
daniele 2:540f6e142d59 48 #endif
daniele 2:540f6e142d59 49
daniele 2:540f6e142d59 50 #endif