pub type R = crate::R<CR1rs>;
pub type W = crate::W<CR1rs>;
pub type LPMS_R = crate::FieldReader;
pub type LPMS_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type FPD_STOP_R = crate::BitReader;
pub type FPD_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FPD_LPRUN_R = crate::BitReader;
pub type FPD_LPRUN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FPD_LPSLP_R = crate::BitReader;
pub type FPD_LPSLP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DBP_R = crate::BitReader;
pub type DBP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type VOS_R = crate::FieldReader;
pub type VOS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type LPR_R = crate::BitReader;
pub type LPR_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn lpms(&self) -> LPMS_R {
LPMS_R::new((self.bits & 7) as u8)
}
#[inline(always)]
pub fn fpd_stop(&self) -> FPD_STOP_R {
FPD_STOP_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn fpd_lprun(&self) -> FPD_LPRUN_R {
FPD_LPRUN_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn fpd_lpslp(&self) -> FPD_LPSLP_R {
FPD_LPSLP_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn dbp(&self) -> DBP_R {
DBP_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn vos(&self) -> VOS_R {
VOS_R::new(((self.bits >> 9) & 3) as u8)
}
#[inline(always)]
pub fn lpr(&self) -> LPR_R {
LPR_R::new(((self.bits >> 14) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR1")
.field("lpr", &self.lpr())
.field("vos", &self.vos())
.field("dbp", &self.dbp())
.field("fpd_lpslp", &self.fpd_lpslp())
.field("fpd_lprun", &self.fpd_lprun())
.field("fpd_stop", &self.fpd_stop())
.field("lpms", &self.lpms())
.finish()
}
}
impl W {
#[inline(always)]
pub fn lpms(&mut self) -> LPMS_W<CR1rs> {
LPMS_W::new(self, 0)
}
#[inline(always)]
pub fn fpd_stop(&mut self) -> FPD_STOP_W<CR1rs> {
FPD_STOP_W::new(self, 3)
}
#[inline(always)]
pub fn fpd_lprun(&mut self) -> FPD_LPRUN_W<CR1rs> {
FPD_LPRUN_W::new(self, 4)
}
#[inline(always)]
pub fn fpd_lpslp(&mut self) -> FPD_LPSLP_W<CR1rs> {
FPD_LPSLP_W::new(self, 5)
}
#[inline(always)]
pub fn dbp(&mut self) -> DBP_W<CR1rs> {
DBP_W::new(self, 8)
}
#[inline(always)]
pub fn vos(&mut self) -> VOS_W<CR1rs> {
VOS_W::new(self, 9)
}
#[inline(always)]
pub fn lpr(&mut self) -> LPR_W<CR1rs> {
LPR_W::new(self, 14)
}
}
pub struct CR1rs;
impl crate::RegisterSpec for CR1rs {
type Ux = u32;
}
impl crate::Readable for CR1rs {}
impl crate::Writable for CR1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CR1rs {
const RESET_VALUE: u32 = 0x0208;
}