works!

Dependencies:   mbed

Committer:
kchhouk
Date:
Fri Feb 21 21:03:41 2020 +0000
Revision:
2:5e5cdc3504fe
Parent:
1:6e512faaa17c
Added the functionality of scanf

Who changed what in which revision?

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