TimJTi commented on code in PR #8482:
URL: https://github.com/apache/nuttx/pull/8482#discussion_r1101399720


##########
drivers/usbmisc/fusb302.c:
##########
@@ -0,0 +1,1941 @@
+/****************************************************************************
+ * drivers/usbmisc/fusb302.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <poll.h>
+#include <debug.h>
+
+#include <nuttx/compiler.h>
+#include <nuttx/fs/fs.h>
+#include <nuttx/kmalloc.h>
+#include <nuttx/kthread.h>
+#include <nuttx/mutex.h>
+#include <nuttx/wqueue.h>
+#include <nuttx/i2c/i2c_master.h>
+
+#include <nuttx/usb/fusb302.h>
+#include <sys/ioctl.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#ifndef FUSB302_I2C_FREQUENCY
+#  define FUSB302_I2C_FREQUENCY 800000
+#endif
+
+#ifdef CONFIG_DEBUG_USB_ERROR
+#  define fusb302_err(x, ...)        _err(x, ##__VA_ARGS__)
+#else
+#  define fusb302_err(x, ...)        uerr(x, ##__VA_ARGS__)
+#endif
+
+#if defined(CONFIG_DEBUG_USB_INFO) || defined (CONFIG_DEBUG_FUSB302_REG)
+#  define fusb302_info(x, ...)       _info(x, ##__VA_ARGS__)
+#else
+#  define fusb302_info(x, ...)       uinfo(x, ##__VA_ARGS__)
+#endif
+
+#define FUSB302_I2C_RETRIES  10
+
+/* Switches0 - 0x02 */

Review Comment:
   @acassis checkpatch.sh didn't pick these up. I'll fix.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to