This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit fcd10aa7259e5e80eb9aed98477e407d827cceb4
Author: Nightt <[email protected]>
AuthorDate: Wed May 20 09:46:12 2026 +0800

    examples/lp503x: Open device write-only.
    
    Open the LP503X device with O_WRONLY because the driver registers the 
device node with write-only permissions and the example controls it through 
ioctl().
    
    Signed-off-by: Nightt <[email protected]>
---
 examples/lp503x/lp503x_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/lp503x/lp503x_main.c b/examples/lp503x/lp503x_main.c
index 0eba5c1b3..9cc99d3b7 100644
--- a/examples/lp503x/lp503x_main.c
+++ b/examples/lp503x/lp503x_main.c
@@ -632,7 +632,7 @@ int main(int argc, FAR char *argv[])
   int len;
   int x;
 
-  fd = open(CONFIG_EXAMPLES_LP503X_DEVPATH, O_RDONLY);
+  fd = open(CONFIG_EXAMPLES_LP503X_DEVPATH, O_WRONLY);
   if (fd < 0)
     {
       fprintf(stderr, "ERROR: Failed to open %s: %d\n",

Reply via email to