Merge pull request #2352 from MabezDev/public-rtc-time-provider

stm32: make time provider public again
This commit is contained in:
Dario Nieuwenhuis 2023-12-23 15:40:21 +01:00 committed by GitHub
commit e7d071ec9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,7 +102,8 @@ pub enum RtcError {
NotRunning, NotRunning,
} }
pub(crate) struct RtcTimeProvider { /// Provides immutable access to the current time of the RTC.
pub struct RtcTimeProvider {
_private: (), _private: (),
} }
@ -243,7 +244,7 @@ impl Rtc {
} }
/// Acquire a [`RtcTimeProvider`] instance. /// Acquire a [`RtcTimeProvider`] instance.
pub(crate) const fn time_provider(&self) -> RtcTimeProvider { pub const fn time_provider(&self) -> RtcTimeProvider {
RtcTimeProvider { _private: () } RtcTimeProvider { _private: () }
} }