diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-07-23 14:00:19 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-07-23 14:00:19 +0200 |
| commit | 4901c34d9c4cd326ab9bca02dd099a663da2567f (patch) | |
| tree | 8225afebb595fb10c1d67148c0d19b7b732853da /embassy-nrf/src/temp.rs | |
| parent | 8a9d2f59af004902d3978a2922843833b98bcce0 (diff) | |
Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral
Diffstat (limited to 'embassy-nrf/src/temp.rs')
| -rw-r--r-- | embassy-nrf/src/temp.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-nrf/src/temp.rs b/embassy-nrf/src/temp.rs index 0bb82a499..a3b25ce05 100644 --- a/embassy-nrf/src/temp.rs +++ b/embassy-nrf/src/temp.rs | |||
| @@ -4,24 +4,24 @@ use core::task::Poll; | |||
| 4 | 4 | ||
| 5 | use embassy::waitqueue::AtomicWaker; | 5 | use embassy::waitqueue::AtomicWaker; |
| 6 | use embassy_hal_common::drop::OnDrop; | 6 | use embassy_hal_common::drop::OnDrop; |
| 7 | use embassy_hal_common::{unborrow, Unborrowed}; | 7 | use embassy_hal_common::{into_ref, PeripheralRef}; |
| 8 | use fixed::types::I30F2; | 8 | use fixed::types::I30F2; |
| 9 | use futures::future::poll_fn; | 9 | use futures::future::poll_fn; |
| 10 | 10 | ||
| 11 | use crate::interrupt::InterruptExt; | 11 | use crate::interrupt::InterruptExt; |
| 12 | use crate::peripherals::TEMP; | 12 | use crate::peripherals::TEMP; |
| 13 | use crate::{interrupt, pac, Unborrow}; | 13 | use crate::{interrupt, pac, Peripheral}; |
| 14 | 14 | ||
| 15 | /// Integrated temperature sensor. | 15 | /// Integrated temperature sensor. |
| 16 | pub struct Temp<'d> { | 16 | pub struct Temp<'d> { |
| 17 | _irq: Unborrowed<'d, interrupt::TEMP>, | 17 | _irq: PeripheralRef<'d, interrupt::TEMP>, |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | static WAKER: AtomicWaker = AtomicWaker::new(); | 20 | static WAKER: AtomicWaker = AtomicWaker::new(); |
| 21 | 21 | ||
| 22 | impl<'d> Temp<'d> { | 22 | impl<'d> Temp<'d> { |
| 23 | pub fn new(_t: impl Unborrow<Target = TEMP> + 'd, irq: impl Unborrow<Target = interrupt::TEMP> + 'd) -> Self { | 23 | pub fn new(_t: impl Peripheral<P = TEMP> + 'd, irq: impl Peripheral<P = interrupt::TEMP> + 'd) -> Self { |
| 24 | unborrow!(_t, irq); | 24 | into_ref!(_t, irq); |
| 25 | 25 | ||
| 26 | // Enable interrupt that signals temperature values | 26 | // Enable interrupt that signals temperature values |
| 27 | irq.disable(); | 27 | irq.disable(); |
