pub struct RtcOsc<I: RtcSourceId> { /* private fields */ }Expand description
Oscillator for the Rtc
The RtcOsc represents proof that a clock source for the Rtc has been
selected and configured. It also guarantees that the clock source for the
RTC will not be modified or disabled while it is in use.
See the module-level documentation for an example of creating the
RtcOsc.
Implementations§
Source§impl<I: RtcSourceId> RtcOsc<I>
impl<I: RtcSourceId> RtcOsc<I>
Sourcepub fn enable<S>(token: RtcOscToken, source: S) -> (Self, S::Inc)
pub fn enable<S>(token: RtcOscToken, source: S) -> (Self, S::Inc)
Sourcepub fn disable<S>(self, source: S) -> (RtcOscToken, S::Dec)
pub fn disable<S>(self, source: S) -> (RtcOscToken, S::Dec)
Consume the RtcOsc and return the RtcOscToken
Disabling the RtcOsc will Decrement the consumer count of its
Enabled clock Source.
Auto Trait Implementations§
impl<I> Freeze for RtcOsc<I>
impl<I> RefUnwindSafe for RtcOsc<I>where
I: RefUnwindSafe,
impl<I> Send for RtcOsc<I>where
I: Send,
impl<I> Sync for RtcOsc<I>where
I: Sync,
impl<I> Unpin for RtcOsc<I>where
I: Unpin,
impl<I> UnwindSafe for RtcOsc<I>where
I: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more