stm32f1_staging/stm32f101/flash/
cr.rspub 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 OPTPG_R = crate::BitReader;
pub type OPTPG_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OPTER_R = crate::BitReader;
pub type OPTER_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type STRT_R = crate::BitReader;
pub type STRT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LOCK_R = crate::BitReader;
pub type LOCK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OPTWRE_R = crate::BitReader;
pub type OPTWRE_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 EOPIE_R = crate::BitReader;
pub type EOPIE_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 optpg(&self) -> OPTPG_R {
OPTPG_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn opter(&self) -> OPTER_R {
OPTER_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn strt(&self) -> STRT_R {
STRT_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn lock(&self) -> LOCK_R {
LOCK_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn optwre(&self) -> OPTWRE_R {
OPTWRE_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn errie(&self) -> ERRIE_R {
ERRIE_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn eopie(&self) -> EOPIE_R {
EOPIE_R::new(((self.bits >> 12) & 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("optpg", &self.optpg())
.field("opter", &self.opter())
.field("strt", &self.strt())
.field("lock", &self.lock())
.field("optwre", &self.optwre())
.field("errie", &self.errie())
.field("eopie", &self.eopie())
.finish()
}
}
impl W {
#[inline(always)]
#[must_use]
pub fn pg(&mut self) -> PG_W<CRrs> {
PG_W::new(self, 0)
}
#[inline(always)]
#[must_use]
pub fn per(&mut self) -> PER_W<CRrs> {
PER_W::new(self, 1)
}
#[inline(always)]
#[must_use]
pub fn mer(&mut self) -> MER_W<CRrs> {
MER_W::new(self, 2)
}
#[inline(always)]
#[must_use]
pub fn optpg(&mut self) -> OPTPG_W<CRrs> {
OPTPG_W::new(self, 4)
}
#[inline(always)]
#[must_use]
pub fn opter(&mut self) -> OPTER_W<CRrs> {
OPTER_W::new(self, 5)
}
#[inline(always)]
#[must_use]
pub fn strt(&mut self) -> STRT_W<CRrs> {
STRT_W::new(self, 6)
}
#[inline(always)]
#[must_use]
pub fn lock(&mut self) -> LOCK_W<CRrs> {
LOCK_W::new(self, 7)
}
#[inline(always)]
#[must_use]
pub fn optwre(&mut self) -> OPTWRE_W<CRrs> {
OPTWRE_W::new(self, 9)
}
#[inline(always)]
#[must_use]
pub fn errie(&mut self) -> ERRIE_W<CRrs> {
ERRIE_W::new(self, 10)
}
#[inline(always)]
#[must_use]
pub fn eopie(&mut self) -> EOPIE_W<CRrs> {
EOPIE_W::new(self, 12)
}
}
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;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
impl crate::Resettable for CRrs {
const RESET_VALUE: u32 = 0x80;
}