stm32f1_staging/stm32f103/afio/
exticr3.rs

1///Register `EXTICR3` reader
2pub type R = crate::R<EXTICR3rs>;
3///Register `EXTICR3` writer
4pub type W = crate::W<EXTICR3rs>;
5///EXTI8 configuration
6pub use super::exticr1::EXTI0;
7///Field `EXTI8` reader - EXTI8 configuration
8pub use super::exticr1::EXTI0_R as EXTI8_R;
9///Field `EXTI9` reader - EXTI9 configuration
10pub use super::exticr1::EXTI0_R as EXTI9_R;
11///Field `EXTI10` reader - EXTI10 configuration
12pub use super::exticr1::EXTI0_R as EXTI10_R;
13///Field `EXTI11` reader - EXTI11 configuration
14pub use super::exticr1::EXTI0_R as EXTI11_R;
15///Field `EXTI8` writer - EXTI8 configuration
16pub use super::exticr1::EXTI0_W as EXTI8_W;
17///Field `EXTI9` writer - EXTI9 configuration
18pub use super::exticr1::EXTI0_W as EXTI9_W;
19///Field `EXTI10` writer - EXTI10 configuration
20pub use super::exticr1::EXTI0_W as EXTI10_W;
21///Field `EXTI11` writer - EXTI11 configuration
22pub use super::exticr1::EXTI0_W as EXTI11_W;
23impl R {
24    ///Bits 0:3 - EXTI8 configuration
25    #[inline(always)]
26    pub fn exti8(&self) -> EXTI8_R {
27        EXTI8_R::new((self.bits & 0x0f) as u8)
28    }
29    ///Bits 4:7 - EXTI9 configuration
30    #[inline(always)]
31    pub fn exti9(&self) -> EXTI9_R {
32        EXTI9_R::new(((self.bits >> 4) & 0x0f) as u8)
33    }
34    ///Bits 8:11 - EXTI10 configuration
35    #[inline(always)]
36    pub fn exti10(&self) -> EXTI10_R {
37        EXTI10_R::new(((self.bits >> 8) & 0x0f) as u8)
38    }
39    ///Bits 12:15 - EXTI11 configuration
40    #[inline(always)]
41    pub fn exti11(&self) -> EXTI11_R {
42        EXTI11_R::new(((self.bits >> 12) & 0x0f) as u8)
43    }
44}
45impl core::fmt::Debug for R {
46    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
47        f.debug_struct("EXTICR3")
48            .field("exti8", &self.exti8())
49            .field("exti9", &self.exti9())
50            .field("exti10", &self.exti10())
51            .field("exti11", &self.exti11())
52            .finish()
53    }
54}
55impl W {
56    ///Bits 0:3 - EXTI8 configuration
57    #[inline(always)]
58    pub fn exti8(&mut self) -> EXTI8_W<EXTICR3rs> {
59        EXTI8_W::new(self, 0)
60    }
61    ///Bits 4:7 - EXTI9 configuration
62    #[inline(always)]
63    pub fn exti9(&mut self) -> EXTI9_W<EXTICR3rs> {
64        EXTI9_W::new(self, 4)
65    }
66    ///Bits 8:11 - EXTI10 configuration
67    #[inline(always)]
68    pub fn exti10(&mut self) -> EXTI10_W<EXTICR3rs> {
69        EXTI10_W::new(self, 8)
70    }
71    ///Bits 12:15 - EXTI11 configuration
72    #[inline(always)]
73    pub fn exti11(&mut self) -> EXTI11_W<EXTICR3rs> {
74        EXTI11_W::new(self, 12)
75    }
76}
77/**External interrupt configuration register 3 (AFIO_EXTICR3)
78
79You can [`read`](crate::Reg::read) this register and get [`exticr3::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`exticr3::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
80
81See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F103.html#AFIO:EXTICR3)*/
82pub struct EXTICR3rs;
83impl crate::RegisterSpec for EXTICR3rs {
84    type Ux = u32;
85}
86///`read()` method returns [`exticr3::R`](R) reader structure
87impl crate::Readable for EXTICR3rs {}
88///`write(|w| ..)` method takes [`exticr3::W`](W) writer structure
89impl crate::Writable for EXTICR3rs {
90    type Safety = crate::Unsafe;
91}
92///`reset()` method sets EXTICR3 to value 0
93impl crate::Resettable for EXTICR3rs {}