I changed one line of code in the file with path name: USBDeviceHT/targets/TARGET_Maxim

Fork of USBDeviceHT by Helmut Tschemernjak

Committer:
dev_alexander
Date:
Fri Jun 01 21:43:55 2018 +0000
Revision:
6:c1f162fd7777
Parent:
0:a3ea811f80f2
Fixed Error with code not compiling due to an issue with there not being a (uint32_t) cast of a (void) pointer. Maxim was the only mbed vendor to not have this one (uint32_t) cast in the spot it was added to. Look into public repos for similar cases.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Helmut64 0:a3ea811f80f2 1 /***************************************************************************//**
Helmut64 0:a3ea811f80f2 2 * @file usbconfig.h
Helmut64 0:a3ea811f80f2 3 * @brief USB protocol stack library, application supplied configuration options.
Helmut64 0:a3ea811f80f2 4 * @version 3.20.12
Helmut64 0:a3ea811f80f2 5 *******************************************************************************
Helmut64 0:a3ea811f80f2 6 * @section License
Helmut64 0:a3ea811f80f2 7 * <b>(C) Copyright 2014 Silicon Labs, http://www.silabs.com</b>
Helmut64 0:a3ea811f80f2 8 *******************************************************************************
Helmut64 0:a3ea811f80f2 9 *
Helmut64 0:a3ea811f80f2 10 * Licensed under the Apache License, Version 2.0 (the "License");
Helmut64 0:a3ea811f80f2 11 * you may not use this file except in compliance with the License.
Helmut64 0:a3ea811f80f2 12 * You may obtain a copy of the License at
Helmut64 0:a3ea811f80f2 13 *
Helmut64 0:a3ea811f80f2 14 * http://www.apache.org/licenses/LICENSE-2.0
Helmut64 0:a3ea811f80f2 15 *
Helmut64 0:a3ea811f80f2 16 * Unless required by applicable law or agreed to in writing, software
Helmut64 0:a3ea811f80f2 17 * distributed under the License is distributed on an "AS IS" BASIS,
Helmut64 0:a3ea811f80f2 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Helmut64 0:a3ea811f80f2 19 * See the License for the specific language governing permissions and
Helmut64 0:a3ea811f80f2 20 * limitations under the License.
Helmut64 0:a3ea811f80f2 21 *
Helmut64 0:a3ea811f80f2 22 ******************************************************************************/
Helmut64 0:a3ea811f80f2 23
Helmut64 0:a3ea811f80f2 24 #ifndef __USBCONFIG_H
Helmut64 0:a3ea811f80f2 25 #define __USBCONFIG_H
Helmut64 0:a3ea811f80f2 26
Helmut64 0:a3ea811f80f2 27 #ifdef __cplusplus
Helmut64 0:a3ea811f80f2 28 extern "C" {
Helmut64 0:a3ea811f80f2 29 #endif
Helmut64 0:a3ea811f80f2 30
Helmut64 0:a3ea811f80f2 31 /* Compile stack for device mode. */
Helmut64 0:a3ea811f80f2 32 #define USB_DEVICE
Helmut64 0:a3ea811f80f2 33
Helmut64 0:a3ea811f80f2 34 /* Maximum number of endpoint used, EP0 excluded. If you change this, you must
Helmut64 0:a3ea811f80f2 35 also change USBEndpoints_EFM32.h to match. */
Helmut64 0:a3ea811f80f2 36 #define NUM_EP_USED 6
Helmut64 0:a3ea811f80f2 37
Helmut64 0:a3ea811f80f2 38 /* Power management modes. The following can be or'd toghether. See comments in
Helmut64 0:a3ea811f80f2 39 em_usbd.c under "Energy-saving modes" for more details.
Helmut64 0:a3ea811f80f2 40
Helmut64 0:a3ea811f80f2 41 USB_PWRSAVE_MODE_ONSUSPEND Set USB peripheral in low power mode on suspend
Helmut64 0:a3ea811f80f2 42
Helmut64 0:a3ea811f80f2 43 USB_PWRSAVE_MODE_ONVBUSOFF Set USB peripheral in low power mode when not
Helmut64 0:a3ea811f80f2 44 attached to a host. While this mode assumes that the internal voltage regulator
Helmut64 0:a3ea811f80f2 45 is used and that the VREGI pin of the chip is connected to VBUS it should
Helmut64 0:a3ea811f80f2 46 be safe to use given that VREGOSEN is always enabled. If you disable VREGOSEN
Helmut64 0:a3ea811f80f2 47 you must turn this off.
Helmut64 0:a3ea811f80f2 48
Helmut64 0:a3ea811f80f2 49 USB_PWRSAVE_MODE_ENTEREM2 Enter EM2 when USB peripheral is in low power mode.
Helmut64 0:a3ea811f80f2 50 On Mbed this allows the sleep() and deepsleep() calls to enter EM2, but
Helmut64 0:a3ea811f80f2 51 does not automatically enter any sleep states. Entering EM1 is always allowed.
Helmut64 0:a3ea811f80f2 52
Helmut64 0:a3ea811f80f2 53 Note for Happy Gecko, errata USB_E111: Entering EM2 when both the system clock
Helmut64 0:a3ea811f80f2 54 (HFCLK) and the USB core clock (USBCCLK) is running on USHFRCO will result in
Helmut64 0:a3ea811f80f2 55 a lock-up.
Helmut64 0:a3ea811f80f2 56 */
Helmut64 0:a3ea811f80f2 57 #define USB_PWRSAVE_MODE (USB_PWRSAVE_MODE_ONSUSPEND|USB_PWRSAVE_MODE_ONVBUSOFF|USB_PWRSAVE_MODE_ENTEREM2)
Helmut64 0:a3ea811f80f2 58
Helmut64 0:a3ea811f80f2 59 /* Use dynamic memory to allocate rx/tx buffers in the HAL. Saves memory
Helmut64 0:a3ea811f80f2 60 as buffers are only allocated for used endpoints. The system malloc
Helmut64 0:a3ea811f80f2 61 must return memory that is aligned by 4.
Helmut64 0:a3ea811f80f2 62
Helmut64 0:a3ea811f80f2 63 Note: if you disable this, using isochronous endpoints with packet
Helmut64 0:a3ea811f80f2 64 sizes that are larger than the maximum for other EP types (64) will
Helmut64 0:a3ea811f80f2 65 not work. */
Helmut64 0:a3ea811f80f2 66 #define USB_USE_DYNAMIC_MEMORY
Helmut64 0:a3ea811f80f2 67
Helmut64 0:a3ea811f80f2 68 /* When the USB peripheral is set in low power mode, it must be clocked by a 32kHz
Helmut64 0:a3ea811f80f2 69 clock. Both LFXO and LFRCO can be used, but only LFXO guarantee USB specification
Helmut64 0:a3ea811f80f2 70 compliance. */
Helmut64 0:a3ea811f80f2 71 #define USB_USBC_32kHz_CLK USB_USBC_32kHz_CLK_LFXO
Helmut64 0:a3ea811f80f2 72
Helmut64 0:a3ea811f80f2 73 /* Uncomment to get some debugging information. Default value for USER_PUTCHAR
Helmut64 0:a3ea811f80f2 74 should work for SiLabs Gecko boards. Printf requires a working retarget
Helmut64 0:a3ea811f80f2 75 implementation for write(). */
Helmut64 0:a3ea811f80f2 76 //#define DEBUG_USB_API
Helmut64 0:a3ea811f80f2 77 //#define USB_USE_PRINTF
Helmut64 0:a3ea811f80f2 78 //#define USER_PUTCHAR ITM_SendChar
Helmut64 0:a3ea811f80f2 79 //#define DEBUG_USB_INT_HI
Helmut64 0:a3ea811f80f2 80 //#define DEBUG_USB_INT_LO
Helmut64 0:a3ea811f80f2 81
Helmut64 0:a3ea811f80f2 82
Helmut64 0:a3ea811f80f2 83
Helmut64 0:a3ea811f80f2 84 #ifdef __cplusplus
Helmut64 0:a3ea811f80f2 85 }
Helmut64 0:a3ea811f80f2 86 #endif
Helmut64 0:a3ea811f80f2 87
Helmut64 0:a3ea811f80f2 88 #endif /* __USBCONFIG_H */