stm32f1_staging/stm32f107/gpioa/
brr.rs1pub type W = crate::W<BRRrs>;
3#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum BIT_RESET {
9 NoAction = 0,
11 Reset = 1,
13}
14impl From<BIT_RESET> for bool {
15 #[inline(always)]
16 fn from(variant: BIT_RESET) -> Self {
17 variant as u8 != 0
18 }
19}
20pub type BR_W<'a, REG> = crate::BitWriter<'a, REG, BIT_RESET>;
22impl<'a, REG> BR_W<'a, REG>
23where
24 REG: crate::Writable + crate::RegisterSpec,
25{
26 #[inline(always)]
28 pub fn no_action(self) -> &'a mut crate::W<REG> {
29 self.variant(BIT_RESET::NoAction)
30 }
31 #[inline(always)]
33 pub fn reset(self) -> &'a mut crate::W<REG> {
34 self.variant(BIT_RESET::Reset)
35 }
36}
37impl core::fmt::Debug for crate::generic::Reg<BRRrs> {
38 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
39 write!(f, "(not readable)")
40 }
41}
42impl W {
43 #[inline(always)]
47 pub fn br(&mut self, n: u8) -> BR_W<BRRrs> {
48 #[allow(clippy::no_effect)] [(); 16][n as usize];
49 BR_W::new(self, n)
50 }
51 #[inline(always)]
53 pub fn br0(&mut self) -> BR_W<BRRrs> {
54 BR_W::new(self, 0)
55 }
56 #[inline(always)]
58 pub fn br1(&mut self) -> BR_W<BRRrs> {
59 BR_W::new(self, 1)
60 }
61 #[inline(always)]
63 pub fn br2(&mut self) -> BR_W<BRRrs> {
64 BR_W::new(self, 2)
65 }
66 #[inline(always)]
68 pub fn br3(&mut self) -> BR_W<BRRrs> {
69 BR_W::new(self, 3)
70 }
71 #[inline(always)]
73 pub fn br4(&mut self) -> BR_W<BRRrs> {
74 BR_W::new(self, 4)
75 }
76 #[inline(always)]
78 pub fn br5(&mut self) -> BR_W<BRRrs> {
79 BR_W::new(self, 5)
80 }
81 #[inline(always)]
83 pub fn br6(&mut self) -> BR_W<BRRrs> {
84 BR_W::new(self, 6)
85 }
86 #[inline(always)]
88 pub fn br7(&mut self) -> BR_W<BRRrs> {
89 BR_W::new(self, 7)
90 }
91 #[inline(always)]
93 pub fn br8(&mut self) -> BR_W<BRRrs> {
94 BR_W::new(self, 8)
95 }
96 #[inline(always)]
98 pub fn br9(&mut self) -> BR_W<BRRrs> {
99 BR_W::new(self, 9)
100 }
101 #[inline(always)]
103 pub fn br10(&mut self) -> BR_W<BRRrs> {
104 BR_W::new(self, 10)
105 }
106 #[inline(always)]
108 pub fn br11(&mut self) -> BR_W<BRRrs> {
109 BR_W::new(self, 11)
110 }
111 #[inline(always)]
113 pub fn br12(&mut self) -> BR_W<BRRrs> {
114 BR_W::new(self, 12)
115 }
116 #[inline(always)]
118 pub fn br13(&mut self) -> BR_W<BRRrs> {
119 BR_W::new(self, 13)
120 }
121 #[inline(always)]
123 pub fn br14(&mut self) -> BR_W<BRRrs> {
124 BR_W::new(self, 14)
125 }
126 #[inline(always)]
128 pub fn br15(&mut self) -> BR_W<BRRrs> {
129 BR_W::new(self, 15)
130 }
131}
132pub struct BRRrs;
138impl crate::RegisterSpec for BRRrs {
139 type Ux = u32;
140}
141impl crate::Writable for BRRrs {
143 type Safety = crate::Unsafe;
144}
145impl crate::Resettable for BRRrs {}