Fix mv_gpio_in() for pin numbers that occupy bits 8-31 in GPIO registers.
The compiler will truncate the 32-bit return value of mv_gpio_value_get() to match the 8-bit return value of mv_gpio_in(). A conditional expression is used to have mv_gpio_in() always return 0 or 1 instead.
This commit is contained in:
parent
c8313b3029
commit
fe1990038f
@ -344,7 +344,7 @@ uint8_t
|
||||
mv_gpio_in(uint32_t pin)
|
||||
{
|
||||
|
||||
return (mv_gpio_value_get(pin));
|
||||
return (mv_gpio_value_get(pin) ? 1 : 0);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
|
Loading…
Reference in New Issue
Block a user