From 8b36d9c55feae72f2355ac9d4ae4007ee85d9b3f Mon Sep 17 00:00:00 2001 From: Steven Cooreman Date: Tue, 25 Oct 2016 12:05:07 -0700 Subject: [PATCH] [EFM32] Workaround for SDK5.0.0 and USB Aliased a few macros that changed name from SDK4.x to SDK5.x. in order to make the USB library play nice with SDK5.0.0 --- .../USBDevice/TARGET_Silicon_Labs/inc/em_usb.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/features/unsupported/USBDevice/USBDevice/TARGET_Silicon_Labs/inc/em_usb.h b/features/unsupported/USBDevice/USBDevice/TARGET_Silicon_Labs/inc/em_usb.h index ad39b7b0ea..9b0029d217 100644 --- a/features/unsupported/USBDevice/USBDevice/TARGET_Silicon_Labs/inc/em_usb.h +++ b/features/unsupported/USBDevice/USBDevice/TARGET_Silicon_Labs/inc/em_usb.h @@ -33,6 +33,18 @@ #include #include #include "em_common.h" +/* Workaround for em_common naming change so that we don't need to rework the + entire USB HAL */ +#define EFM32_PACK_START(x) SL_PACK_START(x) +#define EFM32_PACK_END() SL_PACK_END() +#define EFM32_MIN(a, b) SL_MIN(a, b) +#define EFM32_MAX(a, b) SL_MAX(a, b) +#define EFM32_ATTRIBUTE_PACKED SL_ATTRIBUTE_PACKED +#define EFM32_ATTRIBUTE_ALIGN(X) SL_ATTRIBUTE_ALIGN(X) +#define EFM32_ALIGN(X) SL_ALIGN(X) +#define EFM32_WEAK SL_WEAK +#define EFM32_ATTRIBUTE_SECTION(X) SL_ATTRIBUTE_SECTION(X) + #include "em_int.h" #if defined( USB_USE_PRINTF )