[rp2040] Explicit cast value of hw_set_alias
Some compilers don't support the GNU extension `typeof` so their definitions of `hw_set_alias` can't inherit their type from their argument, and the best we can do is have `hw_set_alias` act the same as `hw_set_alias_untyped`. This requires an explicit cast when the macro is used instead, otherwise IAR generates error Pe132 'expression must have pointer-to-struct-or-union type but it has type "void *"'. The same goes for `hw_clear_alias`.
This commit is contained in:
@@ -46,8 +46,8 @@
|
||||
/* Low level controller
|
||||
*------------------------------------------------------------------*/
|
||||
|
||||
#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))
|
||||
|
||||
// Init these in dcd_init
|
||||
static uint8_t *next_buffer_ptr;
|
||||
|
||||
Reference in New Issue
Block a user