diff options
| author | f_punk <[email protected]> | 2021-09-02 12:02:31 +0200 |
|---|---|---|
| committer | f_punk <[email protected]> | 2021-09-02 12:02:31 +0200 |
| commit | 34c66fa78d700fa5ca324dd043dc0861694ea693 (patch) | |
| tree | 44deb75285cbc264f02aef88a2809e33660b6ee0 /embassy-nrf/src/uarte.rs | |
| parent | 1cef7134d42e581c86102df733f1420d86b20861 (diff) | |
removed type aliases
NotAwaitable as default generic param
added awaitable_timer example
Diffstat (limited to 'embassy-nrf/src/uarte.rs')
| -rw-r--r-- | embassy-nrf/src/uarte.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs index d164ebcbc..a6909be68 100644 --- a/embassy-nrf/src/uarte.rs +++ b/embassy-nrf/src/uarte.rs | |||
| @@ -19,7 +19,7 @@ use crate::interrupt::Interrupt; | |||
| 19 | use crate::pac; | 19 | use crate::pac; |
| 20 | use crate::ppi::{AnyConfigurableChannel, ConfigurableChannel, Event, Ppi, Task}; | 20 | use crate::ppi::{AnyConfigurableChannel, ConfigurableChannel, Event, Ppi, Task}; |
| 21 | use crate::timer::Instance as TimerInstance; | 21 | use crate::timer::Instance as TimerInstance; |
| 22 | use crate::timer::{Frequency, NotAwaitableTimer}; | 22 | use crate::timer::{Frequency, Timer}; |
| 23 | 23 | ||
| 24 | // Re-export SVD variants to allow user to directly set values. | 24 | // Re-export SVD variants to allow user to directly set values. |
| 25 | pub use pac::uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity}; | 25 | pub use pac::uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity}; |
| @@ -288,7 +288,7 @@ impl<'d, T: Instance> Write for Uarte<'d, T> { | |||
| 288 | /// allowing it to implement the ReadUntilIdle trait. | 288 | /// allowing it to implement the ReadUntilIdle trait. |
| 289 | pub struct UarteWithIdle<'d, U: Instance, T: TimerInstance> { | 289 | pub struct UarteWithIdle<'d, U: Instance, T: TimerInstance> { |
| 290 | uarte: Uarte<'d, U>, | 290 | uarte: Uarte<'d, U>, |
| 291 | timer: NotAwaitableTimer<'d, T>, | 291 | timer: Timer<'d, T>, |
| 292 | ppi_ch1: Ppi<'d, AnyConfigurableChannel>, | 292 | ppi_ch1: Ppi<'d, AnyConfigurableChannel>, |
| 293 | _ppi_ch2: Ppi<'d, AnyConfigurableChannel>, | 293 | _ppi_ch2: Ppi<'d, AnyConfigurableChannel>, |
| 294 | } | 294 | } |
| @@ -317,7 +317,7 @@ impl<'d, U: Instance, T: TimerInstance> UarteWithIdle<'d, U, T> { | |||
| 317 | ) -> Self { | 317 | ) -> Self { |
| 318 | let baudrate = config.baudrate; | 318 | let baudrate = config.baudrate; |
| 319 | let uarte = Uarte::new(uarte, irq, rxd, txd, cts, rts, config); | 319 | let uarte = Uarte::new(uarte, irq, rxd, txd, cts, rts, config); |
| 320 | let mut timer = NotAwaitableTimer::new(timer); | 320 | let mut timer = Timer::new(timer); |
| 321 | 321 | ||
| 322 | unborrow!(ppi_ch1, ppi_ch2); | 322 | unborrow!(ppi_ch1, ppi_ch2); |
| 323 | 323 | ||
