stm32f1_staging/stm32f107/fsmc/
bcr1.rspub type R = crate::R<BCR1rs>;
pub type W = crate::W<BCR1rs>;
pub type MBKEN_R = crate::BitReader;
pub type MBKEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MUXEN_R = crate::BitReader;
pub type MUXEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type MTYP_R = crate::FieldReader;
pub type MTYP_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type MWID_R = crate::FieldReader;
pub type MWID_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type FACCEN_R = crate::BitReader;
pub type FACCEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BURSTEN_R = crate::BitReader;
pub type BURSTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WAITPOL_R = crate::BitReader;
pub type WAITPOL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WAITCFG_R = crate::BitReader;
pub type WAITCFG_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WREN_R = crate::BitReader;
pub type WREN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WAITEN_R = crate::BitReader;
pub type WAITEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EXTMOD_R = crate::BitReader;
pub type EXTMOD_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ASYNCWAIT_R = crate::BitReader;
pub type ASYNCWAIT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CBURSTRW_R = crate::BitReader;
pub type CBURSTRW_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn mbken(&self) -> MBKEN_R {
MBKEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn muxen(&self) -> MUXEN_R {
MUXEN_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn mtyp(&self) -> MTYP_R {
MTYP_R::new(((self.bits >> 2) & 3) as u8)
}
#[inline(always)]
pub fn mwid(&self) -> MWID_R {
MWID_R::new(((self.bits >> 4) & 3) as u8)
}
#[inline(always)]
pub fn faccen(&self) -> FACCEN_R {
FACCEN_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn bursten(&self) -> BURSTEN_R {
BURSTEN_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn waitpol(&self) -> WAITPOL_R {
WAITPOL_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn waitcfg(&self) -> WAITCFG_R {
WAITCFG_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn wren(&self) -> WREN_R {
WREN_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn waiten(&self) -> WAITEN_R {
WAITEN_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn extmod(&self) -> EXTMOD_R {
EXTMOD_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn asyncwait(&self) -> ASYNCWAIT_R {
ASYNCWAIT_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn cburstrw(&self) -> CBURSTRW_R {
CBURSTRW_R::new(((self.bits >> 19) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("BCR1")
.field("cburstrw", &self.cburstrw())
.field("asyncwait", &self.asyncwait())
.field("extmod", &self.extmod())
.field("waiten", &self.waiten())
.field("wren", &self.wren())
.field("waitcfg", &self.waitcfg())
.field("waitpol", &self.waitpol())
.field("bursten", &self.bursten())
.field("faccen", &self.faccen())
.field("mwid", &self.mwid())
.field("mtyp", &self.mtyp())
.field("muxen", &self.muxen())
.field("mbken", &self.mbken())
.finish()
}
}
impl W {
#[inline(always)]
#[must_use]
pub fn mbken(&mut self) -> MBKEN_W<BCR1rs> {
MBKEN_W::new(self, 0)
}
#[inline(always)]
#[must_use]
pub fn muxen(&mut self) -> MUXEN_W<BCR1rs> {
MUXEN_W::new(self, 1)
}
#[inline(always)]
#[must_use]
pub fn mtyp(&mut self) -> MTYP_W<BCR1rs> {
MTYP_W::new(self, 2)
}
#[inline(always)]
#[must_use]
pub fn mwid(&mut self) -> MWID_W<BCR1rs> {
MWID_W::new(self, 4)
}
#[inline(always)]
#[must_use]
pub fn faccen(&mut self) -> FACCEN_W<BCR1rs> {
FACCEN_W::new(self, 6)
}
#[inline(always)]
#[must_use]
pub fn bursten(&mut self) -> BURSTEN_W<BCR1rs> {
BURSTEN_W::new(self, 8)
}
#[inline(always)]
#[must_use]
pub fn waitpol(&mut self) -> WAITPOL_W<BCR1rs> {
WAITPOL_W::new(self, 9)
}
#[inline(always)]
#[must_use]
pub fn waitcfg(&mut self) -> WAITCFG_W<BCR1rs> {
WAITCFG_W::new(self, 11)
}
#[inline(always)]
#[must_use]
pub fn wren(&mut self) -> WREN_W<BCR1rs> {
WREN_W::new(self, 12)
}
#[inline(always)]
#[must_use]
pub fn waiten(&mut self) -> WAITEN_W<BCR1rs> {
WAITEN_W::new(self, 13)
}
#[inline(always)]
#[must_use]
pub fn extmod(&mut self) -> EXTMOD_W<BCR1rs> {
EXTMOD_W::new(self, 14)
}
#[inline(always)]
#[must_use]
pub fn asyncwait(&mut self) -> ASYNCWAIT_W<BCR1rs> {
ASYNCWAIT_W::new(self, 15)
}
#[inline(always)]
#[must_use]
pub fn cburstrw(&mut self) -> CBURSTRW_W<BCR1rs> {
CBURSTRW_W::new(self, 19)
}
}
pub struct BCR1rs;
impl crate::RegisterSpec for BCR1rs {
type Ux = u32;
}
impl crate::Readable for BCR1rs {}
impl crate::Writable for BCR1rs {
type Safety = crate::Unsafe;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
impl crate::Resettable for BCR1rs {
const RESET_VALUE: u32 = 0x30d0;
}