efm32gg11b820/uart1/
timing.rs

1#[doc = "Reader of register TIMING"]
2pub type R = crate::R<u32, super::TIMING>;
3#[doc = "Writer for register TIMING"]
4pub type W = crate::W<u32, super::TIMING>;
5#[doc = "Register TIMING `reset()`'s with value 0"]
6impl crate::ResetValue for super::TIMING {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "TX Frame Start Delay\n\nValue on reset: 0"]
14#[derive(Clone, Copy, Debug, PartialEq)]
15#[repr(u8)]
16pub enum TXDELAY_A {
17    #[doc = "0: Disable - TXDELAY in USARTn_CTRL can be used for legacy"]
18    DISABLE = 0,
19    #[doc = "1: Start of transmission is delayed for 1 baud-times"]
20    ONE = 1,
21    #[doc = "2: Start of transmission is delayed for 2 baud-times"]
22    TWO = 2,
23    #[doc = "3: Start of transmission is delayed for 3 baud-times"]
24    THREE = 3,
25    #[doc = "4: Start of transmission is delayed for 7 baud-times"]
26    SEVEN = 4,
27    #[doc = "5: Start of transmission is delayed for TCMPVAL0 baud-times"]
28    TCMP0 = 5,
29    #[doc = "6: Start of transmission is delayed for TCMPVAL1 baud-times"]
30    TCMP1 = 6,
31    #[doc = "7: Start of transmission is delayed for TCMPVAL2 baud-times"]
32    TCMP2 = 7,
33}
34impl From<TXDELAY_A> for u8 {
35    #[inline(always)]
36    fn from(variant: TXDELAY_A) -> Self {
37        variant as _
38    }
39}
40#[doc = "Reader of field `TXDELAY`"]
41pub type TXDELAY_R = crate::R<u8, TXDELAY_A>;
42impl TXDELAY_R {
43    #[doc = r"Get enumerated values variant"]
44    #[inline(always)]
45    pub fn variant(&self) -> TXDELAY_A {
46        match self.bits {
47            0 => TXDELAY_A::DISABLE,
48            1 => TXDELAY_A::ONE,
49            2 => TXDELAY_A::TWO,
50            3 => TXDELAY_A::THREE,
51            4 => TXDELAY_A::SEVEN,
52            5 => TXDELAY_A::TCMP0,
53            6 => TXDELAY_A::TCMP1,
54            7 => TXDELAY_A::TCMP2,
55            _ => unreachable!(),
56        }
57    }
58    #[doc = "Checks if the value of the field is `DISABLE`"]
59    #[inline(always)]
60    pub fn is_disable(&self) -> bool {
61        *self == TXDELAY_A::DISABLE
62    }
63    #[doc = "Checks if the value of the field is `ONE`"]
64    #[inline(always)]
65    pub fn is_one(&self) -> bool {
66        *self == TXDELAY_A::ONE
67    }
68    #[doc = "Checks if the value of the field is `TWO`"]
69    #[inline(always)]
70    pub fn is_two(&self) -> bool {
71        *self == TXDELAY_A::TWO
72    }
73    #[doc = "Checks if the value of the field is `THREE`"]
74    #[inline(always)]
75    pub fn is_three(&self) -> bool {
76        *self == TXDELAY_A::THREE
77    }
78    #[doc = "Checks if the value of the field is `SEVEN`"]
79    #[inline(always)]
80    pub fn is_seven(&self) -> bool {
81        *self == TXDELAY_A::SEVEN
82    }
83    #[doc = "Checks if the value of the field is `TCMP0`"]
84    #[inline(always)]
85    pub fn is_tcmp0(&self) -> bool {
86        *self == TXDELAY_A::TCMP0
87    }
88    #[doc = "Checks if the value of the field is `TCMP1`"]
89    #[inline(always)]
90    pub fn is_tcmp1(&self) -> bool {
91        *self == TXDELAY_A::TCMP1
92    }
93    #[doc = "Checks if the value of the field is `TCMP2`"]
94    #[inline(always)]
95    pub fn is_tcmp2(&self) -> bool {
96        *self == TXDELAY_A::TCMP2
97    }
98}
99#[doc = "Write proxy for field `TXDELAY`"]
100pub struct TXDELAY_W<'a> {
101    w: &'a mut W,
102}
103impl<'a> TXDELAY_W<'a> {
104    #[doc = r"Writes `variant` to the field"]
105    #[inline(always)]
106    pub fn variant(self, variant: TXDELAY_A) -> &'a mut W {
107        {
108            self.bits(variant.into())
109        }
110    }
111    #[doc = "Disable - TXDELAY in USARTn_CTRL can be used for legacy"]
112    #[inline(always)]
113    pub fn disable(self) -> &'a mut W {
114        self.variant(TXDELAY_A::DISABLE)
115    }
116    #[doc = "Start of transmission is delayed for 1 baud-times"]
117    #[inline(always)]
118    pub fn one(self) -> &'a mut W {
119        self.variant(TXDELAY_A::ONE)
120    }
121    #[doc = "Start of transmission is delayed for 2 baud-times"]
122    #[inline(always)]
123    pub fn two(self) -> &'a mut W {
124        self.variant(TXDELAY_A::TWO)
125    }
126    #[doc = "Start of transmission is delayed for 3 baud-times"]
127    #[inline(always)]
128    pub fn three(self) -> &'a mut W {
129        self.variant(TXDELAY_A::THREE)
130    }
131    #[doc = "Start of transmission is delayed for 7 baud-times"]
132    #[inline(always)]
133    pub fn seven(self) -> &'a mut W {
134        self.variant(TXDELAY_A::SEVEN)
135    }
136    #[doc = "Start of transmission is delayed for TCMPVAL0 baud-times"]
137    #[inline(always)]
138    pub fn tcmp0(self) -> &'a mut W {
139        self.variant(TXDELAY_A::TCMP0)
140    }
141    #[doc = "Start of transmission is delayed for TCMPVAL1 baud-times"]
142    #[inline(always)]
143    pub fn tcmp1(self) -> &'a mut W {
144        self.variant(TXDELAY_A::TCMP1)
145    }
146    #[doc = "Start of transmission is delayed for TCMPVAL2 baud-times"]
147    #[inline(always)]
148    pub fn tcmp2(self) -> &'a mut W {
149        self.variant(TXDELAY_A::TCMP2)
150    }
151    #[doc = r"Writes raw bits to the field"]
152    #[inline(always)]
153    pub fn bits(self, value: u8) -> &'a mut W {
154        self.w.bits = (self.w.bits & !(0x07 << 16)) | (((value as u32) & 0x07) << 16);
155        self.w
156    }
157}
158#[doc = "Chip Select Setup\n\nValue on reset: 0"]
159#[derive(Clone, Copy, Debug, PartialEq)]
160#[repr(u8)]
161pub enum CSSETUP_A {
162    #[doc = "0: CS is not asserted before start of transmission"]
163    ZERO = 0,
164    #[doc = "1: CS is asserted for 1 baud-times before start of transmission"]
165    ONE = 1,
166    #[doc = "2: CS is asserted for 2 baud-times before start of transmission"]
167    TWO = 2,
168    #[doc = "3: CS is asserted for 3 baud-times before start of transmission"]
169    THREE = 3,
170    #[doc = "4: CS is asserted for 7 baud-times before start of transmission"]
171    SEVEN = 4,
172    #[doc = "5: CS is asserted before the start of transmission for TCMPVAL0 baud-times"]
173    TCMP0 = 5,
174    #[doc = "6: CS is asserted before the start of transmission for TCMPVAL1 baud-times"]
175    TCMP1 = 6,
176    #[doc = "7: CS is asserted before the start of transmission for TCMPVAL2 baud-times"]
177    TCMP2 = 7,
178}
179impl From<CSSETUP_A> for u8 {
180    #[inline(always)]
181    fn from(variant: CSSETUP_A) -> Self {
182        variant as _
183    }
184}
185#[doc = "Reader of field `CSSETUP`"]
186pub type CSSETUP_R = crate::R<u8, CSSETUP_A>;
187impl CSSETUP_R {
188    #[doc = r"Get enumerated values variant"]
189    #[inline(always)]
190    pub fn variant(&self) -> CSSETUP_A {
191        match self.bits {
192            0 => CSSETUP_A::ZERO,
193            1 => CSSETUP_A::ONE,
194            2 => CSSETUP_A::TWO,
195            3 => CSSETUP_A::THREE,
196            4 => CSSETUP_A::SEVEN,
197            5 => CSSETUP_A::TCMP0,
198            6 => CSSETUP_A::TCMP1,
199            7 => CSSETUP_A::TCMP2,
200            _ => unreachable!(),
201        }
202    }
203    #[doc = "Checks if the value of the field is `ZERO`"]
204    #[inline(always)]
205    pub fn is_zero(&self) -> bool {
206        *self == CSSETUP_A::ZERO
207    }
208    #[doc = "Checks if the value of the field is `ONE`"]
209    #[inline(always)]
210    pub fn is_one(&self) -> bool {
211        *self == CSSETUP_A::ONE
212    }
213    #[doc = "Checks if the value of the field is `TWO`"]
214    #[inline(always)]
215    pub fn is_two(&self) -> bool {
216        *self == CSSETUP_A::TWO
217    }
218    #[doc = "Checks if the value of the field is `THREE`"]
219    #[inline(always)]
220    pub fn is_three(&self) -> bool {
221        *self == CSSETUP_A::THREE
222    }
223    #[doc = "Checks if the value of the field is `SEVEN`"]
224    #[inline(always)]
225    pub fn is_seven(&self) -> bool {
226        *self == CSSETUP_A::SEVEN
227    }
228    #[doc = "Checks if the value of the field is `TCMP0`"]
229    #[inline(always)]
230    pub fn is_tcmp0(&self) -> bool {
231        *self == CSSETUP_A::TCMP0
232    }
233    #[doc = "Checks if the value of the field is `TCMP1`"]
234    #[inline(always)]
235    pub fn is_tcmp1(&self) -> bool {
236        *self == CSSETUP_A::TCMP1
237    }
238    #[doc = "Checks if the value of the field is `TCMP2`"]
239    #[inline(always)]
240    pub fn is_tcmp2(&self) -> bool {
241        *self == CSSETUP_A::TCMP2
242    }
243}
244#[doc = "Write proxy for field `CSSETUP`"]
245pub struct CSSETUP_W<'a> {
246    w: &'a mut W,
247}
248impl<'a> CSSETUP_W<'a> {
249    #[doc = r"Writes `variant` to the field"]
250    #[inline(always)]
251    pub fn variant(self, variant: CSSETUP_A) -> &'a mut W {
252        {
253            self.bits(variant.into())
254        }
255    }
256    #[doc = "CS is not asserted before start of transmission"]
257    #[inline(always)]
258    pub fn zero(self) -> &'a mut W {
259        self.variant(CSSETUP_A::ZERO)
260    }
261    #[doc = "CS is asserted for 1 baud-times before start of transmission"]
262    #[inline(always)]
263    pub fn one(self) -> &'a mut W {
264        self.variant(CSSETUP_A::ONE)
265    }
266    #[doc = "CS is asserted for 2 baud-times before start of transmission"]
267    #[inline(always)]
268    pub fn two(self) -> &'a mut W {
269        self.variant(CSSETUP_A::TWO)
270    }
271    #[doc = "CS is asserted for 3 baud-times before start of transmission"]
272    #[inline(always)]
273    pub fn three(self) -> &'a mut W {
274        self.variant(CSSETUP_A::THREE)
275    }
276    #[doc = "CS is asserted for 7 baud-times before start of transmission"]
277    #[inline(always)]
278    pub fn seven(self) -> &'a mut W {
279        self.variant(CSSETUP_A::SEVEN)
280    }
281    #[doc = "CS is asserted before the start of transmission for TCMPVAL0 baud-times"]
282    #[inline(always)]
283    pub fn tcmp0(self) -> &'a mut W {
284        self.variant(CSSETUP_A::TCMP0)
285    }
286    #[doc = "CS is asserted before the start of transmission for TCMPVAL1 baud-times"]
287    #[inline(always)]
288    pub fn tcmp1(self) -> &'a mut W {
289        self.variant(CSSETUP_A::TCMP1)
290    }
291    #[doc = "CS is asserted before the start of transmission for TCMPVAL2 baud-times"]
292    #[inline(always)]
293    pub fn tcmp2(self) -> &'a mut W {
294        self.variant(CSSETUP_A::TCMP2)
295    }
296    #[doc = r"Writes raw bits to the field"]
297    #[inline(always)]
298    pub fn bits(self, value: u8) -> &'a mut W {
299        self.w.bits = (self.w.bits & !(0x07 << 20)) | (((value as u32) & 0x07) << 20);
300        self.w
301    }
302}
303#[doc = "Inter-character Spacing\n\nValue on reset: 0"]
304#[derive(Clone, Copy, Debug, PartialEq)]
305#[repr(u8)]
306pub enum ICS_A {
307    #[doc = "0: There is no space between charcters"]
308    ZERO = 0,
309    #[doc = "1: Create a space of 1 baud-times before start of transmission "]
310    ONE = 1,
311    #[doc = "2: Create a space of 2 baud-times before start of transmission"]
312    TWO = 2,
313    #[doc = "3: Create a space of 3 baud-times before start of transmission"]
314    THREE = 3,
315    #[doc = "4: Create a space of 7 baud-times before start of transmission"]
316    SEVEN = 4,
317    #[doc = "5: Create a space of before the start of transmission for TCMPVAL0 baud-times"]
318    TCMP0 = 5,
319    #[doc = "6: Create a space of before the start of transmission for TCMPVAL1 baud-times"]
320    TCMP1 = 6,
321    #[doc = "7: Create a space of before the start of transmission for TCMPVAL2 baud-times"]
322    TCMP2 = 7,
323}
324impl From<ICS_A> for u8 {
325    #[inline(always)]
326    fn from(variant: ICS_A) -> Self {
327        variant as _
328    }
329}
330#[doc = "Reader of field `ICS`"]
331pub type ICS_R = crate::R<u8, ICS_A>;
332impl ICS_R {
333    #[doc = r"Get enumerated values variant"]
334    #[inline(always)]
335    pub fn variant(&self) -> ICS_A {
336        match self.bits {
337            0 => ICS_A::ZERO,
338            1 => ICS_A::ONE,
339            2 => ICS_A::TWO,
340            3 => ICS_A::THREE,
341            4 => ICS_A::SEVEN,
342            5 => ICS_A::TCMP0,
343            6 => ICS_A::TCMP1,
344            7 => ICS_A::TCMP2,
345            _ => unreachable!(),
346        }
347    }
348    #[doc = "Checks if the value of the field is `ZERO`"]
349    #[inline(always)]
350    pub fn is_zero(&self) -> bool {
351        *self == ICS_A::ZERO
352    }
353    #[doc = "Checks if the value of the field is `ONE`"]
354    #[inline(always)]
355    pub fn is_one(&self) -> bool {
356        *self == ICS_A::ONE
357    }
358    #[doc = "Checks if the value of the field is `TWO`"]
359    #[inline(always)]
360    pub fn is_two(&self) -> bool {
361        *self == ICS_A::TWO
362    }
363    #[doc = "Checks if the value of the field is `THREE`"]
364    #[inline(always)]
365    pub fn is_three(&self) -> bool {
366        *self == ICS_A::THREE
367    }
368    #[doc = "Checks if the value of the field is `SEVEN`"]
369    #[inline(always)]
370    pub fn is_seven(&self) -> bool {
371        *self == ICS_A::SEVEN
372    }
373    #[doc = "Checks if the value of the field is `TCMP0`"]
374    #[inline(always)]
375    pub fn is_tcmp0(&self) -> bool {
376        *self == ICS_A::TCMP0
377    }
378    #[doc = "Checks if the value of the field is `TCMP1`"]
379    #[inline(always)]
380    pub fn is_tcmp1(&self) -> bool {
381        *self == ICS_A::TCMP1
382    }
383    #[doc = "Checks if the value of the field is `TCMP2`"]
384    #[inline(always)]
385    pub fn is_tcmp2(&self) -> bool {
386        *self == ICS_A::TCMP2
387    }
388}
389#[doc = "Write proxy for field `ICS`"]
390pub struct ICS_W<'a> {
391    w: &'a mut W,
392}
393impl<'a> ICS_W<'a> {
394    #[doc = r"Writes `variant` to the field"]
395    #[inline(always)]
396    pub fn variant(self, variant: ICS_A) -> &'a mut W {
397        {
398            self.bits(variant.into())
399        }
400    }
401    #[doc = "There is no space between charcters"]
402    #[inline(always)]
403    pub fn zero(self) -> &'a mut W {
404        self.variant(ICS_A::ZERO)
405    }
406    #[doc = "Create a space of 1 baud-times before start of transmission"]
407    #[inline(always)]
408    pub fn one(self) -> &'a mut W {
409        self.variant(ICS_A::ONE)
410    }
411    #[doc = "Create a space of 2 baud-times before start of transmission"]
412    #[inline(always)]
413    pub fn two(self) -> &'a mut W {
414        self.variant(ICS_A::TWO)
415    }
416    #[doc = "Create a space of 3 baud-times before start of transmission"]
417    #[inline(always)]
418    pub fn three(self) -> &'a mut W {
419        self.variant(ICS_A::THREE)
420    }
421    #[doc = "Create a space of 7 baud-times before start of transmission"]
422    #[inline(always)]
423    pub fn seven(self) -> &'a mut W {
424        self.variant(ICS_A::SEVEN)
425    }
426    #[doc = "Create a space of before the start of transmission for TCMPVAL0 baud-times"]
427    #[inline(always)]
428    pub fn tcmp0(self) -> &'a mut W {
429        self.variant(ICS_A::TCMP0)
430    }
431    #[doc = "Create a space of before the start of transmission for TCMPVAL1 baud-times"]
432    #[inline(always)]
433    pub fn tcmp1(self) -> &'a mut W {
434        self.variant(ICS_A::TCMP1)
435    }
436    #[doc = "Create a space of before the start of transmission for TCMPVAL2 baud-times"]
437    #[inline(always)]
438    pub fn tcmp2(self) -> &'a mut W {
439        self.variant(ICS_A::TCMP2)
440    }
441    #[doc = r"Writes raw bits to the field"]
442    #[inline(always)]
443    pub fn bits(self, value: u8) -> &'a mut W {
444        self.w.bits = (self.w.bits & !(0x07 << 24)) | (((value as u32) & 0x07) << 24);
445        self.w
446    }
447}
448#[doc = "Chip Select Hold\n\nValue on reset: 0"]
449#[derive(Clone, Copy, Debug, PartialEq)]
450#[repr(u8)]
451pub enum CSHOLD_A {
452    #[doc = "0: Disable CS being asserted after the end of transmission"]
453    ZERO = 0,
454    #[doc = "1: CS is asserted for 1 baud-times after the end of transmission"]
455    ONE = 1,
456    #[doc = "2: CS is asserted for 2 baud-times after the end of transmission"]
457    TWO = 2,
458    #[doc = "3: CS is asserted for 3 baud-times after the end of transmission"]
459    THREE = 3,
460    #[doc = "4: CS is asserted for 7 baud-times after the end of transmission"]
461    SEVEN = 4,
462    #[doc = "5: CS is asserted after the end of transmission for TCMPVAL0 baud-times"]
463    TCMP0 = 5,
464    #[doc = "6: CS is asserted after the end of transmission for TCMPVAL1 baud-times"]
465    TCMP1 = 6,
466    #[doc = "7: CS is asserted after the end of transmission for TCMPVAL2 baud-times"]
467    TCMP2 = 7,
468}
469impl From<CSHOLD_A> for u8 {
470    #[inline(always)]
471    fn from(variant: CSHOLD_A) -> Self {
472        variant as _
473    }
474}
475#[doc = "Reader of field `CSHOLD`"]
476pub type CSHOLD_R = crate::R<u8, CSHOLD_A>;
477impl CSHOLD_R {
478    #[doc = r"Get enumerated values variant"]
479    #[inline(always)]
480    pub fn variant(&self) -> CSHOLD_A {
481        match self.bits {
482            0 => CSHOLD_A::ZERO,
483            1 => CSHOLD_A::ONE,
484            2 => CSHOLD_A::TWO,
485            3 => CSHOLD_A::THREE,
486            4 => CSHOLD_A::SEVEN,
487            5 => CSHOLD_A::TCMP0,
488            6 => CSHOLD_A::TCMP1,
489            7 => CSHOLD_A::TCMP2,
490            _ => unreachable!(),
491        }
492    }
493    #[doc = "Checks if the value of the field is `ZERO`"]
494    #[inline(always)]
495    pub fn is_zero(&self) -> bool {
496        *self == CSHOLD_A::ZERO
497    }
498    #[doc = "Checks if the value of the field is `ONE`"]
499    #[inline(always)]
500    pub fn is_one(&self) -> bool {
501        *self == CSHOLD_A::ONE
502    }
503    #[doc = "Checks if the value of the field is `TWO`"]
504    #[inline(always)]
505    pub fn is_two(&self) -> bool {
506        *self == CSHOLD_A::TWO
507    }
508    #[doc = "Checks if the value of the field is `THREE`"]
509    #[inline(always)]
510    pub fn is_three(&self) -> bool {
511        *self == CSHOLD_A::THREE
512    }
513    #[doc = "Checks if the value of the field is `SEVEN`"]
514    #[inline(always)]
515    pub fn is_seven(&self) -> bool {
516        *self == CSHOLD_A::SEVEN
517    }
518    #[doc = "Checks if the value of the field is `TCMP0`"]
519    #[inline(always)]
520    pub fn is_tcmp0(&self) -> bool {
521        *self == CSHOLD_A::TCMP0
522    }
523    #[doc = "Checks if the value of the field is `TCMP1`"]
524    #[inline(always)]
525    pub fn is_tcmp1(&self) -> bool {
526        *self == CSHOLD_A::TCMP1
527    }
528    #[doc = "Checks if the value of the field is `TCMP2`"]
529    #[inline(always)]
530    pub fn is_tcmp2(&self) -> bool {
531        *self == CSHOLD_A::TCMP2
532    }
533}
534#[doc = "Write proxy for field `CSHOLD`"]
535pub struct CSHOLD_W<'a> {
536    w: &'a mut W,
537}
538impl<'a> CSHOLD_W<'a> {
539    #[doc = r"Writes `variant` to the field"]
540    #[inline(always)]
541    pub fn variant(self, variant: CSHOLD_A) -> &'a mut W {
542        {
543            self.bits(variant.into())
544        }
545    }
546    #[doc = "Disable CS being asserted after the end of transmission"]
547    #[inline(always)]
548    pub fn zero(self) -> &'a mut W {
549        self.variant(CSHOLD_A::ZERO)
550    }
551    #[doc = "CS is asserted for 1 baud-times after the end of transmission"]
552    #[inline(always)]
553    pub fn one(self) -> &'a mut W {
554        self.variant(CSHOLD_A::ONE)
555    }
556    #[doc = "CS is asserted for 2 baud-times after the end of transmission"]
557    #[inline(always)]
558    pub fn two(self) -> &'a mut W {
559        self.variant(CSHOLD_A::TWO)
560    }
561    #[doc = "CS is asserted for 3 baud-times after the end of transmission"]
562    #[inline(always)]
563    pub fn three(self) -> &'a mut W {
564        self.variant(CSHOLD_A::THREE)
565    }
566    #[doc = "CS is asserted for 7 baud-times after the end of transmission"]
567    #[inline(always)]
568    pub fn seven(self) -> &'a mut W {
569        self.variant(CSHOLD_A::SEVEN)
570    }
571    #[doc = "CS is asserted after the end of transmission for TCMPVAL0 baud-times"]
572    #[inline(always)]
573    pub fn tcmp0(self) -> &'a mut W {
574        self.variant(CSHOLD_A::TCMP0)
575    }
576    #[doc = "CS is asserted after the end of transmission for TCMPVAL1 baud-times"]
577    #[inline(always)]
578    pub fn tcmp1(self) -> &'a mut W {
579        self.variant(CSHOLD_A::TCMP1)
580    }
581    #[doc = "CS is asserted after the end of transmission for TCMPVAL2 baud-times"]
582    #[inline(always)]
583    pub fn tcmp2(self) -> &'a mut W {
584        self.variant(CSHOLD_A::TCMP2)
585    }
586    #[doc = r"Writes raw bits to the field"]
587    #[inline(always)]
588    pub fn bits(self, value: u8) -> &'a mut W {
589        self.w.bits = (self.w.bits & !(0x07 << 28)) | (((value as u32) & 0x07) << 28);
590        self.w
591    }
592}
593impl R {
594    #[doc = "Bits 16:18 - TX Frame Start Delay"]
595    #[inline(always)]
596    pub fn txdelay(&self) -> TXDELAY_R {
597        TXDELAY_R::new(((self.bits >> 16) & 0x07) as u8)
598    }
599    #[doc = "Bits 20:22 - Chip Select Setup"]
600    #[inline(always)]
601    pub fn cssetup(&self) -> CSSETUP_R {
602        CSSETUP_R::new(((self.bits >> 20) & 0x07) as u8)
603    }
604    #[doc = "Bits 24:26 - Inter-character Spacing"]
605    #[inline(always)]
606    pub fn ics(&self) -> ICS_R {
607        ICS_R::new(((self.bits >> 24) & 0x07) as u8)
608    }
609    #[doc = "Bits 28:30 - Chip Select Hold"]
610    #[inline(always)]
611    pub fn cshold(&self) -> CSHOLD_R {
612        CSHOLD_R::new(((self.bits >> 28) & 0x07) as u8)
613    }
614}
615impl W {
616    #[doc = "Bits 16:18 - TX Frame Start Delay"]
617    #[inline(always)]
618    pub fn txdelay(&mut self) -> TXDELAY_W {
619        TXDELAY_W { w: self }
620    }
621    #[doc = "Bits 20:22 - Chip Select Setup"]
622    #[inline(always)]
623    pub fn cssetup(&mut self) -> CSSETUP_W {
624        CSSETUP_W { w: self }
625    }
626    #[doc = "Bits 24:26 - Inter-character Spacing"]
627    #[inline(always)]
628    pub fn ics(&mut self) -> ICS_W {
629        ICS_W { w: self }
630    }
631    #[doc = "Bits 28:30 - Chip Select Hold"]
632    #[inline(always)]
633    pub fn cshold(&mut self) -> CSHOLD_W {
634        CSHOLD_W { w: self }
635    }
636}