Commit Graph

7 Commits

Author SHA1 Message Date
King Kévin efbd228f8a I2C: don't clear ADDR after select
to check if the slave has successfully been selected to read or
write and the master is in the corresponding receive or transmit
state, SR2 was checked.
but reading SR2 also cleared the ADDR bit, starting the read/write
transaction.
the check is done in the read/write methods anyway.
2019-03-26 18:07:26 +01:00
King Kévin ef4685a9a3 I2C: don't block on reset
when resetting the GPIO lines are toggles.
when this is not effective it used to block.
not it just warns the used it failed.
2019-03-26 18:05:18 +01:00
King Kévin 396c7852e7 I2C: add timeout to send start condition
sometimes the internal state f the I2C peripheral is confused,
and sending a start condition is not possible and the
corresponding registers will not be set.
see the errata for more details.
as workaround a timer is used, resetting the I2C is case it times
out
2019-03-26 18:01:23 +01:00
King Kévin 593b0e0e25 take changes from busvoodoo branch 2018-04-03 16:59:02 +02:00
King Kévin 62bfaf3973 cherry-pick from busvoodoo branch, part 4 2018-02-18 15:21:18 +01:00
King Kévin 3b73f519da doc: fix typo 2017-10-04 13:55:43 +02:00
King Kévin 6d3e826c18 add general I2C library 2017-04-03 13:07:03 +02:00