stm32u5/stm32u5a9/ucpd1/
icr.rs1pub type W = crate::W<ICRrs>;
3#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum TXMSGDISCCFW {
9 Clear = 1,
11}
12impl From<TXMSGDISCCFW> for bool {
13 #[inline(always)]
14 fn from(variant: TXMSGDISCCFW) -> Self {
15 variant as u8 != 0
16 }
17}
18pub type TXMSGDISCCF_W<'a, REG> = crate::BitWriter<'a, REG, TXMSGDISCCFW>;
20impl<'a, REG> TXMSGDISCCF_W<'a, REG>
21where
22 REG: crate::Writable + crate::RegisterSpec,
23{
24 #[inline(always)]
26 pub fn clear(self) -> &'a mut crate::W<REG> {
27 self.variant(TXMSGDISCCFW::Clear)
28 }
29}
30pub use TXMSGDISCCF_W as TXMSGSENTCF_W;
32pub use TXMSGDISCCF_W as TXMSGABTCF_W;
34pub use TXMSGDISCCF_W as HRSTDISCCF_W;
36pub use TXMSGDISCCF_W as HRSTSENTCF_W;
38pub use TXMSGDISCCF_W as TXUNDCF_W;
40pub use TXMSGDISCCF_W as RXORDDETCF_W;
42pub use TXMSGDISCCF_W as RXHRSTDETCF_W;
44pub use TXMSGDISCCF_W as RXOVRCF_W;
46pub use TXMSGDISCCF_W as RXMSGENDCF_W;
48pub use TXMSGDISCCF_W as TYPECEVT1CF_W;
50pub use TXMSGDISCCF_W as TYPECEVT2CF_W;
52pub use TXMSGDISCCF_W as FRSEVTCF_W;
54impl core::fmt::Debug for crate::generic::Reg<ICRrs> {
55 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
56 write!(f, "(not readable)")
57 }
58}
59impl W {
60 #[inline(always)]
62 pub fn txmsgdisccf(&mut self) -> TXMSGDISCCF_W<ICRrs> {
63 TXMSGDISCCF_W::new(self, 1)
64 }
65 #[inline(always)]
67 pub fn txmsgsentcf(&mut self) -> TXMSGSENTCF_W<ICRrs> {
68 TXMSGSENTCF_W::new(self, 2)
69 }
70 #[inline(always)]
72 pub fn txmsgabtcf(&mut self) -> TXMSGABTCF_W<ICRrs> {
73 TXMSGABTCF_W::new(self, 3)
74 }
75 #[inline(always)]
77 pub fn hrstdisccf(&mut self) -> HRSTDISCCF_W<ICRrs> {
78 HRSTDISCCF_W::new(self, 4)
79 }
80 #[inline(always)]
82 pub fn hrstsentcf(&mut self) -> HRSTSENTCF_W<ICRrs> {
83 HRSTSENTCF_W::new(self, 5)
84 }
85 #[inline(always)]
87 pub fn txundcf(&mut self) -> TXUNDCF_W<ICRrs> {
88 TXUNDCF_W::new(self, 6)
89 }
90 #[inline(always)]
92 pub fn rxorddetcf(&mut self) -> RXORDDETCF_W<ICRrs> {
93 RXORDDETCF_W::new(self, 9)
94 }
95 #[inline(always)]
97 pub fn rxhrstdetcf(&mut self) -> RXHRSTDETCF_W<ICRrs> {
98 RXHRSTDETCF_W::new(self, 10)
99 }
100 #[inline(always)]
102 pub fn rxovrcf(&mut self) -> RXOVRCF_W<ICRrs> {
103 RXOVRCF_W::new(self, 11)
104 }
105 #[inline(always)]
107 pub fn rxmsgendcf(&mut self) -> RXMSGENDCF_W<ICRrs> {
108 RXMSGENDCF_W::new(self, 12)
109 }
110 #[inline(always)]
112 pub fn typecevt1cf(&mut self) -> TYPECEVT1CF_W<ICRrs> {
113 TYPECEVT1CF_W::new(self, 14)
114 }
115 #[inline(always)]
117 pub fn typecevt2cf(&mut self) -> TYPECEVT2CF_W<ICRrs> {
118 TYPECEVT2CF_W::new(self, 15)
119 }
120 #[inline(always)]
122 pub fn frsevtcf(&mut self) -> FRSEVTCF_W<ICRrs> {
123 FRSEVTCF_W::new(self, 20)
124 }
125}
126pub struct ICRrs;
132impl crate::RegisterSpec for ICRrs {
133 type Ux = u32;
134}
135impl crate::Writable for ICRrs {
137 type Safety = crate::Unsafe;
138}
139impl crate::Resettable for ICRrs {}