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

Dylan Laduranty notifications at github.com
Sun Jun 9 22:47:38 CEST 2019


dylad commented on this pull request.

Quick first round, only nitpicks.
Is there any restriction with nRF52832 devices ?? I see a bunch of reference to nRF52840 but does it work on nRF52832 ??

> + */
+typedef struct {
+    usbdev_t usbdev;                        /**< Inherited usbdev struct        */
+    usbdev_ep_t ep_ins[NRF_USB_NUM_EP];     /**< IN type endpoints              */
+    usbdev_ep_t ep_outs[ NRF_USB_NUM_EP];   /**< OUT type endpoints             */
+    NRF_USBD_Type *device;                  /**< Ptr to the device registers    */
+    size_t used;                            /**< Number of bytes from the
+                                                 buffer that are used           */
+    uint8_t buffer[NRF_USB_BUF_SPACE];      /**< Buffer space for endpoint data */
+    nrfusb_setup_state_t sstate;            /**< Setup request state machine    */
+} nrfusb_t;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* SAM_USB_H */

Not SAM anymore

> @@ -0,0 +1,654 @@
+/*
+ * Copyright (C) 2018 Koen Zandberg
+ *
+ * This file is subject to the terms and conditions of the GNU Lesser
+ * General Public License v2.1. See the file LICENSE in the top level
+ * directory for more details.
+ */
+
+/**
+ * @ingroup sam0_common

not sam0

> + * General Public License v2.1. See the file LICENSE in the top level
+ * directory for more details.
+ */
+
+/**
+ * @ingroup sam0_common
+ * @{
+ * @file
+ * @brief   USB interface functions
+ *
+ * @author  Koen Zandberg <koen at bergzand.net>
+ * @}
+ */
+#include <stdint.h>
+#include <stdlib.h>
+#include <errno.h>

I didn't see any errno, maybe this can be removed ?

-- 
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/11074#pullrequestreview-247413717
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190609/55608db3/attachment-0001.html>


More information about the notifications mailing list