stm32g0/stm32g0b0/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)]
49 [(); 16][n as usize];
50 BR_W::new(self, n)
51 }
52 #[inline(always)]
54 pub fn br0(&mut self) -> BR_W<BRRrs> {
55 BR_W::new(self, 0)
56 }
57 #[inline(always)]
59 pub fn br1(&mut self) -> BR_W<BRRrs> {
60 BR_W::new(self, 1)
61 }
62 #[inline(always)]
64 pub fn br2(&mut self) -> BR_W<BRRrs> {
65 BR_W::new(self, 2)
66 }
67 #[inline(always)]
69 pub fn br3(&mut self) -> BR_W<BRRrs> {
70 BR_W::new(self, 3)
71 }
72 #[inline(always)]
74 pub fn br4(&mut self) -> BR_W<BRRrs> {
75 BR_W::new(self, 4)
76 }
77 #[inline(always)]
79 pub fn br5(&mut self) -> BR_W<BRRrs> {
80 BR_W::new(self, 5)
81 }
82 #[inline(always)]
84 pub fn br6(&mut self) -> BR_W<BRRrs> {
85 BR_W::new(self, 6)
86 }
87 #[inline(always)]
89 pub fn br7(&mut self) -> BR_W<BRRrs> {
90 BR_W::new(self, 7)
91 }
92 #[inline(always)]
94 pub fn br8(&mut self) -> BR_W<BRRrs> {
95 BR_W::new(self, 8)
96 }
97 #[inline(always)]
99 pub fn br9(&mut self) -> BR_W<BRRrs> {
100 BR_W::new(self, 9)
101 }
102 #[inline(always)]
104 pub fn br10(&mut self) -> BR_W<BRRrs> {
105 BR_W::new(self, 10)
106 }
107 #[inline(always)]
109 pub fn br11(&mut self) -> BR_W<BRRrs> {
110 BR_W::new(self, 11)
111 }
112 #[inline(always)]
114 pub fn br12(&mut self) -> BR_W<BRRrs> {
115 BR_W::new(self, 12)
116 }
117 #[inline(always)]
119 pub fn br13(&mut self) -> BR_W<BRRrs> {
120 BR_W::new(self, 13)
121 }
122 #[inline(always)]
124 pub fn br14(&mut self) -> BR_W<BRRrs> {
125 BR_W::new(self, 14)
126 }
127 #[inline(always)]
129 pub fn br15(&mut self) -> BR_W<BRRrs> {
130 BR_W::new(self, 15)
131 }
132}
133pub struct BRRrs;
139impl crate::RegisterSpec for BRRrs {
140 type Ux = u32;
141}
142impl crate::Writable for BRRrs {
144 type Safety = crate::Unsafe;
145}
146impl crate::Resettable for BRRrs {}