summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-03-08 16:28:21 +0700
committerhathach <[email protected]>2020-03-08 16:28:21 +0700
commite0cdab5bf7ab6c2f085a748f936afafbd94ca0d9 (patch)
tree089d0980402c8877b3346314c1fb8347fb699405 /src
parentc8247f0907040eb86c301e8bff8bb322fc9cb566 (diff)
fix stm32 fsdev epdesc
Diffstat (limited to 'src')
-rw-r--r--src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
index a1f40d971..5eacbe655 100644
--- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
+++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
@@ -323,29 +323,27 @@ void dcd_remote_wakeup(uint8_t rhport)
remoteWakeCountdown = 4u; // required to be 1 to 15 ms, ESOF should trigger every 1ms.
}
-// I'm getting a weird warning about missing braces here that I don't
-// know how to fix.
-#if defined(__GNUC__) && (__GNUC__ >= 7)
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wmissing-braces"
-#endif
static const tusb_desc_endpoint_t ep0OUT_desc =
{
- .wMaxPacketSize = CFG_TUD_ENDPOINT0_SIZE,
- .bDescriptorType = TUSB_XFER_CONTROL,
- .bEndpointAddress = 0x00
+ .bLength = sizeof(tusb_desc_endpoint_t),
+ .bDescriptorType = TUSB_DESC_ENDPOINT,
+
+ .bEndpointAddress = 0x00,
+ .bmAttributes = { .xfer = TUSB_XFER_CONTROL },
+ .wMaxPacketSize = { .size = CFG_TUD_ENDPOINT0_SIZE },
+ .bInterval = 0
};
static const tusb_desc_endpoint_t ep0IN_desc =
{
- .wMaxPacketSize = CFG_TUD_ENDPOINT0_SIZE,
- .bDescriptorType = TUSB_XFER_CONTROL,
- .bEndpointAddress = 0x80
-};
+ .bLength = sizeof(tusb_desc_endpoint_t),
+ .bDescriptorType = TUSB_DESC_ENDPOINT,
-#if defined(__GNUC__) && (__GNUC__ >= 7)
-#pragma GCC diagnostic pop
-#endif
+ .bEndpointAddress = 0x80,
+ .bmAttributes = { .xfer = TUSB_XFER_CONTROL },
+ .wMaxPacketSize = { .size = CFG_TUD_ENDPOINT0_SIZE },
+ .bInterval = 0
+};
static void dcd_handle_bus_reset(void)
{