aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-12-10 04:26:11 +0000
committerGitHub <[email protected]>2021-12-10 04:26:11 +0000
commitdce3f8c47df611b51c47559ba8f4c301eb86af95 (patch)
treec88ff4746929fa3918436a5702f5145cac2ad860 /examples
parent0338fd2237d0b3d0703ff6dc4eb6708d2e323068 (diff)
parent45ef9444579c8d7af72fc2d42093f26ef6f6ac3c (diff)
Merge #534
534: Provides AsyncWrite with flush r=huntc a=huntc As per Tokio and others, this commit provides a `poll_flush` method on `AsyncWrite` so that a best-effort attempt at wakening once all bytes are flushed can be made. Co-authored-by: huntc <[email protected]>
Diffstat (limited to 'examples')
-rw-r--r--examples/nrf/src/bin/buffered_uart.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/nrf/src/bin/buffered_uart.rs b/examples/nrf/src/bin/buffered_uart.rs
index 5d9075edf..c3e07e44a 100644
--- a/examples/nrf/src/bin/buffered_uart.rs
+++ b/examples/nrf/src/bin/buffered_uart.rs
@@ -61,5 +61,8 @@ async fn main(_spawner: Spawner, p: Peripherals) {
61 info!("writing..."); 61 info!("writing...");
62 unwrap!(u.write_all(&buf).await); 62 unwrap!(u.write_all(&buf).await);
63 info!("write done"); 63 info!("write done");
64
65 // Wait until the bytes are actually finished being transmitted
66 unwrap!(u.flush().await);
64 } 67 }
65} 68}