From 487a6324ef3897a283bff5356bd511c7f570ed12 Mon Sep 17 00:00:00 2001 From: Scott Mabin Date: Sat, 23 Dec 2023 00:14:10 +0000 Subject: [PATCH] stm32: make time provider public again --- embassy-stm32/src/rtc/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/src/rtc/mod.rs b/embassy-stm32/src/rtc/mod.rs index 40cd752a2..65e8713f0 100644 --- a/embassy-stm32/src/rtc/mod.rs +++ b/embassy-stm32/src/rtc/mod.rs @@ -102,7 +102,8 @@ pub enum RtcError { NotRunning, } -pub(crate) struct RtcTimeProvider { +/// Provides immutable access to the current time of the RTC. +pub struct RtcTimeProvider { _private: (), } @@ -243,7 +244,7 @@ impl Rtc { } /// Acquire a [`RtcTimeProvider`] instance. - pub(crate) const fn time_provider(&self) -> RtcTimeProvider { + pub const fn time_provider(&self) -> RtcTimeProvider { RtcTimeProvider { _private: () } }