s32k118.rs/src/cmu_fc_1/ltcr.rs

41 lines
1.1 KiB
Rust

#[doc = "Reader of register LTCR"]
pub type R = crate::R<u32, super::LTCR>;
#[doc = "Writer for register LTCR"]
pub type W = crate::W<u32, super::LTCR>;
#[doc = "Register LTCR `reset()`'s with value 0"]
impl crate::ResetValue for super::LTCR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `LFREF`"]
pub type LFREF_R = crate::R<u32, u32>;
#[doc = "Write proxy for field `LFREF`"]
pub struct LFREF_W<'a> {
w: &'a mut W,
}
impl<'a> LFREF_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u32) -> &'a mut W {
self.w.bits = (self.w.bits & !0x00ff_ffff) | ((value as u32) & 0x00ff_ffff);
self.w
}
}
impl R {
#[doc = "Bits 0:23 - Low Frequency Reference Threshold"]
#[inline(always)]
pub fn lfref(&self) -> LFREF_R {
LFREF_R::new((self.bits & 0x00ff_ffff) as u32)
}
}
impl W {
#[doc = "Bits 0:23 - Low Frequency Reference Threshold"]
#[inline(always)]
pub fn lfref(&mut self) -> LFREF_W {
LFREF_W { w: self }
}
}