From f2c1da56eb9690c9fa3edcd73d430e669fa7baa7 Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Tue, 4 Nov 2025 13:29:04 +0100 Subject: fix: warnings --- embassy-nrf/src/cracen.rs | 17 ++++++----------- embassy-nrf/src/lib.rs | 1 + 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/embassy-nrf/src/cracen.rs b/embassy-nrf/src/cracen.rs index ddc592689..62e6f8c86 100644 --- a/embassy-nrf/src/cracen.rs +++ b/embassy-nrf/src/cracen.rs @@ -2,10 +2,13 @@ #![macro_use] -use crate::mode::{Async, Blocking, Mode}; +use crate::mode::{Blocking, Mode}; use crate::{Peri, interrupt, pac, peripherals}; use core::marker::PhantomData; +/// A wrapper around an nRF54 CRACEN peripheral. +/// +/// It has a blocking api through `rand`. pub struct Cracen<'d, M: Mode> { _peri: Peri<'d, peripherals::CRACEN>, _p: PhantomData, @@ -14,8 +17,6 @@ pub struct Cracen<'d, M: Mode> { impl<'d> Cracen<'d, Blocking> { /// Create a new CRACEN driver. pub fn new_blocking(_peri: Peri<'d, peripherals::CRACEN>) -> Self { - let r = pac::CRACEN; - let me = Self { _peri, _p: PhantomData }; me.stop(); @@ -136,9 +137,7 @@ impl<'d, M: Mode> rand_core_09::RngCore for Cracen<'d, M> { impl<'d, M: Mode> rand_core_09::CryptoRng for Cracen<'d, M> {} -pub(crate) trait SealedInstance { - fn regs() -> pac::cracen::Cracen; -} +pub(crate) trait SealedInstance {} /// CRACEN peripheral instance. #[allow(private_bounds)] @@ -149,11 +148,7 @@ pub trait Instance: SealedInstance + 'static + Send { macro_rules! impl_cracen { ($type:ident, $pac_type:ident, $irq:ident) => { - impl crate::cracen::SealedInstance for peripherals::$type { - fn regs() -> crate::pac::cracen::Cracen { - pac::$pac_type - } - } + impl crate::cracen::SealedInstance for peripherals::$type {} impl crate::cracen::Instance for peripherals::$type { type Interrupt = crate::interrupt::typelevel::$irq; } diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index bc386e820..69ca4e0a1 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs @@ -563,6 +563,7 @@ pub mod config { pub time_interrupt_priority: crate::interrupt::Priority, /// Enable or disable the debug port. pub debug: Debug, + /// Clock speed configuration. #[cfg(feature = "_nrf54l")] pub clock_speed: ClockSpeed, } -- cgit