Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
USBEndpoints.h
00001 /* Copyright (c) 2010-2011 mbed.org, MIT License 00002 * 00003 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 00004 * and associated documentation files (the "Software"), to deal in the Software without 00005 * restriction, including without limitation the rights to use, copy, modify, merge, publish, 00006 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 00007 * Software is furnished to do so, subject to the following conditions: 00008 * 00009 * The above copyright notice and this permission notice shall be included in all copies or 00010 * substantial portions of the Software. 00011 * 00012 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 00013 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00014 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 00015 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00016 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00017 */ 00018 00019 #ifndef USBENDPOINTS_H 00020 #define USBENDPOINTS_H 00021 00022 /* SETUP packet size */ 00023 #define SETUP_PACKET_SIZE (8) 00024 00025 /* Options flags for configuring endpoints */ 00026 #define DEFAULT_OPTIONS (0) 00027 #define SINGLE_BUFFERED (1U << 0) 00028 #define ISOCHRONOUS (1U << 1) 00029 #define RATE_FEEDBACK_MODE (1U << 2) /* Interrupt endpoints only */ 00030 00031 /* Endpoint transfer status, for endpoints > 0 */ 00032 typedef enum { 00033 EP_COMPLETED, /* Transfer completed */ 00034 EP_PENDING, /* Transfer in progress */ 00035 EP_INVALID, /* Invalid parameter */ 00036 EP_STALLED, /* Endpoint stalled */ 00037 } EP_STATUS; 00038 00039 /* Include configuration for specific target */ 00040 #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC2460) || defined(TARGET_LPC4088_DM) 00041 #include "USBEndpoints_LPC17_LPC23.h" 00042 #elif defined(TARGET_LPC11UXX) || defined(TARGET_LPC1347) || defined (TARGET_LPC11U6X) || defined (TARGET_LPC1549) 00043 #include "USBEndpoints_LPC11U.h" 00044 #elif defined(TARGET_KL25Z) | defined(TARGET_KL26Z) | defined(TARGET_KL27Z) | defined(TARGET_KL43Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D50M) | defined(TARGET_K64F) | defined(TARGET_K22F) | defined(TARGET_TEENSY3_1) 00045 #include "USBEndpoints_KL25Z.h" 00046 #elif !defined(USB_STM_HAL) && defined(TARGET_STM32F4) 00047 #include "USBEndpoints_STM32F4.h" 00048 #elif defined (TARGET_STM32F4) || defined (TARGET_STM32F2) || defined (TARGET_STM32F7) || defined (TARGET_STM32F3) || defined(TARGET_STM32L0) || defined(TARGET_STM32L4) || defined(TARGET_STM32F1) 00049 #include "USBEndpoints_STM32.h" 00050 #elif defined (TARGET_RZ_A1H) || defined (TARGET_VK_RZ_A1H) 00051 #include "USBEndpoints_RZ_A1H.h" 00052 #elif defined(TARGET_Maxim) 00053 #include "USBEndpoints_Maxim.h" 00054 #elif defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32WG_STK3800) || defined(TARGET_EFM32HG_STK3400) 00055 #include "USBEndpoints_EFM32.h" 00056 #elif defined(TARGET_NUC472) 00057 #include "USBEndpoints_NUC472.h" 00058 #elif defined(TARGET_M451) 00059 #include "USBEndpoints_M453.h" 00060 #elif defined(TARGET_M480) 00061 #include "USBEndpoints_M480.h" 00062 #else 00063 #error "Unknown target type" 00064 #endif 00065 00066 #endif
Generated on Tue Jul 12 2022 14:25:15 by
