max4146x_comp

Dependencies:   MAX14690

Committer:
sdivarci
Date:
Sun Oct 25 20:10:02 2020 +0000
Revision:
0:0061165683ee
sdivarci

Who changed what in which revision?

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