[riot-notifications] [RIOT-OS/RIOT] usbdev: Introducing a generic USB device driver API (#9830)

Koen Zandberg notifications at github.com
Thu Mar 14 17:37:42 CET 2019


bergzand commented on this pull request.



> + * When the device doesn't have dedicated memory for endpoint buffers, a
+ * buffer of this size is allocated to contain the endpoint buffers. Only
+ * needs to be as big as the total buffer space required by all endpoints
+ */
+#ifndef USBDEV_EP_BUF_SPACE
+#define USBDEV_EP_BUF_SPACE     1024
+#endif
+
+/**
+ * @brief Number of USB IN and OUT endpoints allocated
+ *
+ * Configures the number of endpoints allocated. An equal number of IN and OUT
+ * endpoints are allocated
+ */
+#ifndef USBDEV_NUM_ENDPOINTS
+#define USBDEV_NUM_ENDPOINTS       8

The idea here was to have a global value to set the number of IN and OUT endpoints. This way, an application that only needs a limited number of endpoints can set the required number in a platform-independent way.

I agree that this might cause issues. We could move this to something like `cpu.h`, but I can't say I really like that solution. I don't mind keeping it this way at the moment and solve the issue in a follow up as soon as we have a few drivers.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/9830#discussion_r265660652
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190314/a8210ab5/attachment.html>


More information about the notifications mailing list