Skip to content

Commit

Permalink
Fix i2c slave async example (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrysxie authored Nov 6, 2024
2 parents 44b781c + 5a26844 commit 1d57614
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"rust-analyzer.cargo.features": [
// Comment out these features when working on the examples.
// Most example crates do not have any cargo features.
"defmt",
"time",
"time-driver",
// "defmt",
// "time",
// "time-driver",
]
}
4 changes: 2 additions & 2 deletions examples/rt685s-evk/src/bin/i2c-slave-async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async fn slave_service(mut i2c: I2cSlave<'static, FLEXCOMM2, Async, DMA0_CH4>) {
info!("Read");
loop {
match i2c.respond_to_read(&buf).await.unwrap() {
Response::Complete(_) => {
Response::Complete(n) => {
info!("Response complete read with {} bytes", n);
break;
}
Expand All @@ -44,7 +44,7 @@ async fn slave_service(mut i2c: I2cSlave<'static, FLEXCOMM2, Async, DMA0_CH4>) {
info!("Write");
loop {
match i2c.respond_to_write(&mut buf).await.unwrap() {
Response::Complete(_) => {
Response::Complete(n) => {
info!("Response complete write with {} bytes", n);
break;
}
Expand Down

0 comments on commit 1d57614

Please sign in to comment.