ME11B Sample Code in Maxim Integrated Team

Dependencies:   BMI160 max32630hsp3 MemoryLCD USBDevice

Fork of Host_Software_MAX32664GWEB_HR_EXTENDED by Seyhmus Cacina

Committer:
seyhmus.cacina
Date:
Mon Mar 18 10:21:53 2019 +0300
Revision:
0:ac4dea3e2894
ME11B Sample Code First Commit

Who changed what in which revision?

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