diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-03-26 16:01:37 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-03-27 15:18:06 +0100 |
| commit | d41eeeae79388f219bf6a84e2f7bde9f6b532516 (patch) | |
| tree | 678b6fc732216e529dc38e6f65b72a309917ac32 /embassy-nrf/src/nfct.rs | |
| parent | 9edf5b7f049f95742b60b041e4443967d8a6b708 (diff) | |
Remove Peripheral trait, rename PeripheralRef->Peri.
Diffstat (limited to 'embassy-nrf/src/nfct.rs')
| -rw-r--r-- | embassy-nrf/src/nfct.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/embassy-nrf/src/nfct.rs b/embassy-nrf/src/nfct.rs index 8b4b6dfe0..8d70ec954 100644 --- a/embassy-nrf/src/nfct.rs +++ b/embassy-nrf/src/nfct.rs | |||
| @@ -13,7 +13,6 @@ use core::future::poll_fn; | |||
| 13 | use core::sync::atomic::{compiler_fence, Ordering}; | 13 | use core::sync::atomic::{compiler_fence, Ordering}; |
| 14 | use core::task::Poll; | 14 | use core::task::Poll; |
| 15 | 15 | ||
| 16 | use embassy_hal_internal::{into_ref, PeripheralRef}; | ||
| 17 | use embassy_sync::waitqueue::AtomicWaker; | 16 | use embassy_sync::waitqueue::AtomicWaker; |
| 18 | pub use vals::{Bitframesdd as SddPat, Discardmode as DiscardMode}; | 17 | pub use vals::{Bitframesdd as SddPat, Discardmode as DiscardMode}; |
| 19 | 18 | ||
| @@ -22,7 +21,7 @@ use crate::pac::nfct::vals; | |||
| 22 | use crate::pac::NFCT; | 21 | use crate::pac::NFCT; |
| 23 | use crate::peripherals::NFCT; | 22 | use crate::peripherals::NFCT; |
| 24 | use crate::util::slice_in_ram; | 23 | use crate::util::slice_in_ram; |
| 25 | use crate::{interrupt, pac, Peripheral}; | 24 | use crate::{interrupt, pac, Peri}; |
| 26 | 25 | ||
| 27 | /// NFCID1 (aka UID) of different sizes. | 26 | /// NFCID1 (aka UID) of different sizes. |
| 28 | #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] | 27 | #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] |
| @@ -96,7 +95,7 @@ pub enum Error { | |||
| 96 | 95 | ||
| 97 | /// NFC tag emulator driver. | 96 | /// NFC tag emulator driver. |
| 98 | pub struct NfcT<'d> { | 97 | pub struct NfcT<'d> { |
| 99 | _p: PeripheralRef<'d, NFCT>, | 98 | _p: Peri<'d, NFCT>, |
| 100 | rx_buf: [u8; 256], | 99 | rx_buf: [u8; 256], |
| 101 | tx_buf: [u8; 256], | 100 | tx_buf: [u8; 256], |
| 102 | } | 101 | } |
| @@ -104,12 +103,10 @@ pub struct NfcT<'d> { | |||
| 104 | impl<'d> NfcT<'d> { | 103 | impl<'d> NfcT<'d> { |
| 105 | /// Create an Nfc Tag driver | 104 | /// Create an Nfc Tag driver |
| 106 | pub fn new( | 105 | pub fn new( |
| 107 | _p: impl Peripheral<P = NFCT> + 'd, | 106 | _p: Peri<'d, NFCT>, |
| 108 | _irq: impl interrupt::typelevel::Binding<interrupt::typelevel::NFCT, InterruptHandler> + 'd, | 107 | _irq: impl interrupt::typelevel::Binding<interrupt::typelevel::NFCT, InterruptHandler> + 'd, |
| 109 | config: &Config, | 108 | config: &Config, |
| 110 | ) -> Self { | 109 | ) -> Self { |
| 111 | into_ref!(_p); | ||
| 112 | |||
| 113 | let r = pac::NFCT; | 110 | let r = pac::NFCT; |
| 114 | 111 | ||
| 115 | unsafe { | 112 | unsafe { |
