pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type PG_R = crate::BitReader;
pub type PG_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PER_R = crate::BitReader;
pub type PER_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MER_R = crate::BitReader;
pub type MER_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PNB_R = crate::FieldReader;
pub type PNB_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type STRT_R = crate::BitReader;
pub type STRT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OPTSTRT_R = crate::BitReader;
pub type OPTSTRT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FSTPG_R = crate::BitReader;
pub type FSTPG_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EOPIE_R = crate::BitReader;
pub type EOPIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ERRIE_R = crate::BitReader;
pub type ERRIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RDERRIE_R = crate::BitReader;
pub type RDERRIE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OBL_LAUNCH_R = crate::BitReader;
pub type OBL_LAUNCH_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OPTLOCK_R = crate::BitReader;
pub type OPTLOCK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LOCK_R = crate::BitReader;
pub type LOCK_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn pg(&self) -> PG_R {
PG_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn per(&self) -> PER_R {
PER_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn mer(&self) -> MER_R {
MER_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn pnb(&self) -> PNB_R {
PNB_R::new(((self.bits >> 3) & 0xff) as u8)
}
#[inline(always)]
pub fn strt(&self) -> STRT_R {
STRT_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn optstrt(&self) -> OPTSTRT_R {
OPTSTRT_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn fstpg(&self) -> FSTPG_R {
FSTPG_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn eopie(&self) -> EOPIE_R {
EOPIE_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn errie(&self) -> ERRIE_R {
ERRIE_R::new(((self.bits >> 25) & 1) != 0)
}
#[inline(always)]
pub fn rderrie(&self) -> RDERRIE_R {
RDERRIE_R::new(((self.bits >> 26) & 1) != 0)
}
#[inline(always)]
pub fn obl_launch(&self) -> OBL_LAUNCH_R {
OBL_LAUNCH_R::new(((self.bits >> 27) & 1) != 0)
}
#[inline(always)]
pub fn optlock(&self) -> OPTLOCK_R {
OPTLOCK_R::new(((self.bits >> 30) & 1) != 0)
}
#[inline(always)]
pub fn lock(&self) -> LOCK_R {
LOCK_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("pg", &self.pg())
.field("per", &self.per())
.field("mer", &self.mer())
.field("pnb", &self.pnb())
.field("strt", &self.strt())
.field("optstrt", &self.optstrt())
.field("fstpg", &self.fstpg())
.field("eopie", &self.eopie())
.field("errie", &self.errie())
.field("rderrie", &self.rderrie())
.field("obl_launch", &self.obl_launch())
.field("optlock", &self.optlock())
.field("lock", &self.lock())
.finish()
}
}
impl W {
#[inline(always)]
pub fn pg(&mut self) -> PG_W<CRrs> {
PG_W::new(self, 0)
}
#[inline(always)]
pub fn per(&mut self) -> PER_W<CRrs> {
PER_W::new(self, 1)
}
#[inline(always)]
pub fn mer(&mut self) -> MER_W<CRrs> {
MER_W::new(self, 2)
}
#[inline(always)]
pub fn pnb(&mut self) -> PNB_W<CRrs> {
PNB_W::new(self, 3)
}
#[inline(always)]
pub fn strt(&mut self) -> STRT_W<CRrs> {
STRT_W::new(self, 16)
}
#[inline(always)]
pub fn optstrt(&mut self) -> OPTSTRT_W<CRrs> {
OPTSTRT_W::new(self, 17)
}
#[inline(always)]
pub fn fstpg(&mut self) -> FSTPG_W<CRrs> {
FSTPG_W::new(self, 18)
}
#[inline(always)]
pub fn eopie(&mut self) -> EOPIE_W<CRrs> {
EOPIE_W::new(self, 24)
}
#[inline(always)]
pub fn errie(&mut self) -> ERRIE_W<CRrs> {
ERRIE_W::new(self, 25)
}
#[inline(always)]
pub fn rderrie(&mut self) -> RDERRIE_W<CRrs> {
RDERRIE_W::new(self, 26)
}
#[inline(always)]
pub fn obl_launch(&mut self) -> OBL_LAUNCH_W<CRrs> {
OBL_LAUNCH_W::new(self, 27)
}
#[inline(always)]
pub fn optlock(&mut self) -> OPTLOCK_W<CRrs> {
OPTLOCK_W::new(self, 30)
}
#[inline(always)]
pub fn lock(&mut self) -> LOCK_W<CRrs> {
LOCK_W::new(self, 31)
}
}
pub struct CRrs;
impl crate::RegisterSpec for CRrs {
type Ux = u32;
}
impl crate::Readable for CRrs {}
impl crate::Writable for CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRrs {
const RESET_VALUE: u32 = 0xc000_0000;
}