Merge pull request from CBJamo/i2c_slave_fixes

Improve rp2040 i2c slave
This commit is contained in:
Dario Nieuwenhuis 2024-02-17 01:45:31 +00:00 committed by GitHub
commit 542dab9189
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 146 additions and 89 deletions
examples/rp/src/bin

View file

@ -110,7 +110,7 @@ async fn main(spawner: Spawner) {
let c_sda = p.PIN_1;
let c_scl = p.PIN_0;
let mut config = i2c::Config::default();
config.frequency = 5_000;
config.frequency = 1_000_000;
let controller = i2c::I2c::new_async(p.I2C0, c_sda, c_scl, Irqs, config);
unwrap!(spawner.spawn(controller_task(controller)));