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

Koen Zandberg notifications at github.com
Mon Mar 25 21:25:24 CET 2019


bergzand commented on this pull request.



> +    uint8_t type = 0;
+
+    switch (ep->type) {
+        case USB_EP_TYPE_CONTROL:
+            type = 0x01;
+            break;
+        case USB_EP_TYPE_ISOCHRONOUS:
+            type = 0x02;
+            break;
+        case USB_EP_TYPE_BULK:
+            type = 0x03;
+            break;
+        case USB_EP_TYPE_INTERRUPT:
+            type = 0x04;
+            break;
+        case USB_EP_TYPE_NONE:

How about I add an
```
default:
  assert(false);
```
here. Anything else than the types already handled in the switch is an error.

-- 
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_r268835123
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190325/826afb06/attachment-0001.html>


More information about the notifications mailing list