diff options
| author | goueslati <[email protected]> | 2023-06-12 14:27:53 +0100 |
|---|---|---|
| committer | goueslati <[email protected]> | 2023-06-12 14:27:53 +0100 |
| commit | 2d89cfb18f00aefbfa108728dfea3398e80ea3e4 (patch) | |
| tree | 6485dacac7e61c4378ac522e709edb0a86bd7523 /embassy-stm32/src/usart/buffered.rs | |
| parent | 2dd5ce83ec0421564e85b667f5dabd592f313e5c (diff) | |
| parent | ab86b060500ceda1c80e39f35af69cb08a7b63a2 (diff) | |
fix merge conflict
Diffstat (limited to 'embassy-stm32/src/usart/buffered.rs')
| -rw-r--r-- | embassy-stm32/src/usart/buffered.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-stm32/src/usart/buffered.rs b/embassy-stm32/src/usart/buffered.rs index 252e945da..613da5674 100644 --- a/embassy-stm32/src/usart/buffered.rs +++ b/embassy-stm32/src/usart/buffered.rs | |||
| @@ -2,18 +2,18 @@ use core::future::poll_fn; | |||
| 2 | use core::slice; | 2 | use core::slice; |
| 3 | use core::task::Poll; | 3 | use core::task::Poll; |
| 4 | 4 | ||
| 5 | use embassy_cortex_m::interrupt::Interrupt; | ||
| 6 | use embassy_hal_common::atomic_ring_buffer::RingBuffer; | 5 | use embassy_hal_common::atomic_ring_buffer::RingBuffer; |
| 7 | use embassy_sync::waitqueue::AtomicWaker; | 6 | use embassy_sync::waitqueue::AtomicWaker; |
| 8 | 7 | ||
| 9 | use super::*; | 8 | use super::*; |
| 9 | use crate::interrupt::typelevel::Interrupt; | ||
| 10 | 10 | ||
| 11 | /// Interrupt handler. | 11 | /// Interrupt handler. |
| 12 | pub struct InterruptHandler<T: BasicInstance> { | 12 | pub struct InterruptHandler<T: BasicInstance> { |
| 13 | _phantom: PhantomData<T>, | 13 | _phantom: PhantomData<T>, |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | impl<T: BasicInstance> interrupt::Handler<T::Interrupt> for InterruptHandler<T> { | 16 | impl<T: BasicInstance> interrupt::typelevel::Handler<T::Interrupt> for InterruptHandler<T> { |
| 17 | unsafe fn on_interrupt() { | 17 | unsafe fn on_interrupt() { |
| 18 | let r = T::regs(); | 18 | let r = T::regs(); |
| 19 | let state = T::buffered_state(); | 19 | let state = T::buffered_state(); |
| @@ -115,7 +115,7 @@ pub struct BufferedUartRx<'d, T: BasicInstance> { | |||
| 115 | impl<'d, T: BasicInstance> BufferedUart<'d, T> { | 115 | impl<'d, T: BasicInstance> BufferedUart<'d, T> { |
| 116 | pub fn new( | 116 | pub fn new( |
| 117 | peri: impl Peripheral<P = T> + 'd, | 117 | peri: impl Peripheral<P = T> + 'd, |
| 118 | _irq: impl interrupt::Binding<T::Interrupt, InterruptHandler<T>> + 'd, | 118 | _irq: impl interrupt::typelevel::Binding<T::Interrupt, InterruptHandler<T>> + 'd, |
| 119 | rx: impl Peripheral<P = impl RxPin<T>> + 'd, | 119 | rx: impl Peripheral<P = impl RxPin<T>> + 'd, |
| 120 | tx: impl Peripheral<P = impl TxPin<T>> + 'd, | 120 | tx: impl Peripheral<P = impl TxPin<T>> + 'd, |
| 121 | tx_buffer: &'d mut [u8], | 121 | tx_buffer: &'d mut [u8], |
| @@ -130,7 +130,7 @@ impl<'d, T: BasicInstance> BufferedUart<'d, T> { | |||
| 130 | 130 | ||
| 131 | pub fn new_with_rtscts( | 131 | pub fn new_with_rtscts( |
| 132 | peri: impl Peripheral<P = T> + 'd, | 132 | peri: impl Peripheral<P = T> + 'd, |
| 133 | _irq: impl interrupt::Binding<T::Interrupt, InterruptHandler<T>> + 'd, | 133 | _irq: impl interrupt::typelevel::Binding<T::Interrupt, InterruptHandler<T>> + 'd, |
| 134 | rx: impl Peripheral<P = impl RxPin<T>> + 'd, | 134 | rx: impl Peripheral<P = impl RxPin<T>> + 'd, |
| 135 | tx: impl Peripheral<P = impl TxPin<T>> + 'd, | 135 | tx: impl Peripheral<P = impl TxPin<T>> + 'd, |
| 136 | rts: impl Peripheral<P = impl RtsPin<T>> + 'd, | 136 | rts: impl Peripheral<P = impl RtsPin<T>> + 'd, |
| @@ -159,7 +159,7 @@ impl<'d, T: BasicInstance> BufferedUart<'d, T> { | |||
| 159 | #[cfg(not(any(usart_v1, usart_v2)))] | 159 | #[cfg(not(any(usart_v1, usart_v2)))] |
| 160 | pub fn new_with_de( | 160 | pub fn new_with_de( |
| 161 | peri: impl Peripheral<P = T> + 'd, | 161 | peri: impl Peripheral<P = T> + 'd, |
| 162 | _irq: impl interrupt::Binding<T::Interrupt, InterruptHandler<T>> + 'd, | 162 | _irq: impl interrupt::typelevel::Binding<T::Interrupt, InterruptHandler<T>> + 'd, |
| 163 | rx: impl Peripheral<P = impl RxPin<T>> + 'd, | 163 | rx: impl Peripheral<P = impl RxPin<T>> + 'd, |
| 164 | tx: impl Peripheral<P = impl TxPin<T>> + 'd, | 164 | tx: impl Peripheral<P = impl TxPin<T>> + 'd, |
| 165 | de: impl Peripheral<P = impl DePin<T>> + 'd, | 165 | de: impl Peripheral<P = impl DePin<T>> + 'd, |
