Skip to content

Commit 8b36d9c

Browse files
committed
[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
1 parent a9fe108 commit 8b36d9c

File tree

1 file changed

+12
-0
lines changed
  • features/unsupported/USBDevice/USBDevice/TARGET_Silicon_Labs/inc

1 file changed

+12
-0
lines changed

features/unsupported/USBDevice/USBDevice/TARGET_Silicon_Labs/inc/em_usb.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@
3333
#include <string.h>
3434
#include <stddef.h>
3535
#include "em_common.h"
36+
/* Workaround for em_common naming change so that we don't need to rework the
37+
entire USB HAL */
38+
#define EFM32_PACK_START(x) SL_PACK_START(x)
39+
#define EFM32_PACK_END() SL_PACK_END()
40+
#define EFM32_MIN(a, b) SL_MIN(a, b)
41+
#define EFM32_MAX(a, b) SL_MAX(a, b)
42+
#define EFM32_ATTRIBUTE_PACKED SL_ATTRIBUTE_PACKED
43+
#define EFM32_ATTRIBUTE_ALIGN(X) SL_ATTRIBUTE_ALIGN(X)
44+
#define EFM32_ALIGN(X) SL_ALIGN(X)
45+
#define EFM32_WEAK SL_WEAK
46+
#define EFM32_ATTRIBUTE_SECTION(X) SL_ATTRIBUTE_SECTION(X)
47+
3648
#include "em_int.h"
3749

3850
#if defined( USB_USE_PRINTF )

0 commit comments

Comments
 (0)