diff options
| author | Corey Schuhen <[email protected]> | 2025-05-29 20:47:33 +1000 |
|---|---|---|
| committer | Corey Schuhen <[email protected]> | 2025-05-31 08:20:03 +1000 |
| commit | eba9ddc8055da13cb02c5732e30c37d2209cfa28 (patch) | |
| tree | 185afb96b9fa35abfb290a4477d67e1b25ba0b96 | |
| parent | 9b8d6d6f22193ba020ed18c622cb8c6d59e1254f (diff) | |
Switch to SendDynamicSender for FDCAN.
| -rw-r--r-- | embassy-stm32/src/can/common.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/embassy-stm32/src/can/common.rs b/embassy-stm32/src/can/common.rs index e12111910..386d4467c 100644 --- a/embassy-stm32/src/can/common.rs +++ b/embassy-stm32/src/can/common.rs | |||
| @@ -1,29 +1,29 @@ | |||
| 1 | use embassy_sync::channel::{DynamicReceiver, DynamicSender}; | 1 | use embassy_sync::channel::{SendDynamicReceiver, SendDynamicSender}; |
| 2 | 2 | ||
| 3 | use super::enums::*; | 3 | use super::enums::*; |
| 4 | use super::frame::*; | 4 | use super::frame::*; |
| 5 | 5 | ||
| 6 | pub(crate) struct ClassicBufferedRxInner { | 6 | pub(crate) struct ClassicBufferedRxInner { |
| 7 | pub rx_sender: DynamicSender<'static, Result<Envelope, BusError>>, | 7 | pub rx_sender: SendDynamicSender<'static, Result<Envelope, BusError>>, |
| 8 | } | 8 | } |
| 9 | pub(crate) struct ClassicBufferedTxInner { | 9 | pub(crate) struct ClassicBufferedTxInner { |
| 10 | pub tx_receiver: DynamicReceiver<'static, Frame>, | 10 | pub tx_receiver: SendDynamicReceiver<'static, Frame>, |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | #[cfg(any(can_fdcan_v1, can_fdcan_h7))] | 13 | #[cfg(any(can_fdcan_v1, can_fdcan_h7))] |
| 14 | 14 | ||
| 15 | pub(crate) struct FdBufferedRxInner { | 15 | pub(crate) struct FdBufferedRxInner { |
| 16 | pub rx_sender: DynamicSender<'static, Result<FdEnvelope, BusError>>, | 16 | pub rx_sender: SendDynamicSender<'static, Result<FdEnvelope, BusError>>, |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | #[cfg(any(can_fdcan_v1, can_fdcan_h7))] | 19 | #[cfg(any(can_fdcan_v1, can_fdcan_h7))] |
| 20 | pub(crate) struct FdBufferedTxInner { | 20 | pub(crate) struct FdBufferedTxInner { |
| 21 | pub tx_receiver: DynamicReceiver<'static, FdFrame>, | 21 | pub tx_receiver: SendDynamicReceiver<'static, FdFrame>, |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | /// Sender that can be used for sending CAN frames. | 24 | /// Sender that can be used for sending CAN frames. |
| 25 | pub struct BufferedSender<'ch, FRAME> { | 25 | pub struct BufferedSender<'ch, FRAME> { |
| 26 | pub(crate) tx_buf: embassy_sync::channel::DynamicSender<'ch, FRAME>, | 26 | pub(crate) tx_buf: embassy_sync::channel::SendDynamicSender<'ch, FRAME>, |
| 27 | pub(crate) waker: fn(), | 27 | pub(crate) waker: fn(), |
| 28 | pub(crate) internal_operation: fn(InternalOperation), | 28 | pub(crate) internal_operation: fn(InternalOperation), |
| 29 | } | 29 | } |
| @@ -70,7 +70,7 @@ pub type BufferedCanSender = BufferedSender<'static, Frame>; | |||
| 70 | 70 | ||
| 71 | /// Receiver that can be used for receiving CAN frames. Note, each CAN frame will only be received by one receiver. | 71 | /// Receiver that can be used for receiving CAN frames. Note, each CAN frame will only be received by one receiver. |
| 72 | pub struct BufferedReceiver<'ch, ENVELOPE> { | 72 | pub struct BufferedReceiver<'ch, ENVELOPE> { |
| 73 | pub(crate) rx_buf: embassy_sync::channel::DynamicReceiver<'ch, Result<ENVELOPE, BusError>>, | 73 | pub(crate) rx_buf: embassy_sync::channel::SendDynamicReceiver<'ch, Result<ENVELOPE, BusError>>, |
| 74 | pub(crate) internal_operation: fn(InternalOperation), | 74 | pub(crate) internal_operation: fn(InternalOperation), |
| 75 | } | 75 | } |
| 76 | 76 | ||
