stm32l1/stm32l100/syscfg/
exticr2.rs1pub type R = crate::R<EXTICR2rs>;
3pub type W = crate::W<EXTICR2rs>;
5pub type EXTI4_R = crate::FieldReader;
7pub type EXTI4_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9pub type EXTI5_R = crate::FieldReader;
11pub type EXTI5_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13pub type EXTI6_R = crate::FieldReader;
15pub type EXTI6_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
17pub type EXTI7_R = crate::FieldReader;
19pub type EXTI7_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
21impl R {
22 #[inline(always)]
24 pub fn exti4(&self) -> EXTI4_R {
25 EXTI4_R::new((self.bits & 0x0f) as u8)
26 }
27 #[inline(always)]
29 pub fn exti5(&self) -> EXTI5_R {
30 EXTI5_R::new(((self.bits >> 4) & 0x0f) as u8)
31 }
32 #[inline(always)]
34 pub fn exti6(&self) -> EXTI6_R {
35 EXTI6_R::new(((self.bits >> 8) & 0x0f) as u8)
36 }
37 #[inline(always)]
39 pub fn exti7(&self) -> EXTI7_R {
40 EXTI7_R::new(((self.bits >> 12) & 0x0f) as u8)
41 }
42}
43impl core::fmt::Debug for R {
44 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
45 f.debug_struct("EXTICR2")
46 .field("exti7", &self.exti7())
47 .field("exti6", &self.exti6())
48 .field("exti5", &self.exti5())
49 .field("exti4", &self.exti4())
50 .finish()
51 }
52}
53impl W {
54 #[inline(always)]
56 pub fn exti4(&mut self) -> EXTI4_W<EXTICR2rs> {
57 EXTI4_W::new(self, 0)
58 }
59 #[inline(always)]
61 pub fn exti5(&mut self) -> EXTI5_W<EXTICR2rs> {
62 EXTI5_W::new(self, 4)
63 }
64 #[inline(always)]
66 pub fn exti6(&mut self) -> EXTI6_W<EXTICR2rs> {
67 EXTI6_W::new(self, 8)
68 }
69 #[inline(always)]
71 pub fn exti7(&mut self) -> EXTI7_W<EXTICR2rs> {
72 EXTI7_W::new(self, 12)
73 }
74}
75pub struct EXTICR2rs;
81impl crate::RegisterSpec for EXTICR2rs {
82 type Ux = u32;
83}
84impl crate::Readable for EXTICR2rs {}
86impl crate::Writable for EXTICR2rs {
88 type Safety = crate::Unsafe;
89}
90impl crate::Resettable for EXTICR2rs {}