537: Documents the nRF BufferedUarte problem r=Dirbaio a=huntc

Please see https://github.com/embassy-rs/embassy/issues/536 for the rationale.

Co-authored-by: huntc <huntchr@gmail.com>
This commit is contained in:
bors[bot]
2021-12-12 20:35:43 +00:00
committed by GitHub
3 changed files with 18 additions and 7 deletions

View File

@ -8,7 +8,6 @@ mod example_common;
use embassy::executor::Spawner;
use embassy::io::{AsyncBufReadExt, AsyncWriteExt};
use embassy_nrf::buffered_uarte::State;
use embassy_nrf::gpio::NoPin;
use embassy_nrf::{buffered_uarte::BufferedUarte, interrupt, uarte, Peripherals};
use example_common::*;
use futures::pin_mut;
@ -24,6 +23,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
let irq = interrupt::take!(UARTE0_UART0);
let mut state = State::new();
// Please note - important to have hardware flow control (https://github.com/embassy-rs/embassy/issues/536)
let u = BufferedUarte::new(
&mut state,
p.UARTE0,
@ -33,8 +33,8 @@ async fn main(_spawner: Spawner, p: Peripherals) {
irq,
p.P0_08,
p.P0_06,
NoPin,
NoPin,
p.P0_07,
p.P0_05,
config,
&mut rx_buffer,
&mut tx_buffer,