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:
marcel 2011-03-16 00:42:15 +00:00
parent c8313b3029
commit fe1990038f

View File

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