stm32f1_staging/stm32f101/afio.rs
1#[repr(C)]
2#[derive(Debug)]
3///Register block
4pub struct RegisterBlock {
5 evcr: EVCR,
6 mapr: MAPR,
7 exticr1: EXTICR1,
8 exticr2: EXTICR2,
9 exticr3: EXTICR3,
10 exticr4: EXTICR4,
11 _reserved6: [u8; 0x04],
12 mapr2: MAPR2,
13}
14impl RegisterBlock {
15 ///0x00 - Event Control Register (AFIO_EVCR)
16 #[inline(always)]
17 pub const fn evcr(&self) -> &EVCR {
18 &self.evcr
19 }
20 ///0x04 - AF remap and debug I/O configuration register (AFIO_MAPR)
21 #[inline(always)]
22 pub const fn mapr(&self) -> &MAPR {
23 &self.mapr
24 }
25 ///0x08 - External interrupt configuration register 1 (AFIO_EXTICR1)
26 #[inline(always)]
27 pub const fn exticr1(&self) -> &EXTICR1 {
28 &self.exticr1
29 }
30 ///0x0c - External interrupt configuration register 2 (AFIO_EXTICR2)
31 #[inline(always)]
32 pub const fn exticr2(&self) -> &EXTICR2 {
33 &self.exticr2
34 }
35 ///0x10 - External interrupt configuration register 3 (AFIO_EXTICR3)
36 #[inline(always)]
37 pub const fn exticr3(&self) -> &EXTICR3 {
38 &self.exticr3
39 }
40 ///0x14 - External interrupt configuration register 4 (AFIO_EXTICR4)
41 #[inline(always)]
42 pub const fn exticr4(&self) -> &EXTICR4 {
43 &self.exticr4
44 }
45 ///0x1c - AF remap and debug I/O configuration register
46 #[inline(always)]
47 pub const fn mapr2(&self) -> &MAPR2 {
48 &self.mapr2
49 }
50}
51/**EVCR (rw) register accessor: Event Control Register (AFIO_EVCR)
52
53You can [`read`](crate::Reg::read) this register and get [`evcr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`evcr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
54
55See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#AFIO:EVCR)
56
57For information about available fields see [`mod@evcr`] module*/
58pub type EVCR = crate::Reg<evcr::EVCRrs>;
59///Event Control Register (AFIO_EVCR)
60pub mod evcr;
61/**MAPR (rw) register accessor: AF remap and debug I/O configuration register (AFIO_MAPR)
62
63You can [`read`](crate::Reg::read) this register and get [`mapr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mapr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
64
65See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#AFIO:MAPR)
66
67For information about available fields see [`mod@mapr`] module*/
68pub type MAPR = crate::Reg<mapr::MAPRrs>;
69///AF remap and debug I/O configuration register (AFIO_MAPR)
70pub mod mapr;
71/**EXTICR1 (rw) register accessor: External interrupt configuration register 1 (AFIO_EXTICR1)
72
73You can [`read`](crate::Reg::read) this register and get [`exticr1::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`exticr1::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
74
75See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#AFIO:EXTICR1)
76
77For information about available fields see [`mod@exticr1`] module*/
78pub type EXTICR1 = crate::Reg<exticr1::EXTICR1rs>;
79///External interrupt configuration register 1 (AFIO_EXTICR1)
80pub mod exticr1;
81/**EXTICR2 (rw) register accessor: External interrupt configuration register 2 (AFIO_EXTICR2)
82
83You can [`read`](crate::Reg::read) this register and get [`exticr2::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`exticr2::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
84
85See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#AFIO:EXTICR2)
86
87For information about available fields see [`mod@exticr2`] module*/
88pub type EXTICR2 = crate::Reg<exticr2::EXTICR2rs>;
89///External interrupt configuration register 2 (AFIO_EXTICR2)
90pub mod exticr2;
91/**EXTICR3 (rw) register accessor: External interrupt configuration register 3 (AFIO_EXTICR3)
92
93You can [`read`](crate::Reg::read) this register and get [`exticr3::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`exticr3::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
94
95See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#AFIO:EXTICR3)
96
97For information about available fields see [`mod@exticr3`] module*/
98pub type EXTICR3 = crate::Reg<exticr3::EXTICR3rs>;
99///External interrupt configuration register 3 (AFIO_EXTICR3)
100pub mod exticr3;
101/**EXTICR4 (rw) register accessor: External interrupt configuration register 4 (AFIO_EXTICR4)
102
103You can [`read`](crate::Reg::read) this register and get [`exticr4::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`exticr4::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
104
105See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#AFIO:EXTICR4)
106
107For information about available fields see [`mod@exticr4`] module*/
108pub type EXTICR4 = crate::Reg<exticr4::EXTICR4rs>;
109///External interrupt configuration register 4 (AFIO_EXTICR4)
110pub mod exticr4;
111/**MAPR2 (rw) register accessor: AF remap and debug I/O configuration register
112
113You can [`read`](crate::Reg::read) this register and get [`mapr2::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mapr2::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
114
115See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#AFIO:MAPR2)
116
117For information about available fields see [`mod@mapr2`] module*/
118pub type MAPR2 = crate::Reg<mapr2::MAPR2rs>;
119///AF remap and debug I/O configuration register
120pub mod mapr2;