py32f0/py32f040/tim15/
ccmr1_input.rs1pub struct R(crate::R<CCMR1_INPUT_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CCMR1_INPUT_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CCMR1_INPUT_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CCMR1_INPUT_SPEC>) -> Self {
13 R(reader)
14 }
15}
16pub struct W(crate::W<CCMR1_INPUT_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CCMR1_INPUT_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<CCMR1_INPUT_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CCMR1_INPUT_SPEC>) -> Self {
34 W(writer)
35 }
36}
37pub type CC1S_R = crate::FieldReader<u8, u8>;
39pub type CC1S_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CCMR1_INPUT_SPEC, u8, u8, 2, O>;
41pub type IC1PSC_R = crate::FieldReader<u8, u8>;
43pub type IC1PSC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CCMR1_INPUT_SPEC, u8, u8, 2, O>;
45pub type IC1F_R = crate::FieldReader<u8, u8>;
47pub type IC1F_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CCMR1_INPUT_SPEC, u8, u8, 4, O>;
49pub type CC2S_R = crate::FieldReader<u8, u8>;
51pub type CC2S_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CCMR1_INPUT_SPEC, u8, u8, 2, O>;
53pub type IC2PSC_R = crate::FieldReader<u8, u8>;
55pub type IC2PSC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CCMR1_INPUT_SPEC, u8, u8, 2, O>;
57pub type IC2F_R = crate::FieldReader<u8, u8>;
59pub type IC2F_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CCMR1_INPUT_SPEC, u8, u8, 4, O>;
61impl R {
62 #[inline(always)]
64 pub fn cc1s(&self) -> CC1S_R {
65 CC1S_R::new((self.bits & 3) as u8)
66 }
67 #[inline(always)]
69 pub fn ic1psc(&self) -> IC1PSC_R {
70 IC1PSC_R::new(((self.bits >> 2) & 3) as u8)
71 }
72 #[inline(always)]
74 pub fn ic1f(&self) -> IC1F_R {
75 IC1F_R::new(((self.bits >> 4) & 0x0f) as u8)
76 }
77 #[inline(always)]
79 pub fn cc2s(&self) -> CC2S_R {
80 CC2S_R::new(((self.bits >> 8) & 3) as u8)
81 }
82 #[inline(always)]
84 pub fn ic2psc(&self) -> IC2PSC_R {
85 IC2PSC_R::new(((self.bits >> 10) & 3) as u8)
86 }
87 #[inline(always)]
89 pub fn ic2f(&self) -> IC2F_R {
90 IC2F_R::new(((self.bits >> 12) & 0x0f) as u8)
91 }
92}
93impl W {
94 #[inline(always)]
96 #[must_use]
97 pub fn cc1s(&mut self) -> CC1S_W<0> {
98 CC1S_W::new(self)
99 }
100 #[inline(always)]
102 #[must_use]
103 pub fn ic1psc(&mut self) -> IC1PSC_W<2> {
104 IC1PSC_W::new(self)
105 }
106 #[inline(always)]
108 #[must_use]
109 pub fn ic1f(&mut self) -> IC1F_W<4> {
110 IC1F_W::new(self)
111 }
112 #[inline(always)]
114 #[must_use]
115 pub fn cc2s(&mut self) -> CC2S_W<8> {
116 CC2S_W::new(self)
117 }
118 #[inline(always)]
120 #[must_use]
121 pub fn ic2psc(&mut self) -> IC2PSC_W<10> {
122 IC2PSC_W::new(self)
123 }
124 #[inline(always)]
126 #[must_use]
127 pub fn ic2f(&mut self) -> IC2F_W<12> {
128 IC2F_W::new(self)
129 }
130 #[inline(always)]
132 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
133 self.0.bits(bits);
134 self
135 }
136}
137pub struct CCMR1_INPUT_SPEC;
143impl crate::RegisterSpec for CCMR1_INPUT_SPEC {
144 type Ux = u32;
145}
146impl crate::Readable for CCMR1_INPUT_SPEC {
148 type Reader = R;
149}
150impl crate::Writable for CCMR1_INPUT_SPEC {
152 type Writer = W;
153 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
154 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
155}
156impl crate::Resettable for CCMR1_INPUT_SPEC {
158 const RESET_VALUE: Self::Ux = 0;
159}