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 <87569709+nightt5879@users.noreply.github.com>
This commit is contained in:
Nightt 2026-05-20 09:46:12 +08:00 committed by Xiang Xiao
parent b4f1e29494
commit fcd10aa725

View file

@ -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",