pub type R = crate::R<CR1rs>;
pub type W = crate::W<CR1rs>;
pub type LPDS_R = crate::BitReader;
pub type LPDS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PVDE_R = crate::BitReader;
pub type PVDE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PLS_R = crate::FieldReader;
pub type PLS_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type DBP_R = crate::BitReader;
pub type DBP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FLPS_R = crate::BitReader;
pub type FLPS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SVOS_R = crate::FieldReader;
pub type SVOS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type AVDEN_R = crate::BitReader;
pub type AVDEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ALS_R = crate::FieldReader;
pub type ALS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn lpds(&self) -> LPDS_R {
LPDS_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn pvde(&self) -> PVDE_R {
PVDE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn pls(&self) -> PLS_R {
PLS_R::new(((self.bits >> 5) & 7) as u8)
}
#[inline(always)]
pub fn dbp(&self) -> DBP_R {
DBP_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn flps(&self) -> FLPS_R {
FLPS_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn svos(&self) -> SVOS_R {
SVOS_R::new(((self.bits >> 14) & 3) as u8)
}
#[inline(always)]
pub fn avden(&self) -> AVDEN_R {
AVDEN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn als(&self) -> ALS_R {
ALS_R::new(((self.bits >> 17) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR1")
.field("lpds", &self.lpds())
.field("pvde", &self.pvde())
.field("pls", &self.pls())
.field("dbp", &self.dbp())
.field("flps", &self.flps())
.field("svos", &self.svos())
.field("avden", &self.avden())
.field("als", &self.als())
.finish()
}
}
impl W {
#[inline(always)]
pub fn lpds(&mut self) -> LPDS_W<CR1rs> {
LPDS_W::new(self, 0)
}
#[inline(always)]
pub fn pvde(&mut self) -> PVDE_W<CR1rs> {
PVDE_W::new(self, 4)
}
#[inline(always)]
pub fn pls(&mut self) -> PLS_W<CR1rs> {
PLS_W::new(self, 5)
}
#[inline(always)]
pub fn dbp(&mut self) -> DBP_W<CR1rs> {
DBP_W::new(self, 8)
}
#[inline(always)]
pub fn flps(&mut self) -> FLPS_W<CR1rs> {
FLPS_W::new(self, 9)
}
#[inline(always)]
pub fn svos(&mut self) -> SVOS_W<CR1rs> {
SVOS_W::new(self, 14)
}
#[inline(always)]
pub fn avden(&mut self) -> AVDEN_W<CR1rs> {
AVDEN_W::new(self, 16)
}
#[inline(always)]
pub fn als(&mut self) -> ALS_W<CR1rs> {
ALS_W::new(self, 17)
}
}
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 = 0xf000_c000;
}