stm32f0/stm32f0x0/tim15/
egr.rs1pub type W = crate::W<EGRrs>;
3#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum UG {
9 Update = 1,
11}
12impl From<UG> for bool {
13 #[inline(always)]
14 fn from(variant: UG) -> Self {
15 variant as u8 != 0
16 }
17}
18pub type UG_W<'a, REG> = crate::BitWriter<'a, REG, UG>;
20impl<'a, REG> UG_W<'a, REG>
21where
22 REG: crate::Writable + crate::RegisterSpec,
23{
24 #[inline(always)]
26 pub fn update(self) -> &'a mut crate::W<REG> {
27 self.variant(UG::Update)
28 }
29}
30#[cfg_attr(feature = "defmt", derive(defmt::Format))]
34#[derive(Clone, Copy, Debug, PartialEq, Eq)]
35pub enum CC1GW {
36 Trigger = 1,
38}
39impl From<CC1GW> for bool {
40 #[inline(always)]
41 fn from(variant: CC1GW) -> Self {
42 variant as u8 != 0
43 }
44}
45pub type CCG_W<'a, REG> = crate::BitWriter<'a, REG, CC1GW>;
47impl<'a, REG> CCG_W<'a, REG>
48where
49 REG: crate::Writable + crate::RegisterSpec,
50{
51 #[inline(always)]
53 pub fn trigger(self) -> &'a mut crate::W<REG> {
54 self.variant(CC1GW::Trigger)
55 }
56}
57#[cfg_attr(feature = "defmt", derive(defmt::Format))]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum COMGW {
63 Trigger = 1,
65}
66impl From<COMGW> for bool {
67 #[inline(always)]
68 fn from(variant: COMGW) -> Self {
69 variant as u8 != 0
70 }
71}
72pub type COMG_W<'a, REG> = crate::BitWriter<'a, REG, COMGW>;
74impl<'a, REG> COMG_W<'a, REG>
75where
76 REG: crate::Writable + crate::RegisterSpec,
77{
78 #[inline(always)]
80 pub fn trigger(self) -> &'a mut crate::W<REG> {
81 self.variant(COMGW::Trigger)
82 }
83}
84#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88#[derive(Clone, Copy, Debug, PartialEq, Eq)]
89pub enum TGW {
90 Trigger = 1,
92}
93impl From<TGW> for bool {
94 #[inline(always)]
95 fn from(variant: TGW) -> Self {
96 variant as u8 != 0
97 }
98}
99pub type TG_W<'a, REG> = crate::BitWriter<'a, REG, TGW>;
101impl<'a, REG> TG_W<'a, REG>
102where
103 REG: crate::Writable + crate::RegisterSpec,
104{
105 #[inline(always)]
107 pub fn trigger(self) -> &'a mut crate::W<REG> {
108 self.variant(TGW::Trigger)
109 }
110}
111#[cfg_attr(feature = "defmt", derive(defmt::Format))]
115#[derive(Clone, Copy, Debug, PartialEq, Eq)]
116pub enum BGW {
117 Trigger = 1,
119}
120impl From<BGW> for bool {
121 #[inline(always)]
122 fn from(variant: BGW) -> Self {
123 variant as u8 != 0
124 }
125}
126pub type BG_W<'a, REG> = crate::BitWriter<'a, REG, BGW>;
128impl<'a, REG> BG_W<'a, REG>
129where
130 REG: crate::Writable + crate::RegisterSpec,
131{
132 #[inline(always)]
134 pub fn trigger(self) -> &'a mut crate::W<REG> {
135 self.variant(BGW::Trigger)
136 }
137}
138impl core::fmt::Debug for crate::generic::Reg<EGRrs> {
139 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
140 write!(f, "(not readable)")
141 }
142}
143impl W {
144 #[inline(always)]
146 pub fn ug(&mut self) -> UG_W<EGRrs> {
147 UG_W::new(self, 0)
148 }
149 #[inline(always)]
153 pub fn ccg(&mut self, n: u8) -> CCG_W<EGRrs> {
154 #[allow(clippy::no_effect)]
155 [(); 2][n as usize];
156 CCG_W::new(self, n + 1)
157 }
158 #[inline(always)]
160 pub fn cc1g(&mut self) -> CCG_W<EGRrs> {
161 CCG_W::new(self, 1)
162 }
163 #[inline(always)]
165 pub fn cc2g(&mut self) -> CCG_W<EGRrs> {
166 CCG_W::new(self, 2)
167 }
168 #[inline(always)]
170 pub fn comg(&mut self) -> COMG_W<EGRrs> {
171 COMG_W::new(self, 5)
172 }
173 #[inline(always)]
175 pub fn tg(&mut self) -> TG_W<EGRrs> {
176 TG_W::new(self, 6)
177 }
178 #[inline(always)]
180 pub fn bg(&mut self) -> BG_W<EGRrs> {
181 BG_W::new(self, 7)
182 }
183}
184pub struct EGRrs;
190impl crate::RegisterSpec for EGRrs {
191 type Ux = u32;
192}
193impl crate::Writable for EGRrs {
195 type Safety = crate::Unsafe;
196}
197impl crate::Resettable for EGRrs {}