mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Only write to *active once, even when GPIO_ACTIVE_LOW is set.
This commit is contained in:
parent
d663d5ca23
commit
ee2c73e559
1 changed files with 3 additions and 2 deletions
|
|
@ -178,9 +178,10 @@ gpio_pin_is_active(gpio_pin_t pin, bool *active)
|
|||
return (rv);
|
||||
}
|
||||
|
||||
*active = tmp != 0;
|
||||
if (pin->flags & GPIO_ACTIVE_LOW)
|
||||
*active = !(*active);
|
||||
*active = tmp == 0;
|
||||
else
|
||||
*active = tmp != 0;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue