Fix reading SDA in I2C bit-banging code

We need to use pin_sda_in, not pin_sda to read the PIO Input.
This commit is contained in:
Harald Welte
2016-09-01 18:39:12 +02:00
parent c6ae98c53a
commit 0aea9fff28

View File

@@ -52,7 +52,7 @@ static bool read_sda(void)
bool ret;
PIO_Configure(&pin_sda_in, PIO_LISTSIZE(pin_sda_in));
if (PIO_Get(&pin_sda))
if (PIO_Get(&pin_sda_in))
ret = true;
else
ret = false;