mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
[rp2040] Wrap GCC pragmas in #ifdef __GNUC__
IAR generates warning Pe161 'unrecognized #pragma'.
This commit is contained in:
parent
01edbb8af6
commit
73f22e31c7
@ -57,15 +57,19 @@ void rp2040_usb_init(void)
|
|||||||
reset_block(RESETS_RESET_USBCTRL_BITS);
|
reset_block(RESETS_RESET_USBCTRL_BITS);
|
||||||
unreset_block_wait(RESETS_RESET_USBCTRL_BITS);
|
unreset_block_wait(RESETS_RESET_USBCTRL_BITS);
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
// Clear any previous state just in case
|
// Clear any previous state just in case
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||||
#if __GNUC__ > 6
|
#if __GNUC__ > 6
|
||||||
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
memset(usb_hw, 0, sizeof(*usb_hw));
|
memset(usb_hw, 0, sizeof(*usb_hw));
|
||||||
memset(usb_dpram, 0, sizeof(*usb_dpram));
|
memset(usb_dpram, 0, sizeof(*usb_dpram));
|
||||||
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
// Mux the controller to the onboard usb phy
|
// Mux the controller to the onboard usb phy
|
||||||
usb_hw->muxing = USB_USB_MUXING_TO_PHY_BITS | USB_USB_MUXING_SOFTCON_BITS;
|
usb_hw->muxing = USB_USB_MUXING_TO_PHY_BITS | USB_USB_MUXING_SOFTCON_BITS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user