diff options
| author | Caleb Jamison <[email protected]> | 2024-02-15 17:43:20 -0500 |
|---|---|---|
| committer | Caleb Jamison <[email protected]> | 2024-02-15 17:56:50 -0500 |
| commit | bd0b450ca4ff36b2b1fe0b3b422cd478f9201ad0 (patch) | |
| tree | 9555d33c741592a04ecab056ba0283c14cc38bb8 /examples/rp | |
| parent | 5220453d85b1e0f279e94dc1627b7d2434132920 (diff) | |
Improve rp2040 i2c slave
This commit takes the fixes and error reporting improvements from
jcdickinson's work and applies them without overlaying a software state
machine on top of the hardware state machine.
Also allows configuration of response to 'general call' writes.
Diffstat (limited to 'examples/rp')
| -rw-r--r-- | examples/rp/src/bin/i2c_slave.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/rp/src/bin/i2c_slave.rs b/examples/rp/src/bin/i2c_slave.rs index ac470d2be..9fffb4646 100644 --- a/examples/rp/src/bin/i2c_slave.rs +++ b/examples/rp/src/bin/i2c_slave.rs | |||
| @@ -110,7 +110,7 @@ async fn main(spawner: Spawner) { | |||
| 110 | let c_sda = p.PIN_1; | 110 | let c_sda = p.PIN_1; |
| 111 | let c_scl = p.PIN_0; | 111 | let c_scl = p.PIN_0; |
| 112 | let mut config = i2c::Config::default(); | 112 | let mut config = i2c::Config::default(); |
| 113 | config.frequency = 5_000; | 113 | config.frequency = 1_000_000; |
| 114 | let controller = i2c::I2c::new_async(p.I2C0, c_sda, c_scl, Irqs, config); | 114 | let controller = i2c::I2c::new_async(p.I2C0, c_sda, c_scl, Irqs, config); |
| 115 | 115 | ||
| 116 | unwrap!(spawner.spawn(controller_task(controller))); | 116 | unwrap!(spawner.spawn(controller_task(controller))); |
