msp430f6736/lcd_c/
lcdcpctl2.rs1#[doc = "Register `LCDCPCTL2` reader"]
2pub struct R(crate::R<LCDCPCTL2_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<LCDCPCTL2_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<LCDCPCTL2_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<LCDCPCTL2_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `LCDCPCTL2` writer"]
17pub struct W(crate::W<LCDCPCTL2_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<LCDCPCTL2_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<LCDCPCTL2_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<LCDCPCTL2_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `LCDS32` reader - LCD Segment 32 enable."]
38pub type LCDS32_R = crate::BitReader<bool>;
39#[doc = "Field `LCDS32` writer - LCD Segment 32 enable."]
40pub type LCDS32_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 0>;
41#[doc = "Field `LCDS33` reader - LCD Segment 33 enable."]
42pub type LCDS33_R = crate::BitReader<bool>;
43#[doc = "Field `LCDS33` writer - LCD Segment 33 enable."]
44pub type LCDS33_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 1>;
45#[doc = "Field `LCDS34` reader - LCD Segment 34 enable."]
46pub type LCDS34_R = crate::BitReader<bool>;
47#[doc = "Field `LCDS34` writer - LCD Segment 34 enable."]
48pub type LCDS34_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 2>;
49#[doc = "Field `LCDS35` reader - LCD Segment 35 enable."]
50pub type LCDS35_R = crate::BitReader<bool>;
51#[doc = "Field `LCDS35` writer - LCD Segment 35 enable."]
52pub type LCDS35_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 3>;
53#[doc = "Field `LCDS36` reader - LCD Segment 36 enable."]
54pub type LCDS36_R = crate::BitReader<bool>;
55#[doc = "Field `LCDS36` writer - LCD Segment 36 enable."]
56pub type LCDS36_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 4>;
57#[doc = "Field `LCDS37` reader - LCD Segment 37 enable."]
58pub type LCDS37_R = crate::BitReader<bool>;
59#[doc = "Field `LCDS37` writer - LCD Segment 37 enable."]
60pub type LCDS37_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 5>;
61#[doc = "Field `LCDS38` reader - LCD Segment 38 enable."]
62pub type LCDS38_R = crate::BitReader<bool>;
63#[doc = "Field `LCDS38` writer - LCD Segment 38 enable."]
64pub type LCDS38_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 6>;
65#[doc = "Field `LCDS39` reader - LCD Segment 39 enable."]
66pub type LCDS39_R = crate::BitReader<bool>;
67#[doc = "Field `LCDS39` writer - LCD Segment 39 enable."]
68pub type LCDS39_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 7>;
69#[doc = "Field `LCDS40` reader - LCD Segment 40 enable."]
70pub type LCDS40_R = crate::BitReader<bool>;
71#[doc = "Field `LCDS40` writer - LCD Segment 40 enable."]
72pub type LCDS40_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 8>;
73#[doc = "Field `LCDS41` reader - LCD Segment 41 enable."]
74pub type LCDS41_R = crate::BitReader<bool>;
75#[doc = "Field `LCDS41` writer - LCD Segment 41 enable."]
76pub type LCDS41_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 9>;
77#[doc = "Field `LCDS42` reader - LCD Segment 42 enable."]
78pub type LCDS42_R = crate::BitReader<bool>;
79#[doc = "Field `LCDS42` writer - LCD Segment 42 enable."]
80pub type LCDS42_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 10>;
81#[doc = "Field `LCDS43` reader - LCD Segment 43 enable."]
82pub type LCDS43_R = crate::BitReader<bool>;
83#[doc = "Field `LCDS43` writer - LCD Segment 43 enable."]
84pub type LCDS43_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 11>;
85#[doc = "Field `LCDS44` reader - LCD Segment 44 enable."]
86pub type LCDS44_R = crate::BitReader<bool>;
87#[doc = "Field `LCDS44` writer - LCD Segment 44 enable."]
88pub type LCDS44_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 12>;
89#[doc = "Field `LCDS45` reader - LCD Segment 45 enable."]
90pub type LCDS45_R = crate::BitReader<bool>;
91#[doc = "Field `LCDS45` writer - LCD Segment 45 enable."]
92pub type LCDS45_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 13>;
93#[doc = "Field `LCDS46` reader - LCD Segment 46 enable."]
94pub type LCDS46_R = crate::BitReader<bool>;
95#[doc = "Field `LCDS46` writer - LCD Segment 46 enable."]
96pub type LCDS46_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 14>;
97#[doc = "Field `LCDS47` reader - LCD Segment 47 enable."]
98pub type LCDS47_R = crate::BitReader<bool>;
99#[doc = "Field `LCDS47` writer - LCD Segment 47 enable."]
100pub type LCDS47_W<'a> = crate::BitWriter<'a, u16, LCDCPCTL2_SPEC, bool, 15>;
101impl R {
102 #[doc = "Bit 0 - LCD Segment 32 enable."]
103 #[inline(always)]
104 pub fn lcds32(&self) -> LCDS32_R {
105 LCDS32_R::new((self.bits & 1) != 0)
106 }
107 #[doc = "Bit 1 - LCD Segment 33 enable."]
108 #[inline(always)]
109 pub fn lcds33(&self) -> LCDS33_R {
110 LCDS33_R::new(((self.bits >> 1) & 1) != 0)
111 }
112 #[doc = "Bit 2 - LCD Segment 34 enable."]
113 #[inline(always)]
114 pub fn lcds34(&self) -> LCDS34_R {
115 LCDS34_R::new(((self.bits >> 2) & 1) != 0)
116 }
117 #[doc = "Bit 3 - LCD Segment 35 enable."]
118 #[inline(always)]
119 pub fn lcds35(&self) -> LCDS35_R {
120 LCDS35_R::new(((self.bits >> 3) & 1) != 0)
121 }
122 #[doc = "Bit 4 - LCD Segment 36 enable."]
123 #[inline(always)]
124 pub fn lcds36(&self) -> LCDS36_R {
125 LCDS36_R::new(((self.bits >> 4) & 1) != 0)
126 }
127 #[doc = "Bit 5 - LCD Segment 37 enable."]
128 #[inline(always)]
129 pub fn lcds37(&self) -> LCDS37_R {
130 LCDS37_R::new(((self.bits >> 5) & 1) != 0)
131 }
132 #[doc = "Bit 6 - LCD Segment 38 enable."]
133 #[inline(always)]
134 pub fn lcds38(&self) -> LCDS38_R {
135 LCDS38_R::new(((self.bits >> 6) & 1) != 0)
136 }
137 #[doc = "Bit 7 - LCD Segment 39 enable."]
138 #[inline(always)]
139 pub fn lcds39(&self) -> LCDS39_R {
140 LCDS39_R::new(((self.bits >> 7) & 1) != 0)
141 }
142 #[doc = "Bit 8 - LCD Segment 40 enable."]
143 #[inline(always)]
144 pub fn lcds40(&self) -> LCDS40_R {
145 LCDS40_R::new(((self.bits >> 8) & 1) != 0)
146 }
147 #[doc = "Bit 9 - LCD Segment 41 enable."]
148 #[inline(always)]
149 pub fn lcds41(&self) -> LCDS41_R {
150 LCDS41_R::new(((self.bits >> 9) & 1) != 0)
151 }
152 #[doc = "Bit 10 - LCD Segment 42 enable."]
153 #[inline(always)]
154 pub fn lcds42(&self) -> LCDS42_R {
155 LCDS42_R::new(((self.bits >> 10) & 1) != 0)
156 }
157 #[doc = "Bit 11 - LCD Segment 43 enable."]
158 #[inline(always)]
159 pub fn lcds43(&self) -> LCDS43_R {
160 LCDS43_R::new(((self.bits >> 11) & 1) != 0)
161 }
162 #[doc = "Bit 12 - LCD Segment 44 enable."]
163 #[inline(always)]
164 pub fn lcds44(&self) -> LCDS44_R {
165 LCDS44_R::new(((self.bits >> 12) & 1) != 0)
166 }
167 #[doc = "Bit 13 - LCD Segment 45 enable."]
168 #[inline(always)]
169 pub fn lcds45(&self) -> LCDS45_R {
170 LCDS45_R::new(((self.bits >> 13) & 1) != 0)
171 }
172 #[doc = "Bit 14 - LCD Segment 46 enable."]
173 #[inline(always)]
174 pub fn lcds46(&self) -> LCDS46_R {
175 LCDS46_R::new(((self.bits >> 14) & 1) != 0)
176 }
177 #[doc = "Bit 15 - LCD Segment 47 enable."]
178 #[inline(always)]
179 pub fn lcds47(&self) -> LCDS47_R {
180 LCDS47_R::new(((self.bits >> 15) & 1) != 0)
181 }
182}
183impl W {
184 #[doc = "Bit 0 - LCD Segment 32 enable."]
185 #[inline(always)]
186 pub fn lcds32(&mut self) -> LCDS32_W {
187 LCDS32_W::new(self)
188 }
189 #[doc = "Bit 1 - LCD Segment 33 enable."]
190 #[inline(always)]
191 pub fn lcds33(&mut self) -> LCDS33_W {
192 LCDS33_W::new(self)
193 }
194 #[doc = "Bit 2 - LCD Segment 34 enable."]
195 #[inline(always)]
196 pub fn lcds34(&mut self) -> LCDS34_W {
197 LCDS34_W::new(self)
198 }
199 #[doc = "Bit 3 - LCD Segment 35 enable."]
200 #[inline(always)]
201 pub fn lcds35(&mut self) -> LCDS35_W {
202 LCDS35_W::new(self)
203 }
204 #[doc = "Bit 4 - LCD Segment 36 enable."]
205 #[inline(always)]
206 pub fn lcds36(&mut self) -> LCDS36_W {
207 LCDS36_W::new(self)
208 }
209 #[doc = "Bit 5 - LCD Segment 37 enable."]
210 #[inline(always)]
211 pub fn lcds37(&mut self) -> LCDS37_W {
212 LCDS37_W::new(self)
213 }
214 #[doc = "Bit 6 - LCD Segment 38 enable."]
215 #[inline(always)]
216 pub fn lcds38(&mut self) -> LCDS38_W {
217 LCDS38_W::new(self)
218 }
219 #[doc = "Bit 7 - LCD Segment 39 enable."]
220 #[inline(always)]
221 pub fn lcds39(&mut self) -> LCDS39_W {
222 LCDS39_W::new(self)
223 }
224 #[doc = "Bit 8 - LCD Segment 40 enable."]
225 #[inline(always)]
226 pub fn lcds40(&mut self) -> LCDS40_W {
227 LCDS40_W::new(self)
228 }
229 #[doc = "Bit 9 - LCD Segment 41 enable."]
230 #[inline(always)]
231 pub fn lcds41(&mut self) -> LCDS41_W {
232 LCDS41_W::new(self)
233 }
234 #[doc = "Bit 10 - LCD Segment 42 enable."]
235 #[inline(always)]
236 pub fn lcds42(&mut self) -> LCDS42_W {
237 LCDS42_W::new(self)
238 }
239 #[doc = "Bit 11 - LCD Segment 43 enable."]
240 #[inline(always)]
241 pub fn lcds43(&mut self) -> LCDS43_W {
242 LCDS43_W::new(self)
243 }
244 #[doc = "Bit 12 - LCD Segment 44 enable."]
245 #[inline(always)]
246 pub fn lcds44(&mut self) -> LCDS44_W {
247 LCDS44_W::new(self)
248 }
249 #[doc = "Bit 13 - LCD Segment 45 enable."]
250 #[inline(always)]
251 pub fn lcds45(&mut self) -> LCDS45_W {
252 LCDS45_W::new(self)
253 }
254 #[doc = "Bit 14 - LCD Segment 46 enable."]
255 #[inline(always)]
256 pub fn lcds46(&mut self) -> LCDS46_W {
257 LCDS46_W::new(self)
258 }
259 #[doc = "Bit 15 - LCD Segment 47 enable."]
260 #[inline(always)]
261 pub fn lcds47(&mut self) -> LCDS47_W {
262 LCDS47_W::new(self)
263 }
264 #[doc = "Writes raw bits to the register."]
265 #[inline(always)]
266 pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
267 self.0.bits(bits);
268 self
269 }
270}
271#[doc = "LCD_C Port Control Register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [lcdcpctl2](index.html) module"]
272pub struct LCDCPCTL2_SPEC;
273impl crate::RegisterSpec for LCDCPCTL2_SPEC {
274 type Ux = u16;
275}
276#[doc = "`read()` method returns [lcdcpctl2::R](R) reader structure"]
277impl crate::Readable for LCDCPCTL2_SPEC {
278 type Reader = R;
279}
280#[doc = "`write(|w| ..)` method takes [lcdcpctl2::W](W) writer structure"]
281impl crate::Writable for LCDCPCTL2_SPEC {
282 type Writer = W;
283}
284#[doc = "`reset()` method sets LCDCPCTL2 to value 0"]
285impl crate::Resettable for LCDCPCTL2_SPEC {
286 #[inline(always)]
287 fn reset_value() -> Self::Ux {
288 0
289 }
290}