Marco-Krahl commented on a change in pull request #3487:
URL: https://github.com/apache/incubator-nuttx/pull/3487#discussion_r610729900



##########
File path: include/nuttx/1wire/1wire_master.h
##########
@@ -0,0 +1,179 @@
+/****************************************************************************
+ * include/nuttx/1wire/1wire_master.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __INCLUDE_NUTTX_1WIRE_1WIRE_MASTER_H
+#define __INCLUDE_NUTTX_1WIRE_1WIRE_MASTER_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdbool.h>
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+struct onewire_dev_s;
+struct onewire_master_s;
+
+struct onewire_config_s
+{
+  uint64_t romcode;                 /* Unique device identifier */
+};
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: onewire_search
+ *
+ * Description:
+ *   Search all devices from a 1-wire network. This is the 1-wire search
+ *   algorithm from Maxim Application Note 187.
+ *
+ * Input Parameters:
+ *   master    - Pointer to the allocated 1-wire interface
+ *   family    - Limit search to devices of matching family
+ *   alarmonly - Limit search to devices on alarm state
+ *   cb_search - Callback to call on each device found
+ *   arg       - Argument passed to cb_search
+ *
+ * Return Value:
+ *   Number of slaves present and matching family.
+ *
+ ****************************************************************************/
+
+int onewire_search(FAR struct onewire_master_s *master,
+                   int family,
+                   bool alarmonly,
+                   CODE void (*cb_search)(int family,
+                                          uint64_t romcode,
+                                          FAR void *arg),
+                   FAR  void *arg);

Review comment:
       Oh yes, you are right. Why this was not found by checkpatch?




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to