Commit f49d3a47 authored by Alejandro Mery's avatar Alejandro Mery
Browse files

pio: fix pio_get()'s data extraction

parent 0d2d96c4
......@@ -98,7 +98,7 @@ static int pio_get(const char *buf, uint32_t port, uint32_t port_num, struct pio
if (pio->mul_sel > 1)
pio->data = -1;
else {
val = LE32TOH(PIO_REG_CFG(buf, port, port_num_func));
val = LE32TOH(PIO_REG_DATA(buf, port));
pio->data = (val >> port_num) & 0x01;
}
return 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment