mlyszczek commented on code in PR #15828:
URL: https://github.com/apache/nuttx/pull/15828#discussion_r1954137398


##########
drivers/wireless/lpwan/rn2xx3/rn2xx3.c:
##########
@@ -0,0 +1,1508 @@
+/****************************************************************************
+ * drivers/wireless/lpwan/rn2xx3/rn2xx3.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * 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 <debug.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <poll.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+#include <nuttx/fs/fs.h>
+#include <nuttx/kmalloc.h>
+#include <nuttx/mutex.h>
+#include <nuttx/semaphore.h>
+#include <nuttx/signal.h>
+#include <nuttx/wqueue.h>
+
+#include <nuttx/wireless/lpwan/rn2xx3.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Duration of maximum MAC layer pause in milliseconds */
+
+#define MAC_PAUSE_DUR "4294967245"
+
+/* TODO: implement the following commands
+ * coding rate
+ * iqi
+ * crc
+ * sync word
+ * bitrate
+ */
+
+/****************************************************************************
+ * Private Data Types
+ ****************************************************************************/
+
+/* Radio transceiver modules */
+
+enum rn2xx3_type_e
+{
+  RN2903 = 0, /* RN2903 transceiver */
+  RN2483 = 1, /* RN2483 transceiver */
+};
+
+struct rn2xx3_dev_s
+{
+  FAR struct file uart;     /* UART interface */
+  bool receiving;           /* Currently receiving */
+  mutex_t devlock;          /* Exclusive access */
+  enum rn2xx3_type_e model; /* Transceiver model */
+  enum rn2xx3_mod_e mod;    /* Modulation mode */
+};
+
+/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+
+static ssize_t rn2xx3_write(FAR struct file *filep, FAR const char *buffer,
+                            size_t buflen);
+static ssize_t rn2xx3_read(FAR struct file *filep, FAR char *buffer,
+                           size_t buflen);
+static int rn2xx3_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static const struct file_operations g_rn2xx3fops =
+{
+  .open = NULL,

Review Comment:
   I think those still should be implemented even if you allow only one opened 
file at a time (you can return EBUSY on second attempt).



-- 
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: commits-unsubscr...@nuttx.apache.org

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

Reply via email to