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/twim.rs | |
| parent | 8a9d2f59af004902d3978a2922843833b98bcce0 (diff) | |
Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral
Diffstat (limited to 'embassy-nrf/src/twim.rs')
| -rw-r--r-- | embassy-nrf/src/twim.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/embassy-nrf/src/twim.rs b/embassy-nrf/src/twim.rs index 2088691b2..7699d2a71 100644 --- a/embassy-nrf/src/twim.rs +++ b/embassy-nrf/src/twim.rs | |||
| @@ -16,14 +16,14 @@ use core::task::Poll; | |||
| 16 | use embassy::time::{Duration, Instant}; | 16 | use embassy::time::{Duration, Instant}; |
| 17 | use embassy::waitqueue::AtomicWaker; | 17 | use embassy::waitqueue::AtomicWaker; |
| 18 | use embassy_embedded_hal::SetConfig; | 18 | use embassy_embedded_hal::SetConfig; |
| 19 | use embassy_hal_common::unborrow; | 19 | use embassy_hal_common::into_ref; |
| 20 | use futures::future::poll_fn; | 20 | use futures::future::poll_fn; |
| 21 | 21 | ||
| 22 | use crate::chip::{EASY_DMA_SIZE, FORCE_COPY_BUFFER_SIZE}; | 22 | use crate::chip::{EASY_DMA_SIZE, FORCE_COPY_BUFFER_SIZE}; |
| 23 | use crate::gpio::Pin as GpioPin; | 23 | use crate::gpio::Pin as GpioPin; |
| 24 | use crate::interrupt::{Interrupt, InterruptExt}; | 24 | use crate::interrupt::{Interrupt, InterruptExt}; |
| 25 | use crate::util::{slice_in_ram, slice_in_ram_or}; | 25 | use crate::util::{slice_in_ram, slice_in_ram_or}; |
| 26 | use crate::{gpio, pac, Unborrow}; | 26 | use crate::{gpio, pac, Peripheral}; |
| 27 | 27 | ||
| 28 | #[derive(Clone, Copy)] | 28 | #[derive(Clone, Copy)] |
| 29 | pub enum Frequency { | 29 | pub enum Frequency { |
| @@ -80,13 +80,13 @@ pub struct Twim<'d, T: Instance> { | |||
| 80 | 80 | ||
| 81 | impl<'d, T: Instance> Twim<'d, T> { | 81 | impl<'d, T: Instance> Twim<'d, T> { |
| 82 | pub fn new( | 82 | pub fn new( |
| 83 | _twim: impl Unborrow<Target = T> + 'd, | 83 | _twim: impl Peripheral<P = T> + 'd, |
| 84 | irq: impl Unborrow<Target = T::Interrupt> + 'd, | 84 | irq: impl Peripheral<P = T::Interrupt> + 'd, |
| 85 | sda: impl Unborrow<Target = impl GpioPin> + 'd, | 85 | sda: impl Peripheral<P = impl GpioPin> + 'd, |
| 86 | scl: impl Unborrow<Target = impl GpioPin> + 'd, | 86 | scl: impl Peripheral<P = impl GpioPin> + 'd, |
| 87 | config: Config, | 87 | config: Config, |
| 88 | ) -> Self { | 88 | ) -> Self { |
| 89 | unborrow!(irq, sda, scl); | 89 | into_ref!(irq, sda, scl); |
| 90 | 90 | ||
| 91 | let r = T::regs(); | 91 | let r = T::regs(); |
| 92 | 92 | ||
| @@ -707,7 +707,7 @@ pub(crate) mod sealed { | |||
| 707 | } | 707 | } |
| 708 | } | 708 | } |
| 709 | 709 | ||
| 710 | pub trait Instance: Unborrow<Target = Self> + sealed::Instance + 'static { | 710 | pub trait Instance: Peripheral<P = Self> + sealed::Instance + 'static { |
| 711 | type Interrupt: Interrupt; | 711 | type Interrupt: Interrupt; |
| 712 | } | 712 | } |
| 713 | 713 | ||
