blablabla

Dependencies:   MAG3110 MMA8451Q SLCD- TSI USBDevice mbed

Committer:
Osator
Date:
Wed Apr 16 12:20:00 2014 +0000
Revision:
0:339b7abfa147
blablabla

Who changed what in which revision?

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