stm32f1_staging/stm32f100/afio/
mapr2.rs1pub type R = crate::R<MAPR2rs>;
3pub type W = crate::W<MAPR2rs>;
5pub type TIM15_REMAP_R = crate::BitReader;
7pub type TIM15_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type TIM16_REMAP_R = crate::BitReader;
11pub type TIM16_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type TIM17_REMAP_R = crate::BitReader;
15pub type TIM17_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type CEC_REMAP_R = crate::BitReader;
19pub type CEC_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type TIM1_DMA_REMAP_R = crate::BitReader;
23pub type TIM1_DMA_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type TIM13_REMAP_R = crate::BitReader;
27pub type TIM13_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type TIM14_REMAP_R = crate::BitReader;
31pub type TIM14_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type FSMC_NADV_R = crate::BitReader;
35pub type FSMC_NADV_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type TIM67_DAC_DMA_REMAP_R = crate::BitReader;
39pub type TIM67_DAC_DMA_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
41pub type TIM12_REMAP_R = crate::BitReader;
43pub type TIM12_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
45pub type MISC_REMAP_R = crate::BitReader;
47pub type MISC_REMAP_W<'a, REG> = crate::BitWriter<'a, REG>;
49impl R {
50 #[inline(always)]
52 pub fn tim15_remap(&self) -> TIM15_REMAP_R {
53 TIM15_REMAP_R::new((self.bits & 1) != 0)
54 }
55 #[inline(always)]
57 pub fn tim16_remap(&self) -> TIM16_REMAP_R {
58 TIM16_REMAP_R::new(((self.bits >> 1) & 1) != 0)
59 }
60 #[inline(always)]
62 pub fn tim17_remap(&self) -> TIM17_REMAP_R {
63 TIM17_REMAP_R::new(((self.bits >> 2) & 1) != 0)
64 }
65 #[inline(always)]
67 pub fn cec_remap(&self) -> CEC_REMAP_R {
68 CEC_REMAP_R::new(((self.bits >> 3) & 1) != 0)
69 }
70 #[inline(always)]
72 pub fn tim1_dma_remap(&self) -> TIM1_DMA_REMAP_R {
73 TIM1_DMA_REMAP_R::new(((self.bits >> 4) & 1) != 0)
74 }
75 #[inline(always)]
77 pub fn tim13_remap(&self) -> TIM13_REMAP_R {
78 TIM13_REMAP_R::new(((self.bits >> 8) & 1) != 0)
79 }
80 #[inline(always)]
82 pub fn tim14_remap(&self) -> TIM14_REMAP_R {
83 TIM14_REMAP_R::new(((self.bits >> 9) & 1) != 0)
84 }
85 #[inline(always)]
87 pub fn fsmc_nadv(&self) -> FSMC_NADV_R {
88 FSMC_NADV_R::new(((self.bits >> 10) & 1) != 0)
89 }
90 #[inline(always)]
92 pub fn tim67_dac_dma_remap(&self) -> TIM67_DAC_DMA_REMAP_R {
93 TIM67_DAC_DMA_REMAP_R::new(((self.bits >> 11) & 1) != 0)
94 }
95 #[inline(always)]
97 pub fn tim12_remap(&self) -> TIM12_REMAP_R {
98 TIM12_REMAP_R::new(((self.bits >> 12) & 1) != 0)
99 }
100 #[inline(always)]
102 pub fn misc_remap(&self) -> MISC_REMAP_R {
103 MISC_REMAP_R::new(((self.bits >> 13) & 1) != 0)
104 }
105}
106impl core::fmt::Debug for R {
107 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
108 f.debug_struct("MAPR2")
109 .field("tim15_remap", &self.tim15_remap())
110 .field("tim16_remap", &self.tim16_remap())
111 .field("tim17_remap", &self.tim17_remap())
112 .field("tim13_remap", &self.tim13_remap())
113 .field("tim14_remap", &self.tim14_remap())
114 .field("fsmc_nadv", &self.fsmc_nadv())
115 .field("cec_remap", &self.cec_remap())
116 .field("tim1_dma_remap", &self.tim1_dma_remap())
117 .field("tim67_dac_dma_remap", &self.tim67_dac_dma_remap())
118 .field("tim12_remap", &self.tim12_remap())
119 .field("misc_remap", &self.misc_remap())
120 .finish()
121 }
122}
123impl W {
124 #[inline(always)]
126 pub fn tim15_remap(&mut self) -> TIM15_REMAP_W<MAPR2rs> {
127 TIM15_REMAP_W::new(self, 0)
128 }
129 #[inline(always)]
131 pub fn tim16_remap(&mut self) -> TIM16_REMAP_W<MAPR2rs> {
132 TIM16_REMAP_W::new(self, 1)
133 }
134 #[inline(always)]
136 pub fn tim17_remap(&mut self) -> TIM17_REMAP_W<MAPR2rs> {
137 TIM17_REMAP_W::new(self, 2)
138 }
139 #[inline(always)]
141 pub fn cec_remap(&mut self) -> CEC_REMAP_W<MAPR2rs> {
142 CEC_REMAP_W::new(self, 3)
143 }
144 #[inline(always)]
146 pub fn tim1_dma_remap(&mut self) -> TIM1_DMA_REMAP_W<MAPR2rs> {
147 TIM1_DMA_REMAP_W::new(self, 4)
148 }
149 #[inline(always)]
151 pub fn tim13_remap(&mut self) -> TIM13_REMAP_W<MAPR2rs> {
152 TIM13_REMAP_W::new(self, 8)
153 }
154 #[inline(always)]
156 pub fn tim14_remap(&mut self) -> TIM14_REMAP_W<MAPR2rs> {
157 TIM14_REMAP_W::new(self, 9)
158 }
159 #[inline(always)]
161 pub fn fsmc_nadv(&mut self) -> FSMC_NADV_W<MAPR2rs> {
162 FSMC_NADV_W::new(self, 10)
163 }
164 #[inline(always)]
166 pub fn tim67_dac_dma_remap(&mut self) -> TIM67_DAC_DMA_REMAP_W<MAPR2rs> {
167 TIM67_DAC_DMA_REMAP_W::new(self, 11)
168 }
169 #[inline(always)]
171 pub fn tim12_remap(&mut self) -> TIM12_REMAP_W<MAPR2rs> {
172 TIM12_REMAP_W::new(self, 12)
173 }
174 #[inline(always)]
176 pub fn misc_remap(&mut self) -> MISC_REMAP_W<MAPR2rs> {
177 MISC_REMAP_W::new(self, 13)
178 }
179}
180pub struct MAPR2rs;
186impl crate::RegisterSpec for MAPR2rs {
187 type Ux = u32;
188}
189impl crate::Readable for MAPR2rs {}
191impl crate::Writable for MAPR2rs {
193 type Safety = crate::Unsafe;
194}
195impl crate::Resettable for MAPR2rs {}