diff options
Diffstat (limited to 'embassy-stm32/src/ipcc.rs')
| -rw-r--r-- | embassy-stm32/src/ipcc.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/embassy-stm32/src/ipcc.rs b/embassy-stm32/src/ipcc.rs index 903aeca30..2b9caf8e5 100644 --- a/embassy-stm32/src/ipcc.rs +++ b/embassy-stm32/src/ipcc.rs | |||
| @@ -35,6 +35,10 @@ pub struct Ipcc<'d> { | |||
| 35 | 35 | ||
| 36 | impl<'d> Ipcc<'d> { | 36 | impl<'d> Ipcc<'d> { |
| 37 | pub fn new(peri: impl Peripheral<P = IPCC> + 'd, _config: Config) -> Self { | 37 | pub fn new(peri: impl Peripheral<P = IPCC> + 'd, _config: Config) -> Self { |
| 38 | Self::new_inner(peri) | ||
| 39 | } | ||
| 40 | |||
| 41 | pub(crate) fn new_inner(peri: impl Peripheral<P = IPCC> + 'd) -> Self { | ||
| 38 | into_ref!(peri); | 42 | into_ref!(peri); |
| 39 | 43 | ||
| 40 | Self { _peri: peri } | 44 | Self { _peri: peri } |
| @@ -158,6 +162,10 @@ impl<'d> Ipcc<'d> { | |||
| 158 | pub fn is_rx_pending(&self, channel: IpccChannel) -> bool { | 162 | pub fn is_rx_pending(&self, channel: IpccChannel) -> bool { |
| 159 | self.c2_is_active_flag(channel) && self.c1_get_rx_channel(channel) | 163 | self.c2_is_active_flag(channel) && self.c1_get_rx_channel(channel) |
| 160 | } | 164 | } |
| 165 | |||
| 166 | pub fn as_mut_ptr(&self) -> *mut Self { | ||
| 167 | unsafe { &mut core::ptr::read(self) as *mut _ } | ||
| 168 | } | ||
| 161 | } | 169 | } |
| 162 | 170 | ||
| 163 | impl sealed::Instance for crate::peripherals::IPCC { | 171 | impl sealed::Instance for crate::peripherals::IPCC { |
