mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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:
parent
b4f1e29494
commit
fcd10aa725
1 changed files with 1 additions and 1 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue