Skip to content
Prev Previous commit
Next Next commit
Adapt to lack of typeof in hw_set_alias and hw_clear_alias
When building with IAR, these macros expand to void pointers, so without an
explicit cast, IAR generates error Pe132 'expression must have
pointer-to-struct-or-union type but it has type "void *".
  • Loading branch information
Ben Avison committed Sep 13, 2022
commit 9f70f6f697db797ca9188333b9880b2b26995787
4 changes: 2 additions & 2 deletions usb/device/dev_lowlevel/dev_lowlevel.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
// Device descriptors
#include "dev_lowlevel.h"

#define usb_hw_set hw_set_alias(usb_hw)
#define usb_hw_clear hw_clear_alias(usb_hw)
#define usb_hw_set ((usb_hw_t *)hw_set_alias(usb_hw))
#define usb_hw_clear ((usb_hw_t *)hw_clear_alias(usb_hw))

// Function prototypes for our device specific endpoint handlers defined
// later on
Expand Down