Change the API for at91_pio_gpio_get() to return the entire masked set
of bits, not just a 0/1 indicating whether any of the masked bits are on. This is compatible with the single in-tree caller of this function right now (at91_vbus_poll() in dev/usb/controller/at91dci_atemelarm.c).
This commit is contained in:
parent
899ea162b1
commit
581bf19e7b
@ -361,9 +361,7 @@ at91_pio_gpio_get(uint32_t pio, uint32_t data_mask)
|
||||
{
|
||||
uint32_t *PIO = (uint32_t *)(AT91_BASE + pio);
|
||||
|
||||
data_mask &= PIO[PIO_PDSR / 4];
|
||||
|
||||
return (data_mask ? 1 : 0);
|
||||
return ((PIO[PIO_PDSR / 4] & data_mask));
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user