PeterBee97 commented on code in PR #1449:
URL: https://github.com/apache/nuttx-apps/pull/1449#discussion_r1041755958


##########
system/nxcamera/nxcamera_main.c:
##########
@@ -0,0 +1,564 @@
+/****************************************************************************
+ * apps/system/nxcamera/nxcamera_main.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 <nuttx/video/video.h>
+
+#include <sys/types.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <assert.h>
+
+#include "system/readline.h"
+#include "system/nxcamera.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define NXCAMERA_VER    "1.00"
+
+#ifdef CONFIG_NXCAMERA_INCLUDE_HELP
+#  define NXCAMERA_HELP_TEXT(x)  x
+#else
+#  define NXCAMERA_HELP_TEXT(x)
+#endif
+
+/****************************************************************************
+ * Private Type Declarations
+ ****************************************************************************/
+
+typedef int (*nxcamera_func)(FAR struct nxcamera_s *plooper, char *pargs);
+
+struct mp_cmd_s
+{
+  FAR const char *cmd;       /* The command text */
+  FAR const char *arghelp;   /* Text describing the args */
+  nxcamera_func  pfunc;      /* Pointer to command handler */
+  FAR const char *help;      /* The help text */
+};
+
+/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+
+static int nxcamera_cmd_quit(FAR struct nxcamera_s *plooper, char *parg);
+static int nxcamera_cmd_stream(FAR struct nxcamera_s *plooper, char *parg);
+
+#ifdef CONFIG_NXCAMERA_INCLUDE_PREFERRED_DEVICE
+static int nxcamera_cmd_input(FAR struct nxcamera_s *plooper, char *parg);
+#endif
+
+static int nxcamera_cmd_output(FAR struct nxcamera_s *plooper, char *parg);
+static int nxcamera_cmd_stop(FAR struct nxcamera_s *plooper, char *parg);
+static int nxcamera_cmd_set(FAR struct nxcamera_s *plooper, char *parg);
+
+#ifdef CONFIG_NXCAMERA_INCLUDE_HELP
+static int nxcamera_cmd_help(FAR struct nxcamera_s *plooper, char *parg);
+#endif

Review Comment:
   fixed



##########
system/nxcamera/nxcamera_main.c:
##########
@@ -0,0 +1,564 @@
+/****************************************************************************
+ * apps/system/nxcamera/nxcamera_main.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 <nuttx/video/video.h>
+
+#include <sys/types.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <assert.h>
+
+#include "system/readline.h"
+#include "system/nxcamera.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define NXCAMERA_VER    "1.00"
+
+#ifdef CONFIG_NXCAMERA_INCLUDE_HELP
+#  define NXCAMERA_HELP_TEXT(x)  x
+#else
+#  define NXCAMERA_HELP_TEXT(x)
+#endif
+
+/****************************************************************************
+ * Private Type Declarations
+ ****************************************************************************/
+
+typedef int (*nxcamera_func)(FAR struct nxcamera_s *plooper, char *pargs);
+
+struct mp_cmd_s
+{
+  FAR const char *cmd;       /* The command text */
+  FAR const char *arghelp;   /* Text describing the args */
+  nxcamera_func  pfunc;      /* Pointer to command handler */
+  FAR const char *help;      /* The help text */
+};
+
+/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+
+static int nxcamera_cmd_quit(FAR struct nxcamera_s *plooper, char *parg);
+static int nxcamera_cmd_stream(FAR struct nxcamera_s *plooper, char *parg);
+
+#ifdef CONFIG_NXCAMERA_INCLUDE_PREFERRED_DEVICE
+static int nxcamera_cmd_input(FAR struct nxcamera_s *plooper, char *parg);
+#endif
+
+static int nxcamera_cmd_output(FAR struct nxcamera_s *plooper, char *parg);
+static int nxcamera_cmd_stop(FAR struct nxcamera_s *plooper, char *parg);
+static int nxcamera_cmd_set(FAR struct nxcamera_s *plooper, char *parg);
+
+#ifdef CONFIG_NXCAMERA_INCLUDE_HELP
+static int nxcamera_cmd_help(FAR struct nxcamera_s *plooper, char *parg);
+#endif

Review Comment:
   done



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