kasjer commented on a change in pull request #2605:
URL: https://github.com/apache/mynewt-core/pull/2605#discussion_r642385054



##########
File path: hw/drivers/uart/max3107/include/max3107/max3107.h
##########
@@ -0,0 +1,172 @@
+/*
+ * 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 __DRIVERS_MAX3107_H_
+#define __DRIVERS_MAX3107_H_
+
+#include <stdint.h>
+#include <uart/uart.h>
+#include <hal/hal_spi.h>
+#if MYNEWT_VAL(BUS_DRIVER_PRESENT)
+#include <bus/drivers/spi_common.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct max3107_dev;
+
+struct max3107_cfg {
+#if MYNEWT_VAL(BUS_DRIVER_PRESENT)
+    struct bus_spi_node_cfg node_cfg;
+#else
+    struct hal_spi_settings spi_settings;
+    int spi_num;
+    int ss_pin;
+#endif
+    /**< External clock/oscillator frequency in Hz */
+    uint32_t osc_freq;
+    /**< IRQ Pin */
+    int8_t irq_pin;
+    int8_t ldoen_pin;
+    /**< 1 - External crystal oscillator, 0 - external clock */
+    int8_t crystal_en: 1;
+    /**< 1 - To disable PLL */
+    uint8_t no_pll: 1;
+    /**< 1 - To enable x 4 mode */
+    uint8_t allow_mul_4: 1;
+    /**< 1 - To enable x 4 mode */
+    uint8_t allow_mul_2: 1;
+};
+
+struct max3107_client {
+    /**< Function that will be called from process context when data can be 
read. */
+    void (*readable)(struct max3107_dev *dev);

Review comment:
       Driver does not care if client reacts to notifications. So return value 
is not needed.




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