embassy/embassy-rp
Jonathan Dickinson d2b17de145
fix: make RP2040 I2C slave aware of serial writes
In general, this commit allows the I2C slave to recognize when writes
are occuring in serial - and seperate them out into independant
commands. In order to achieve this it:

* Corrects some setup parameters for the I2C state machine.
  - Enables clock stretching
  - Enables recommendations from the datasheet
* Participates in clock stretching. This is done by leaving the
  `R_RD_REQ` register of `IC_INTR_STAT` set until the
  slave has responded with some bytes (in `respond_to_write`).
* Recognizes `FIRST_DATA_BYTE` of `IC_DATA_CMD`, which indicates to a
  slave-receiver than the current byte is part of a new transaction.
* Uses a state machine heavily inspired by the one in rp-rs as an
  implementation detail. This is no more correct than the existing
  approach, but makes the code significantly easier to reason about.
* Two additional errors were added, both indicating that the provided
  buffer is too small for the message from the master-sender. As a
  convenience, they have the same assosciated data so that matching
  can be performed in the event that the call site handles messages
  in a consistent way.
2023-11-09 23:32:29 -05:00
..
src fix: make RP2040 I2C slave aware of serial writes 2023-11-09 23:32:29 -05:00
build.rs Fix all warnings on embassy-rp and embassy-rp-examples and 2021-05-20 08:32:26 +10:00
Cargo.toml Upgrade static-cell to v2.0 2023-11-02 21:52:07 +01:00
funcsel.txt rp: add initial version 2021-03-29 21:35:25 +02:00
link-rp.x.in rp: add precompiled boot2 to avoid depending on gcc 2021-03-29 22:28:36 +02:00