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

Koen Zandberg notifications at github.com
Mon Feb 11 10:05:17 CET 2019

After working a bit with the stack, I've come to a few conclusions:

It doesn't seem to make sense to have a `usbdev_ep_event_cb_t` callback member for every `usbdev_ep_t` instance. A single callback in the `usbdev_t` struct should be enough as it can then be multiplexed out to different handlers based on the upper layer stack. The same can be applied to the `context` ptr, it can be removed from the `usbdev_ep_t` struct and it is probably sufficient to use the `usbdev_t` ptr directly.
The `usbdev_ep_driver_t` can probably also be moved to the `usbdev_t` struct. The case where a peripheral actually requires wildly different handling depending on the endpoint is the only reason to have a per endpoint struct ptr.

I'm thinking of merging the endpoint direction and number into a single `uint8_t` to match the usb protocol numbering, but I'd like to check if there is sufficient merit in merging these first.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190211/8fd2ab76/attachment.html>

More information about the notifications mailing list