aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/macros.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-03-26 16:01:37 +0100
committerDario Nieuwenhuis <[email protected]>2025-03-27 15:18:06 +0100
commitd41eeeae79388f219bf6a84e2f7bde9f6b532516 (patch)
tree678b6fc732216e529dc38e6f65b72a309917ac32 /embassy-stm32/src/macros.rs
parent9edf5b7f049f95742b60b041e4443967d8a6b708 (diff)
Remove Peripheral trait, rename PeripheralRef->Peri.
Diffstat (limited to 'embassy-stm32/src/macros.rs')
-rw-r--r--embassy-stm32/src/macros.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/embassy-stm32/src/macros.rs b/embassy-stm32/src/macros.rs
index 000773e2d..2c181a254 100644
--- a/embassy-stm32/src/macros.rs
+++ b/embassy-stm32/src/macros.rs
@@ -14,7 +14,7 @@ macro_rules! peri_trait {
14 14
15 /// Peripheral instance trait. 15 /// Peripheral instance trait.
16 #[allow(private_bounds)] 16 #[allow(private_bounds)]
17 pub trait Instance: crate::Peripheral<P = Self> + SealedInstance + crate::rcc::RccPeripheral { 17 pub trait Instance: SealedInstance + crate::PeripheralType + crate::rcc::RccPeripheral {
18 $($( 18 $($(
19 /// Interrupt for this peripheral. 19 /// Interrupt for this peripheral.
20 type $irq: crate::interrupt::typelevel::Interrupt; 20 type $irq: crate::interrupt::typelevel::Interrupt;
@@ -88,10 +88,10 @@ macro_rules! dma_trait_impl {
88#[allow(unused)] 88#[allow(unused)]
89macro_rules! new_dma_nonopt { 89macro_rules! new_dma_nonopt {
90 ($name:ident) => {{ 90 ($name:ident) => {{
91 let dma = $name.into_ref(); 91 let dma = $name;
92 let request = dma.request(); 92 let request = dma.request();
93 crate::dma::ChannelAndRequest { 93 crate::dma::ChannelAndRequest {
94 channel: dma.map_into(), 94 channel: dma.into(),
95 request, 95 request,
96 } 96 }
97 }}; 97 }};
@@ -99,10 +99,10 @@ macro_rules! new_dma_nonopt {
99 99
100macro_rules! new_dma { 100macro_rules! new_dma {
101 ($name:ident) => {{ 101 ($name:ident) => {{
102 let dma = $name.into_ref(); 102 let dma = $name;
103 let request = dma.request(); 103 let request = dma.request();
104 Some(crate::dma::ChannelAndRequest { 104 Some(crate::dma::ChannelAndRequest {
105 channel: dma.map_into(), 105 channel: dma.into(),
106 request, 106 request,
107 }) 107 })
108 }}; 108 }};
@@ -110,8 +110,8 @@ macro_rules! new_dma {
110 110
111macro_rules! new_pin { 111macro_rules! new_pin {
112 ($name:ident, $af_type:expr) => {{ 112 ($name:ident, $af_type:expr) => {{
113 let pin = $name.into_ref(); 113 let pin = $name;
114 pin.set_as_af(pin.af_num(), $af_type); 114 pin.set_as_af(pin.af_num(), $af_type);
115 Some(pin.map_into()) 115 Some(pin.into())
116 }}; 116 }};
117} 117}