You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/12/22 11:10:36 UTC

[GitHub] [nuttx-apps] TimJTi commented on a diff in pull request #1474: Add example app for LP503x LED driver

TimJTi commented on code in PR #1474:
URL: https://github.com/apache/nuttx-apps/pull/1474#discussion_r1055351029


##########
examples/lp503x/lp503x_main.c:
##########
@@ -0,0 +1,714 @@
+/****************************************************************************
+ * apps/examples/lp503x/lp503x_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 <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include "system/readline.h"
+
+#include <nuttx/leds/lp503x.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+#  define LP503X_HELP_TEXT(x) x

Review Comment:
   Pleased you only found one thing this time :)
   
   Started to use regex searches (VS Code) to seek out similar potential errors that checkpatch.sh can't 100% determine to be an actual error - things like I get wrong for example! Like `[)] [a-zA-Z]` when I leave a space when casting.
   
   As an aside, could checkpatch be enhanced with an option parameter to allow "warnings" of things that warrant looking at but may or may not be true errors?



-- 
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-unsubscribe@nuttx.apache.org

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