efm32pg12_pac/i2c0/
ctrl.rs

1#[doc = "Reader of register CTRL"]
2pub type R = crate::R<u32, super::CTRL>;
3#[doc = "Writer for register CTRL"]
4pub type W = crate::W<u32, super::CTRL>;
5#[doc = "Register CTRL `reset()`'s with value 0"]
6impl crate::ResetValue for super::CTRL {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "Reader of field `EN`"]
14pub type EN_R = crate::R<bool, bool>;
15#[doc = "Write proxy for field `EN`"]
16pub struct EN_W<'a> {
17    w: &'a mut W,
18}
19impl<'a> EN_W<'a> {
20    #[doc = r"Sets the field bit"]
21    #[inline(always)]
22    pub fn set_bit(self) -> &'a mut W {
23        self.bit(true)
24    }
25    #[doc = r"Clears the field bit"]
26    #[inline(always)]
27    pub fn clear_bit(self) -> &'a mut W {
28        self.bit(false)
29    }
30    #[doc = r"Writes raw bits to the field"]
31    #[inline(always)]
32    pub fn bit(self, value: bool) -> &'a mut W {
33        self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
34        self.w
35    }
36}
37#[doc = "Reader of field `SLAVE`"]
38pub type SLAVE_R = crate::R<bool, bool>;
39#[doc = "Write proxy for field `SLAVE`"]
40pub struct SLAVE_W<'a> {
41    w: &'a mut W,
42}
43impl<'a> SLAVE_W<'a> {
44    #[doc = r"Sets the field bit"]
45    #[inline(always)]
46    pub fn set_bit(self) -> &'a mut W {
47        self.bit(true)
48    }
49    #[doc = r"Clears the field bit"]
50    #[inline(always)]
51    pub fn clear_bit(self) -> &'a mut W {
52        self.bit(false)
53    }
54    #[doc = r"Writes raw bits to the field"]
55    #[inline(always)]
56    pub fn bit(self, value: bool) -> &'a mut W {
57        self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
58        self.w
59    }
60}
61#[doc = "Reader of field `AUTOACK`"]
62pub type AUTOACK_R = crate::R<bool, bool>;
63#[doc = "Write proxy for field `AUTOACK`"]
64pub struct AUTOACK_W<'a> {
65    w: &'a mut W,
66}
67impl<'a> AUTOACK_W<'a> {
68    #[doc = r"Sets the field bit"]
69    #[inline(always)]
70    pub fn set_bit(self) -> &'a mut W {
71        self.bit(true)
72    }
73    #[doc = r"Clears the field bit"]
74    #[inline(always)]
75    pub fn clear_bit(self) -> &'a mut W {
76        self.bit(false)
77    }
78    #[doc = r"Writes raw bits to the field"]
79    #[inline(always)]
80    pub fn bit(self, value: bool) -> &'a mut W {
81        self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
82        self.w
83    }
84}
85#[doc = "Reader of field `AUTOSE`"]
86pub type AUTOSE_R = crate::R<bool, bool>;
87#[doc = "Write proxy for field `AUTOSE`"]
88pub struct AUTOSE_W<'a> {
89    w: &'a mut W,
90}
91impl<'a> AUTOSE_W<'a> {
92    #[doc = r"Sets the field bit"]
93    #[inline(always)]
94    pub fn set_bit(self) -> &'a mut W {
95        self.bit(true)
96    }
97    #[doc = r"Clears the field bit"]
98    #[inline(always)]
99    pub fn clear_bit(self) -> &'a mut W {
100        self.bit(false)
101    }
102    #[doc = r"Writes raw bits to the field"]
103    #[inline(always)]
104    pub fn bit(self, value: bool) -> &'a mut W {
105        self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
106        self.w
107    }
108}
109#[doc = "Reader of field `AUTOSN`"]
110pub type AUTOSN_R = crate::R<bool, bool>;
111#[doc = "Write proxy for field `AUTOSN`"]
112pub struct AUTOSN_W<'a> {
113    w: &'a mut W,
114}
115impl<'a> AUTOSN_W<'a> {
116    #[doc = r"Sets the field bit"]
117    #[inline(always)]
118    pub fn set_bit(self) -> &'a mut W {
119        self.bit(true)
120    }
121    #[doc = r"Clears the field bit"]
122    #[inline(always)]
123    pub fn clear_bit(self) -> &'a mut W {
124        self.bit(false)
125    }
126    #[doc = r"Writes raw bits to the field"]
127    #[inline(always)]
128    pub fn bit(self, value: bool) -> &'a mut W {
129        self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
130        self.w
131    }
132}
133#[doc = "Reader of field `ARBDIS`"]
134pub type ARBDIS_R = crate::R<bool, bool>;
135#[doc = "Write proxy for field `ARBDIS`"]
136pub struct ARBDIS_W<'a> {
137    w: &'a mut W,
138}
139impl<'a> ARBDIS_W<'a> {
140    #[doc = r"Sets the field bit"]
141    #[inline(always)]
142    pub fn set_bit(self) -> &'a mut W {
143        self.bit(true)
144    }
145    #[doc = r"Clears the field bit"]
146    #[inline(always)]
147    pub fn clear_bit(self) -> &'a mut W {
148        self.bit(false)
149    }
150    #[doc = r"Writes raw bits to the field"]
151    #[inline(always)]
152    pub fn bit(self, value: bool) -> &'a mut W {
153        self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
154        self.w
155    }
156}
157#[doc = "Reader of field `GCAMEN`"]
158pub type GCAMEN_R = crate::R<bool, bool>;
159#[doc = "Write proxy for field `GCAMEN`"]
160pub struct GCAMEN_W<'a> {
161    w: &'a mut W,
162}
163impl<'a> GCAMEN_W<'a> {
164    #[doc = r"Sets the field bit"]
165    #[inline(always)]
166    pub fn set_bit(self) -> &'a mut W {
167        self.bit(true)
168    }
169    #[doc = r"Clears the field bit"]
170    #[inline(always)]
171    pub fn clear_bit(self) -> &'a mut W {
172        self.bit(false)
173    }
174    #[doc = r"Writes raw bits to the field"]
175    #[inline(always)]
176    pub fn bit(self, value: bool) -> &'a mut W {
177        self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
178        self.w
179    }
180}
181#[doc = "Reader of field `TXBIL`"]
182pub type TXBIL_R = crate::R<bool, bool>;
183#[doc = "Write proxy for field `TXBIL`"]
184pub struct TXBIL_W<'a> {
185    w: &'a mut W,
186}
187impl<'a> TXBIL_W<'a> {
188    #[doc = r"Sets the field bit"]
189    #[inline(always)]
190    pub fn set_bit(self) -> &'a mut W {
191        self.bit(true)
192    }
193    #[doc = r"Clears the field bit"]
194    #[inline(always)]
195    pub fn clear_bit(self) -> &'a mut W {
196        self.bit(false)
197    }
198    #[doc = r"Writes raw bits to the field"]
199    #[inline(always)]
200    pub fn bit(self, value: bool) -> &'a mut W {
201        self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
202        self.w
203    }
204}
205#[doc = "Clock Low High Ratio\n\nValue on reset: 0"]
206#[derive(Clone, Copy, Debug, PartialEq)]
207#[repr(u8)]
208pub enum CLHR_A {
209    #[doc = "0: The ratio between low period and high period counters (Nlow:Nhigh) is 4:4"]
210    STANDARD = 0,
211    #[doc = "1: The ratio between low period and high period counters (Nlow:Nhigh) is 6:3"]
212    ASYMMETRIC = 1,
213    #[doc = "2: The ratio between low period and high period counters (Nlow:Nhigh) is 11:6"]
214    FAST = 2,
215}
216impl From<CLHR_A> for u8 {
217    #[inline(always)]
218    fn from(variant: CLHR_A) -> Self {
219        variant as _
220    }
221}
222#[doc = "Reader of field `CLHR`"]
223pub type CLHR_R = crate::R<u8, CLHR_A>;
224impl CLHR_R {
225    #[doc = r"Get enumerated values variant"]
226    #[inline(always)]
227    pub fn variant(&self) -> crate::Variant<u8, CLHR_A> {
228        use crate::Variant::*;
229        match self.bits {
230            0 => Val(CLHR_A::STANDARD),
231            1 => Val(CLHR_A::ASYMMETRIC),
232            2 => Val(CLHR_A::FAST),
233            i => Res(i),
234        }
235    }
236    #[doc = "Checks if the value of the field is `STANDARD`"]
237    #[inline(always)]
238    pub fn is_standard(&self) -> bool {
239        *self == CLHR_A::STANDARD
240    }
241    #[doc = "Checks if the value of the field is `ASYMMETRIC`"]
242    #[inline(always)]
243    pub fn is_asymmetric(&self) -> bool {
244        *self == CLHR_A::ASYMMETRIC
245    }
246    #[doc = "Checks if the value of the field is `FAST`"]
247    #[inline(always)]
248    pub fn is_fast(&self) -> bool {
249        *self == CLHR_A::FAST
250    }
251}
252#[doc = "Write proxy for field `CLHR`"]
253pub struct CLHR_W<'a> {
254    w: &'a mut W,
255}
256impl<'a> CLHR_W<'a> {
257    #[doc = r"Writes `variant` to the field"]
258    #[inline(always)]
259    pub fn variant(self, variant: CLHR_A) -> &'a mut W {
260        unsafe { self.bits(variant.into()) }
261    }
262    #[doc = "The ratio between low period and high period counters (Nlow:Nhigh) is 4:4"]
263    #[inline(always)]
264    pub fn standard(self) -> &'a mut W {
265        self.variant(CLHR_A::STANDARD)
266    }
267    #[doc = "The ratio between low period and high period counters (Nlow:Nhigh) is 6:3"]
268    #[inline(always)]
269    pub fn asymmetric(self) -> &'a mut W {
270        self.variant(CLHR_A::ASYMMETRIC)
271    }
272    #[doc = "The ratio between low period and high period counters (Nlow:Nhigh) is 11:6"]
273    #[inline(always)]
274    pub fn fast(self) -> &'a mut W {
275        self.variant(CLHR_A::FAST)
276    }
277    #[doc = r"Writes raw bits to the field"]
278    #[inline(always)]
279    pub unsafe fn bits(self, value: u8) -> &'a mut W {
280        self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8);
281        self.w
282    }
283}
284#[doc = "Bus Idle Timeout\n\nValue on reset: 0"]
285#[derive(Clone, Copy, Debug, PartialEq)]
286#[repr(u8)]
287pub enum BITO_A {
288    #[doc = "0: Timeout disabled"]
289    OFF = 0,
290    #[doc = "1: Timeout after 40 prescaled clock cycles. In standard mode at 100 kHz, this results in a 50us timeout."]
291    _40PCC = 1,
292    #[doc = "2: Timeout after 80 prescaled clock cycles. In standard mode at 100 kHz, this results in a 100us timeout."]
293    _80PCC = 2,
294    #[doc = "3: Timeout after 160 prescaled clock cycles. In standard mode at 100 kHz, this results in a 200us timeout."]
295    _160PCC = 3,
296}
297impl From<BITO_A> for u8 {
298    #[inline(always)]
299    fn from(variant: BITO_A) -> Self {
300        variant as _
301    }
302}
303#[doc = "Reader of field `BITO`"]
304pub type BITO_R = crate::R<u8, BITO_A>;
305impl BITO_R {
306    #[doc = r"Get enumerated values variant"]
307    #[inline(always)]
308    pub fn variant(&self) -> BITO_A {
309        match self.bits {
310            0 => BITO_A::OFF,
311            1 => BITO_A::_40PCC,
312            2 => BITO_A::_80PCC,
313            3 => BITO_A::_160PCC,
314            _ => unreachable!(),
315        }
316    }
317    #[doc = "Checks if the value of the field is `OFF`"]
318    #[inline(always)]
319    pub fn is_off(&self) -> bool {
320        *self == BITO_A::OFF
321    }
322    #[doc = "Checks if the value of the field is `_40PCC`"]
323    #[inline(always)]
324    pub fn is_40pcc(&self) -> bool {
325        *self == BITO_A::_40PCC
326    }
327    #[doc = "Checks if the value of the field is `_80PCC`"]
328    #[inline(always)]
329    pub fn is_80pcc(&self) -> bool {
330        *self == BITO_A::_80PCC
331    }
332    #[doc = "Checks if the value of the field is `_160PCC`"]
333    #[inline(always)]
334    pub fn is_160pcc(&self) -> bool {
335        *self == BITO_A::_160PCC
336    }
337}
338#[doc = "Write proxy for field `BITO`"]
339pub struct BITO_W<'a> {
340    w: &'a mut W,
341}
342impl<'a> BITO_W<'a> {
343    #[doc = r"Writes `variant` to the field"]
344    #[inline(always)]
345    pub fn variant(self, variant: BITO_A) -> &'a mut W {
346        {
347            self.bits(variant.into())
348        }
349    }
350    #[doc = "Timeout disabled"]
351    #[inline(always)]
352    pub fn off(self) -> &'a mut W {
353        self.variant(BITO_A::OFF)
354    }
355    #[doc = "Timeout after 40 prescaled clock cycles. In standard mode at 100 kHz, this results in a 50us timeout."]
356    #[inline(always)]
357    pub fn _40pcc(self) -> &'a mut W {
358        self.variant(BITO_A::_40PCC)
359    }
360    #[doc = "Timeout after 80 prescaled clock cycles. In standard mode at 100 kHz, this results in a 100us timeout."]
361    #[inline(always)]
362    pub fn _80pcc(self) -> &'a mut W {
363        self.variant(BITO_A::_80PCC)
364    }
365    #[doc = "Timeout after 160 prescaled clock cycles. In standard mode at 100 kHz, this results in a 200us timeout."]
366    #[inline(always)]
367    pub fn _160pcc(self) -> &'a mut W {
368        self.variant(BITO_A::_160PCC)
369    }
370    #[doc = r"Writes raw bits to the field"]
371    #[inline(always)]
372    pub fn bits(self, value: u8) -> &'a mut W {
373        self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12);
374        self.w
375    }
376}
377#[doc = "Reader of field `GIBITO`"]
378pub type GIBITO_R = crate::R<bool, bool>;
379#[doc = "Write proxy for field `GIBITO`"]
380pub struct GIBITO_W<'a> {
381    w: &'a mut W,
382}
383impl<'a> GIBITO_W<'a> {
384    #[doc = r"Sets the field bit"]
385    #[inline(always)]
386    pub fn set_bit(self) -> &'a mut W {
387        self.bit(true)
388    }
389    #[doc = r"Clears the field bit"]
390    #[inline(always)]
391    pub fn clear_bit(self) -> &'a mut W {
392        self.bit(false)
393    }
394    #[doc = r"Writes raw bits to the field"]
395    #[inline(always)]
396    pub fn bit(self, value: bool) -> &'a mut W {
397        self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
398        self.w
399    }
400}
401#[doc = "Clock Low Timeout\n\nValue on reset: 0"]
402#[derive(Clone, Copy, Debug, PartialEq)]
403#[repr(u8)]
404pub enum CLTO_A {
405    #[doc = "0: Timeout disabled"]
406    OFF = 0,
407    #[doc = "1: Timeout after 40 prescaled clock cycles. In standard mode at 100 kHz, this results in a 50us timeout."]
408    _40PCC = 1,
409    #[doc = "2: Timeout after 80 prescaled clock cycles. In standard mode at 100 kHz, this results in a 100us timeout."]
410    _80PCC = 2,
411    #[doc = "3: Timeout after 160 prescaled clock cycles. In standard mode at 100 kHz, this results in a 200us timeout."]
412    _160PCC = 3,
413    #[doc = "4: Timeout after 320 prescaled clock cycles. In standard mode at 100 kHz, this results in a 400us timeout."]
414    _320PCC = 4,
415    #[doc = "5: Timeout after 1024 prescaled clock cycles. In standard mode at 100 kHz, this results in a 1280us timeout."]
416    _1024PCC = 5,
417}
418impl From<CLTO_A> for u8 {
419    #[inline(always)]
420    fn from(variant: CLTO_A) -> Self {
421        variant as _
422    }
423}
424#[doc = "Reader of field `CLTO`"]
425pub type CLTO_R = crate::R<u8, CLTO_A>;
426impl CLTO_R {
427    #[doc = r"Get enumerated values variant"]
428    #[inline(always)]
429    pub fn variant(&self) -> crate::Variant<u8, CLTO_A> {
430        use crate::Variant::*;
431        match self.bits {
432            0 => Val(CLTO_A::OFF),
433            1 => Val(CLTO_A::_40PCC),
434            2 => Val(CLTO_A::_80PCC),
435            3 => Val(CLTO_A::_160PCC),
436            4 => Val(CLTO_A::_320PCC),
437            5 => Val(CLTO_A::_1024PCC),
438            i => Res(i),
439        }
440    }
441    #[doc = "Checks if the value of the field is `OFF`"]
442    #[inline(always)]
443    pub fn is_off(&self) -> bool {
444        *self == CLTO_A::OFF
445    }
446    #[doc = "Checks if the value of the field is `_40PCC`"]
447    #[inline(always)]
448    pub fn is_40pcc(&self) -> bool {
449        *self == CLTO_A::_40PCC
450    }
451    #[doc = "Checks if the value of the field is `_80PCC`"]
452    #[inline(always)]
453    pub fn is_80pcc(&self) -> bool {
454        *self == CLTO_A::_80PCC
455    }
456    #[doc = "Checks if the value of the field is `_160PCC`"]
457    #[inline(always)]
458    pub fn is_160pcc(&self) -> bool {
459        *self == CLTO_A::_160PCC
460    }
461    #[doc = "Checks if the value of the field is `_320PCC`"]
462    #[inline(always)]
463    pub fn is_320pcc(&self) -> bool {
464        *self == CLTO_A::_320PCC
465    }
466    #[doc = "Checks if the value of the field is `_1024PCC`"]
467    #[inline(always)]
468    pub fn is_1024pcc(&self) -> bool {
469        *self == CLTO_A::_1024PCC
470    }
471}
472#[doc = "Write proxy for field `CLTO`"]
473pub struct CLTO_W<'a> {
474    w: &'a mut W,
475}
476impl<'a> CLTO_W<'a> {
477    #[doc = r"Writes `variant` to the field"]
478    #[inline(always)]
479    pub fn variant(self, variant: CLTO_A) -> &'a mut W {
480        unsafe { self.bits(variant.into()) }
481    }
482    #[doc = "Timeout disabled"]
483    #[inline(always)]
484    pub fn off(self) -> &'a mut W {
485        self.variant(CLTO_A::OFF)
486    }
487    #[doc = "Timeout after 40 prescaled clock cycles. In standard mode at 100 kHz, this results in a 50us timeout."]
488    #[inline(always)]
489    pub fn _40pcc(self) -> &'a mut W {
490        self.variant(CLTO_A::_40PCC)
491    }
492    #[doc = "Timeout after 80 prescaled clock cycles. In standard mode at 100 kHz, this results in a 100us timeout."]
493    #[inline(always)]
494    pub fn _80pcc(self) -> &'a mut W {
495        self.variant(CLTO_A::_80PCC)
496    }
497    #[doc = "Timeout after 160 prescaled clock cycles. In standard mode at 100 kHz, this results in a 200us timeout."]
498    #[inline(always)]
499    pub fn _160pcc(self) -> &'a mut W {
500        self.variant(CLTO_A::_160PCC)
501    }
502    #[doc = "Timeout after 320 prescaled clock cycles. In standard mode at 100 kHz, this results in a 400us timeout."]
503    #[inline(always)]
504    pub fn _320pcc(self) -> &'a mut W {
505        self.variant(CLTO_A::_320PCC)
506    }
507    #[doc = "Timeout after 1024 prescaled clock cycles. In standard mode at 100 kHz, this results in a 1280us timeout."]
508    #[inline(always)]
509    pub fn _1024pcc(self) -> &'a mut W {
510        self.variant(CLTO_A::_1024PCC)
511    }
512    #[doc = r"Writes raw bits to the field"]
513    #[inline(always)]
514    pub unsafe fn bits(self, value: u8) -> &'a mut W {
515        self.w.bits = (self.w.bits & !(0x07 << 16)) | (((value as u32) & 0x07) << 16);
516        self.w
517    }
518}
519impl R {
520    #[doc = "Bit 0 - I2C Enable"]
521    #[inline(always)]
522    pub fn en(&self) -> EN_R {
523        EN_R::new((self.bits & 0x01) != 0)
524    }
525    #[doc = "Bit 1 - Addressable as Slave"]
526    #[inline(always)]
527    pub fn slave(&self) -> SLAVE_R {
528        SLAVE_R::new(((self.bits >> 1) & 0x01) != 0)
529    }
530    #[doc = "Bit 2 - Automatic Acknowledge"]
531    #[inline(always)]
532    pub fn autoack(&self) -> AUTOACK_R {
533        AUTOACK_R::new(((self.bits >> 2) & 0x01) != 0)
534    }
535    #[doc = "Bit 3 - Automatic STOP When Empty"]
536    #[inline(always)]
537    pub fn autose(&self) -> AUTOSE_R {
538        AUTOSE_R::new(((self.bits >> 3) & 0x01) != 0)
539    }
540    #[doc = "Bit 4 - Automatic STOP on NACK"]
541    #[inline(always)]
542    pub fn autosn(&self) -> AUTOSN_R {
543        AUTOSN_R::new(((self.bits >> 4) & 0x01) != 0)
544    }
545    #[doc = "Bit 5 - Arbitration Disable"]
546    #[inline(always)]
547    pub fn arbdis(&self) -> ARBDIS_R {
548        ARBDIS_R::new(((self.bits >> 5) & 0x01) != 0)
549    }
550    #[doc = "Bit 6 - General Call Address Match Enable"]
551    #[inline(always)]
552    pub fn gcamen(&self) -> GCAMEN_R {
553        GCAMEN_R::new(((self.bits >> 6) & 0x01) != 0)
554    }
555    #[doc = "Bit 7 - TX Buffer Interrupt Level"]
556    #[inline(always)]
557    pub fn txbil(&self) -> TXBIL_R {
558        TXBIL_R::new(((self.bits >> 7) & 0x01) != 0)
559    }
560    #[doc = "Bits 8:9 - Clock Low High Ratio"]
561    #[inline(always)]
562    pub fn clhr(&self) -> CLHR_R {
563        CLHR_R::new(((self.bits >> 8) & 0x03) as u8)
564    }
565    #[doc = "Bits 12:13 - Bus Idle Timeout"]
566    #[inline(always)]
567    pub fn bito(&self) -> BITO_R {
568        BITO_R::new(((self.bits >> 12) & 0x03) as u8)
569    }
570    #[doc = "Bit 15 - Go Idle on Bus Idle Timeout"]
571    #[inline(always)]
572    pub fn gibito(&self) -> GIBITO_R {
573        GIBITO_R::new(((self.bits >> 15) & 0x01) != 0)
574    }
575    #[doc = "Bits 16:18 - Clock Low Timeout"]
576    #[inline(always)]
577    pub fn clto(&self) -> CLTO_R {
578        CLTO_R::new(((self.bits >> 16) & 0x07) as u8)
579    }
580}
581impl W {
582    #[doc = "Bit 0 - I2C Enable"]
583    #[inline(always)]
584    pub fn en(&mut self) -> EN_W {
585        EN_W { w: self }
586    }
587    #[doc = "Bit 1 - Addressable as Slave"]
588    #[inline(always)]
589    pub fn slave(&mut self) -> SLAVE_W {
590        SLAVE_W { w: self }
591    }
592    #[doc = "Bit 2 - Automatic Acknowledge"]
593    #[inline(always)]
594    pub fn autoack(&mut self) -> AUTOACK_W {
595        AUTOACK_W { w: self }
596    }
597    #[doc = "Bit 3 - Automatic STOP When Empty"]
598    #[inline(always)]
599    pub fn autose(&mut self) -> AUTOSE_W {
600        AUTOSE_W { w: self }
601    }
602    #[doc = "Bit 4 - Automatic STOP on NACK"]
603    #[inline(always)]
604    pub fn autosn(&mut self) -> AUTOSN_W {
605        AUTOSN_W { w: self }
606    }
607    #[doc = "Bit 5 - Arbitration Disable"]
608    #[inline(always)]
609    pub fn arbdis(&mut self) -> ARBDIS_W {
610        ARBDIS_W { w: self }
611    }
612    #[doc = "Bit 6 - General Call Address Match Enable"]
613    #[inline(always)]
614    pub fn gcamen(&mut self) -> GCAMEN_W {
615        GCAMEN_W { w: self }
616    }
617    #[doc = "Bit 7 - TX Buffer Interrupt Level"]
618    #[inline(always)]
619    pub fn txbil(&mut self) -> TXBIL_W {
620        TXBIL_W { w: self }
621    }
622    #[doc = "Bits 8:9 - Clock Low High Ratio"]
623    #[inline(always)]
624    pub fn clhr(&mut self) -> CLHR_W {
625        CLHR_W { w: self }
626    }
627    #[doc = "Bits 12:13 - Bus Idle Timeout"]
628    #[inline(always)]
629    pub fn bito(&mut self) -> BITO_W {
630        BITO_W { w: self }
631    }
632    #[doc = "Bit 15 - Go Idle on Bus Idle Timeout"]
633    #[inline(always)]
634    pub fn gibito(&mut self) -> GIBITO_W {
635        GIBITO_W { w: self }
636    }
637    #[doc = "Bits 16:18 - Clock Low Timeout"]
638    #[inline(always)]
639    pub fn clto(&mut self) -> CLTO_W {
640        CLTO_W { w: self }
641    }
642}