Răsfoiți Sursa

update(demo): add ep num check for some templates

Signed-off-by: sakumisu <1203593632@qq.com>
sakumisu 7 luni în urmă
părinte
comite
51ea604ded

+ 4 - 0
demo/cdc_acm_hid_msc_template.c

@@ -8,6 +8,10 @@
 #include "usbd_cdc_acm.h"
 #include "usbd_hid.h"
 
+#if CONFIG_USBDEV_EP_NUM < 7
+#error endpoint number is too small for this demo, please try other chips
+#endif
+
 /*!< endpoint address */
 #define CDC_IN_EP  0x81
 #define CDC_OUT_EP 0x02

+ 4 - 0
demo/cdc_acm_msc_template.c

@@ -7,6 +7,10 @@
 #include "usbd_cdc_acm.h"
 #include "usbd_msc.h"
 
+#if CONFIG_USBDEV_EP_NUM < 6
+#error endpoint number is too small for this demo, please try other chips
+#endif
+
 /*!< endpoint address */
 #define CDC_IN_EP  0x81
 #define CDC_OUT_EP 0x02

+ 4 - 0
demo/cdc_acm_multi_template.c

@@ -6,6 +6,10 @@
 #include "usbd_core.h"
 #include "usbd_cdc_acm.h"
 
+#if CONFIG_USBDEV_EP_NUM < 8
+#error endpoint number is too small for this demo, please try other chips
+#endif
+
 /*!< endpoint address */
 #define CDC_IN_EP  0x81
 #define CDC_OUT_EP 0x01

+ 4 - 0
demo/winusb2.0_cdc_template.c

@@ -6,6 +6,10 @@
 #include "usbd_core.h"
 #include "usbd_cdc_acm.h"
 
+#if CONFIG_USBDEV_EP_NUM < 6
+#error endpoint number is too small for this demo, please try other chips
+#endif
+
 #define WINUSB_IN_EP  0x81
 #define WINUSB_OUT_EP 0x02
 

+ 4 - 0
demo/winusb2.0_hid_template.c

@@ -6,6 +6,10 @@
 #include "usbd_core.h"
 #include "usbd_hid.h"
 
+#if CONFIG_USBDEV_EP_NUM < 4
+#error endpoint number is too small for this demo, please try other chips
+#endif
+
 #define WINUSB_IN_EP  0x81
 #define WINUSB_OUT_EP 0x02