[riot-notifications] [RIOT-OS/RIOT] [WIP] sam0_common: Add USB peripheral driver (#10915)

Koen Zandberg notifications at github.com
Sun Feb 10 13:11:50 CET 2019


bergzand commented on this pull request.



> +
+/**
+ * @brief   Event callback for signaling usbdev event to upper layers
+ *
+ * @param[in] usbdev        usbdev context
+ * @param[in] event         type of the event
+ */
+typedef void (*usbdev_event_cb_t)(usbdev_t *usbdev, usbdev_event_t event);
+
+/**
+ * @brief usbdev device descriptor
+ */
+struct usbdev {
+    const struct usbdev_driver *driver;     /**< usbdev driver struct   */
+    usbdev_event_cb_t cb;                   /**< Event callback supplied by
+                                              *  upper layer */

I assume you want to add that to the `sam0_common_usb_t` and not to the generic `usbdev` struct.

I think your point is valid, but I have to check if the current API allows this. If it doesn't, I would assume this to be a shortcomming of the API.

-- 
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/10915#discussion_r255334933
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190210/69b05d8f/attachment.html>


More information about the notifications mailing list