efm32tg11b_pac/efm32tg11b540/usart0/
timing.rs

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