From: arighi Date: Mon, 7 Feb 2011 14:17:11 +0000 (+0000) Subject: usb: check the real number of endpoints in STATIC_ASSERT() X-Git-Tag: 2.7.0~280 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=f3b84043afc7a7795d21a047466d25ce3693b728;p=bertos.git 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 --- 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 */