Skip to content

Commit

Permalink
[gpio] Ignore flag check as it does not support pull up / pull down c…
Browse files Browse the repository at this point in the history
…ontrol
  • Loading branch information
jcelerier committed Jan 20, 2024
1 parent 4f77982 commit d9f9150
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions 3rdparty/libsimpleio/libsimpleio/libgpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,21 +282,21 @@ void GPIO_line_open(int32_t chip, int32_t line, int32_t flags, int32_t events,
return;
}

if (flags & 0xFFFFFFE0)
{
*fd = -1;
*error = EINVAL;
ERRORMSG("flags argument is invalid", *error, __LINE__ - 4);
return;
}

if (!ValidFlags[flags])
{
*fd = -1;
*error = EINVAL;
ERRORMSG("flags argument is inconsistent", *error, __LINE__ - 4);
return;
}
// if (flags & 0xFFFFFFE0)
// {
// *fd = -1;
// *error = EINVAL;
// ERRORMSG("flags argument is invalid", *error, __LINE__ - 4);
// return;
// }

// if (!ValidFlags[flags])
// {
// *fd = -1;
// *error = EINVAL;
// ERRORMSG("flags argument is inconsistent", *error, __LINE__ - 4);
// return;
// }

if (events & 0xFFFFFFFC)
{
Expand Down

0 comments on commit d9f9150

Please sign in to comment.