From f3b84043afc7a7795d21a047466d25ce3693b728 Mon Sep 17 00:00:00 2001 From: arighi Date: Mon, 7 Feb 2011 14:17:11 +0000 Subject: [PATCH] usb: check the real number of endpoints in STATIC_ASSERT() git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4686 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/drv/usb_endpoint.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bertos/drv/usb_endpoint.h b/bertos/drv/usb_endpoint.h index e9ebc90c..1376f327 100644 --- a/bertos/drv/usb_endpoint.h +++ b/bertos/drv/usb_endpoint.h @@ -47,13 +47,6 @@ #include "cfg/cfg_usbkbd.h" #include "cfg/cfg_usbmouse.h" -/* - * NOTE: a USB inteface requires at least one endpoint. Moreover, there's the - * special endpoint 0. In conclusion, the number of endpoints must be always - * greater than the number of interfaces. - */ -STATIC_ASSERT(CONFIG_USB_EP_MAX > CONFIG_USB_INTERFACE_MAX); - /* Enpoint allocation (according to the compile-time options) */ enum { USB_CTRL_ENDPOINT = 0, /* This must be always allocated */ @@ -76,4 +69,11 @@ enum { #endif }; +/* + * NOTE: a USB inteface requires at least one endpoint. Moreover, there's the + * special endpoint 0. In conclusion, the number of endpoints must be always + * greater than the number of interfaces. + */ +STATIC_ASSERT(USB_EP_MAX > CONFIG_USB_INTERFACE_MAX); + #endif /* USB_ENDPOINT_H */ -- 2.25.1