diff options
| author | sakumisu <[email protected]> | 2025-05-26 21:54:47 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2025-05-26 21:54:47 +0800 |
| commit | 51ea604ded02f49a20b27f631993387d4ae5b895 (patch) | |
| tree | cc8be0f05460848f72058f6618673bd8f0d3e9bb | |
| parent | fe24f8d4ba7d73be47a5e78a9d87689294099eac (diff) | |
update(demo): add ep num check for some templates
Signed-off-by: sakumisu <[email protected]>
| -rw-r--r-- | demo/cdc_acm_hid_msc_template.c | 4 | ||||
| -rw-r--r-- | demo/cdc_acm_msc_template.c | 4 | ||||
| -rw-r--r-- | demo/cdc_acm_multi_template.c | 4 | ||||
| -rw-r--r-- | demo/winusb2.0_cdc_template.c | 4 | ||||
| -rw-r--r-- | demo/winusb2.0_hid_template.c | 4 |
5 files changed, 20 insertions, 0 deletions
diff --git a/demo/cdc_acm_hid_msc_template.c b/demo/cdc_acm_hid_msc_template.c index 0851cf89..09b680a2 100644 --- a/demo/cdc_acm_hid_msc_template.c +++ b/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 diff --git a/demo/cdc_acm_msc_template.c b/demo/cdc_acm_msc_template.c index e889cbc8..2a5db746 100644 --- a/demo/cdc_acm_msc_template.c +++ b/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 diff --git a/demo/cdc_acm_multi_template.c b/demo/cdc_acm_multi_template.c index 80b40b02..12399e5c 100644 --- a/demo/cdc_acm_multi_template.c +++ b/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 diff --git a/demo/winusb2.0_cdc_template.c b/demo/winusb2.0_cdc_template.c index 3ccafe32..4e2a0c0b 100644 --- a/demo/winusb2.0_cdc_template.c +++ b/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 diff --git a/demo/winusb2.0_hid_template.c b/demo/winusb2.0_hid_template.c index d0c1774a..5865b088 100644 --- a/demo/winusb2.0_hid_template.c +++ b/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 |
