summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhelloeagleyang <[email protected]>2023-09-16 12:06:56 +0800
committersakumisu <[email protected]>2023-09-18 00:10:39 +0800
commitd11260ef67934819f33ceaea0a0caae818b9872c (patch)
tree2c817f73a4fc52ba07ae2739de17ced29fcd7dc0
parente6193bd1315155090c437582186433d0b69521c2 (diff)
[common] Avoid IAR compiling error on USB HOST stack
- Avoided using a structure with zero-length array as a field in another structure when IAR toolchain is used. Signed-off-by: helloeagleyang <[email protected]>
-rw-r--r--common/usb_hc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/usb_hc.h b/common/usb_hc.h
index dfe20703..95215841 100644
--- a/common/usb_hc.h
+++ b/common/usb_hc.h
@@ -59,7 +59,11 @@ struct usbh_urb {
uint32_t start_frame;
usbh_complete_callback_t complete;
void *arg;
+#if defined(__ICCARM__) || defined(__ICCRISCV__) || defined(__ICCRX__)
+ struct usbh_iso_frame_packet *iso_packet;
+#else
struct usbh_iso_frame_packet iso_packet[0];
+#endif
};
/**