mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
[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:
parent
e5355d0335
commit
6dfc857b91
@ -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;
|
||||
|
@ -56,8 +56,8 @@ static_assert(PICO_USB_HOST_INTERRUPT_ENDPOINTS <= USB_MAX_ENDPOINTS, "");
|
||||
static struct hw_endpoint ep_pool[1 + PICO_USB_HOST_INTERRUPT_ENDPOINTS];
|
||||
#define epx (ep_pool[0])
|
||||
|
||||
#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))
|
||||
|
||||
// Flags we set by default in sie_ctrl (we add other bits on top)
|
||||
enum {
|
||||
|
Loading…
x
Reference in New Issue
Block a user