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/nvmc.rs | |
| parent | 8a9d2f59af004902d3978a2922843833b98bcce0 (diff) | |
Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral
Diffstat (limited to 'embassy-nrf/src/nvmc.rs')
| -rw-r--r-- | embassy-nrf/src/nvmc.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-nrf/src/nvmc.rs b/embassy-nrf/src/nvmc.rs index e350f8c99..731def46a 100644 --- a/embassy-nrf/src/nvmc.rs +++ b/embassy-nrf/src/nvmc.rs | |||
| @@ -3,13 +3,13 @@ | |||
| 3 | use core::marker::PhantomData; | 3 | use core::marker::PhantomData; |
| 4 | use core::{ptr, slice}; | 4 | use core::{ptr, slice}; |
| 5 | 5 | ||
| 6 | use embassy_hal_common::unborrow; | 6 | use embassy_hal_common::into_ref; |
| 7 | use embedded_storage::nor_flash::{ | 7 | use embedded_storage::nor_flash::{ |
| 8 | ErrorType, MultiwriteNorFlash, NorFlash, NorFlashError, NorFlashErrorKind, ReadNorFlash, | 8 | ErrorType, MultiwriteNorFlash, NorFlash, NorFlashError, NorFlashErrorKind, ReadNorFlash, |
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | use crate::peripherals::NVMC; | 11 | use crate::peripherals::NVMC; |
| 12 | use crate::{pac, Unborrow}; | 12 | use crate::{pac, Peripheral}; |
| 13 | 13 | ||
| 14 | pub const PAGE_SIZE: usize = 4096; | 14 | pub const PAGE_SIZE: usize = 4096; |
| 15 | pub const FLASH_SIZE: usize = crate::chip::FLASH_SIZE; | 15 | pub const FLASH_SIZE: usize = crate::chip::FLASH_SIZE; |
| @@ -35,8 +35,8 @@ pub struct Nvmc<'d> { | |||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | impl<'d> Nvmc<'d> { | 37 | impl<'d> Nvmc<'d> { |
| 38 | pub fn new(_p: impl Unborrow<Target = NVMC> + 'd) -> Self { | 38 | pub fn new(_p: impl Peripheral<P = NVMC> + 'd) -> Self { |
| 39 | unborrow!(_p); | 39 | into_ref!(_p); |
| 40 | 40 | ||
| 41 | Self { _p: PhantomData } | 41 | Self { _p: PhantomData } |
| 42 | } | 42 | } |
