stm32f1_staging/stm32f107/afio/
mapr2.rspub type R = crate::R<MAPR2rs>;
pub type W = crate::W<MAPR2rs>;
pub type TIM9_REMAP_R = crate::BitReader;
pub type TIM9_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM10_REMAP_R = crate::BitReader;
pub type TIM10_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM11_REMAP_R = crate::BitReader;
pub type TIM11_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM13_REMAP_R = crate::BitReader;
pub type TIM13_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM14_REMAP_R = crate::BitReader;
pub type TIM14_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FSMC_NADV_R = crate::BitReader;
pub type FSMC_NADV_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn tim9_remap(&self) -> TIM9_REMAP_R {
TIM9_REMAP_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn tim10_remap(&self) -> TIM10_REMAP_R {
TIM10_REMAP_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn tim11_remap(&self) -> TIM11_REMAP_R {
TIM11_REMAP_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn tim13_remap(&self) -> TIM13_REMAP_R {
TIM13_REMAP_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn tim14_remap(&self) -> TIM14_REMAP_R {
TIM14_REMAP_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn fsmc_nadv(&self) -> FSMC_NADV_R {
FSMC_NADV_R::new(((self.bits >> 10) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MAPR2")
.field("tim9_remap", &self.tim9_remap())
.field("tim10_remap", &self.tim10_remap())
.field("tim11_remap", &self.tim11_remap())
.field("tim13_remap", &self.tim13_remap())
.field("tim14_remap", &self.tim14_remap())
.field("fsmc_nadv", &self.fsmc_nadv())
.finish()
}
}
impl W {
#[inline(always)]
#[must_use]
pub fn tim9_remap(&mut self) -> TIM9_REMAP_W<MAPR2rs> {
TIM9_REMAP_W::new(self, 5)
}
#[inline(always)]
#[must_use]
pub fn tim10_remap(&mut self) -> TIM10_REMAP_W<MAPR2rs> {
TIM10_REMAP_W::new(self, 6)
}
#[inline(always)]
#[must_use]
pub fn tim11_remap(&mut self) -> TIM11_REMAP_W<MAPR2rs> {
TIM11_REMAP_W::new(self, 7)
}
#[inline(always)]
#[must_use]
pub fn tim13_remap(&mut self) -> TIM13_REMAP_W<MAPR2rs> {
TIM13_REMAP_W::new(self, 8)
}
#[inline(always)]
#[must_use]
pub fn tim14_remap(&mut self) -> TIM14_REMAP_W<MAPR2rs> {
TIM14_REMAP_W::new(self, 9)
}
#[inline(always)]
#[must_use]
pub fn fsmc_nadv(&mut self) -> FSMC_NADV_W<MAPR2rs> {
FSMC_NADV_W::new(self, 10)
}
}
pub struct MAPR2rs;
impl crate::RegisterSpec for MAPR2rs {
type Ux = u32;
}
impl crate::Readable for MAPR2rs {}
impl crate::Writable for MAPR2rs {
type Safety = crate::Unsafe;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
impl crate::Resettable for MAPR2rs {
const RESET_VALUE: u32 = 0;
}