From 4901c34d9c4cd326ab9bca02dd099a663da2567f Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Sat, 23 Jul 2022 14:00:19 +0200 Subject: Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral --- examples/stm32h7/src/bin/low_level_timer_api.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'examples') diff --git a/examples/stm32h7/src/bin/low_level_timer_api.rs b/examples/stm32h7/src/bin/low_level_timer_api.rs index e54f1bb67..d7c6da5bd 100644 --- a/examples/stm32h7/src/bin/low_level_timer_api.rs +++ b/examples/stm32h7/src/bin/low_level_timer_api.rs @@ -9,7 +9,7 @@ use embassy_stm32::gpio::low_level::AFType; use embassy_stm32::gpio::Speed; use embassy_stm32::pwm::*; use embassy_stm32::time::{khz, mhz, Hertz}; -use embassy_stm32::{unborrow, Config, Peripherals, Unborrow, Unborrowed}; +use embassy_stm32::{into_ref, Config, Peripheral, PeripheralRef, Peripherals}; use {defmt_rtt as _, panic_probe as _}; pub fn config() -> Config { @@ -47,19 +47,19 @@ async fn main(_spawner: Spawner, p: Peripherals) { } } pub struct SimplePwm32<'d, T: CaptureCompare32bitInstance> { - inner: Unborrowed<'d, T>, + inner: PeripheralRef<'d, T>, } impl<'d, T: CaptureCompare32bitInstance> SimplePwm32<'d, T> { pub fn new( - tim: impl Unborrow + 'd, - ch1: impl Unborrow> + 'd, - ch2: impl Unborrow> + 'd, - ch3: impl Unborrow> + 'd, - ch4: impl Unborrow> + 'd, + tim: impl Peripheral

+ 'd, + ch1: impl Peripheral

> + 'd, + ch2: impl Peripheral

> + 'd, + ch3: impl Peripheral

> + 'd, + ch4: impl Peripheral

> + 'd, freq: Hertz, ) -> Self { - unborrow!(tim, ch1, ch2, ch3, ch4); + into_ref!(tim, ch1, ch2, ch3, ch4); T::enable(); ::reset(); -- cgit