stm32wb_pac/i2c1/
cr1.rs

1#[doc = "Reader of register CR1"]
2pub type R = crate::R<u32, super::CR1>;
3#[doc = "Writer for register CR1"]
4pub type W = crate::W<u32, super::CR1>;
5#[doc = "Register CR1 `reset()`'s with value 0"]
6impl crate::ResetValue for super::CR1 {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "Reader of field `PE`"]
14pub type PE_R = crate::R<bool, bool>;
15#[doc = "Write proxy for field `PE`"]
16pub struct PE_W<'a> {
17    w: &'a mut W,
18}
19impl<'a> PE_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 `TXIE`"]
38pub type TXIE_R = crate::R<bool, bool>;
39#[doc = "Write proxy for field `TXIE`"]
40pub struct TXIE_W<'a> {
41    w: &'a mut W,
42}
43impl<'a> TXIE_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 `RXIE`"]
62pub type RXIE_R = crate::R<bool, bool>;
63#[doc = "Write proxy for field `RXIE`"]
64pub struct RXIE_W<'a> {
65    w: &'a mut W,
66}
67impl<'a> RXIE_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 `ADDRIE`"]
86pub type ADDRIE_R = crate::R<bool, bool>;
87#[doc = "Write proxy for field `ADDRIE`"]
88pub struct ADDRIE_W<'a> {
89    w: &'a mut W,
90}
91impl<'a> ADDRIE_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 `NACKIE`"]
110pub type NACKIE_R = crate::R<bool, bool>;
111#[doc = "Write proxy for field `NACKIE`"]
112pub struct NACKIE_W<'a> {
113    w: &'a mut W,
114}
115impl<'a> NACKIE_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 `STOPIE`"]
134pub type STOPIE_R = crate::R<bool, bool>;
135#[doc = "Write proxy for field `STOPIE`"]
136pub struct STOPIE_W<'a> {
137    w: &'a mut W,
138}
139impl<'a> STOPIE_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 `TCIE`"]
158pub type TCIE_R = crate::R<bool, bool>;
159#[doc = "Write proxy for field `TCIE`"]
160pub struct TCIE_W<'a> {
161    w: &'a mut W,
162}
163impl<'a> TCIE_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 `ERRIE`"]
182pub type ERRIE_R = crate::R<bool, bool>;
183#[doc = "Write proxy for field `ERRIE`"]
184pub struct ERRIE_W<'a> {
185    w: &'a mut W,
186}
187impl<'a> ERRIE_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 = "Reader of field `DNF`"]
206pub type DNF_R = crate::R<u8, u8>;
207#[doc = "Write proxy for field `DNF`"]
208pub struct DNF_W<'a> {
209    w: &'a mut W,
210}
211impl<'a> DNF_W<'a> {
212    #[doc = r"Writes raw bits to the field"]
213    #[inline(always)]
214    pub unsafe fn bits(self, value: u8) -> &'a mut W {
215        self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8);
216        self.w
217    }
218}
219#[doc = "Reader of field `ANFOFF`"]
220pub type ANFOFF_R = crate::R<bool, bool>;
221#[doc = "Write proxy for field `ANFOFF`"]
222pub struct ANFOFF_W<'a> {
223    w: &'a mut W,
224}
225impl<'a> ANFOFF_W<'a> {
226    #[doc = r"Sets the field bit"]
227    #[inline(always)]
228    pub fn set_bit(self) -> &'a mut W {
229        self.bit(true)
230    }
231    #[doc = r"Clears the field bit"]
232    #[inline(always)]
233    pub fn clear_bit(self) -> &'a mut W {
234        self.bit(false)
235    }
236    #[doc = r"Writes raw bits to the field"]
237    #[inline(always)]
238    pub fn bit(self, value: bool) -> &'a mut W {
239        self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
240        self.w
241    }
242}
243#[doc = "Reader of field `TXDMAEN`"]
244pub type TXDMAEN_R = crate::R<bool, bool>;
245#[doc = "Write proxy for field `TXDMAEN`"]
246pub struct TXDMAEN_W<'a> {
247    w: &'a mut W,
248}
249impl<'a> TXDMAEN_W<'a> {
250    #[doc = r"Sets the field bit"]
251    #[inline(always)]
252    pub fn set_bit(self) -> &'a mut W {
253        self.bit(true)
254    }
255    #[doc = r"Clears the field bit"]
256    #[inline(always)]
257    pub fn clear_bit(self) -> &'a mut W {
258        self.bit(false)
259    }
260    #[doc = r"Writes raw bits to the field"]
261    #[inline(always)]
262    pub fn bit(self, value: bool) -> &'a mut W {
263        self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
264        self.w
265    }
266}
267#[doc = "Reader of field `RXDMAEN`"]
268pub type RXDMAEN_R = crate::R<bool, bool>;
269#[doc = "Write proxy for field `RXDMAEN`"]
270pub struct RXDMAEN_W<'a> {
271    w: &'a mut W,
272}
273impl<'a> RXDMAEN_W<'a> {
274    #[doc = r"Sets the field bit"]
275    #[inline(always)]
276    pub fn set_bit(self) -> &'a mut W {
277        self.bit(true)
278    }
279    #[doc = r"Clears the field bit"]
280    #[inline(always)]
281    pub fn clear_bit(self) -> &'a mut W {
282        self.bit(false)
283    }
284    #[doc = r"Writes raw bits to the field"]
285    #[inline(always)]
286    pub fn bit(self, value: bool) -> &'a mut W {
287        self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
288        self.w
289    }
290}
291#[doc = "Reader of field `SBC`"]
292pub type SBC_R = crate::R<bool, bool>;
293#[doc = "Write proxy for field `SBC`"]
294pub struct SBC_W<'a> {
295    w: &'a mut W,
296}
297impl<'a> SBC_W<'a> {
298    #[doc = r"Sets the field bit"]
299    #[inline(always)]
300    pub fn set_bit(self) -> &'a mut W {
301        self.bit(true)
302    }
303    #[doc = r"Clears the field bit"]
304    #[inline(always)]
305    pub fn clear_bit(self) -> &'a mut W {
306        self.bit(false)
307    }
308    #[doc = r"Writes raw bits to the field"]
309    #[inline(always)]
310    pub fn bit(self, value: bool) -> &'a mut W {
311        self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
312        self.w
313    }
314}
315#[doc = "Reader of field `NOSTRETCH`"]
316pub type NOSTRETCH_R = crate::R<bool, bool>;
317#[doc = "Write proxy for field `NOSTRETCH`"]
318pub struct NOSTRETCH_W<'a> {
319    w: &'a mut W,
320}
321impl<'a> NOSTRETCH_W<'a> {
322    #[doc = r"Sets the field bit"]
323    #[inline(always)]
324    pub fn set_bit(self) -> &'a mut W {
325        self.bit(true)
326    }
327    #[doc = r"Clears the field bit"]
328    #[inline(always)]
329    pub fn clear_bit(self) -> &'a mut W {
330        self.bit(false)
331    }
332    #[doc = r"Writes raw bits to the field"]
333    #[inline(always)]
334    pub fn bit(self, value: bool) -> &'a mut W {
335        self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
336        self.w
337    }
338}
339#[doc = "Reader of field `WUPEN`"]
340pub type WUPEN_R = crate::R<bool, bool>;
341#[doc = "Write proxy for field `WUPEN`"]
342pub struct WUPEN_W<'a> {
343    w: &'a mut W,
344}
345impl<'a> WUPEN_W<'a> {
346    #[doc = r"Sets the field bit"]
347    #[inline(always)]
348    pub fn set_bit(self) -> &'a mut W {
349        self.bit(true)
350    }
351    #[doc = r"Clears the field bit"]
352    #[inline(always)]
353    pub fn clear_bit(self) -> &'a mut W {
354        self.bit(false)
355    }
356    #[doc = r"Writes raw bits to the field"]
357    #[inline(always)]
358    pub fn bit(self, value: bool) -> &'a mut W {
359        self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
360        self.w
361    }
362}
363#[doc = "Reader of field `GCEN`"]
364pub type GCEN_R = crate::R<bool, bool>;
365#[doc = "Write proxy for field `GCEN`"]
366pub struct GCEN_W<'a> {
367    w: &'a mut W,
368}
369impl<'a> GCEN_W<'a> {
370    #[doc = r"Sets the field bit"]
371    #[inline(always)]
372    pub fn set_bit(self) -> &'a mut W {
373        self.bit(true)
374    }
375    #[doc = r"Clears the field bit"]
376    #[inline(always)]
377    pub fn clear_bit(self) -> &'a mut W {
378        self.bit(false)
379    }
380    #[doc = r"Writes raw bits to the field"]
381    #[inline(always)]
382    pub fn bit(self, value: bool) -> &'a mut W {
383        self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
384        self.w
385    }
386}
387#[doc = "Reader of field `SMBHEN`"]
388pub type SMBHEN_R = crate::R<bool, bool>;
389#[doc = "Write proxy for field `SMBHEN`"]
390pub struct SMBHEN_W<'a> {
391    w: &'a mut W,
392}
393impl<'a> SMBHEN_W<'a> {
394    #[doc = r"Sets the field bit"]
395    #[inline(always)]
396    pub fn set_bit(self) -> &'a mut W {
397        self.bit(true)
398    }
399    #[doc = r"Clears the field bit"]
400    #[inline(always)]
401    pub fn clear_bit(self) -> &'a mut W {
402        self.bit(false)
403    }
404    #[doc = r"Writes raw bits to the field"]
405    #[inline(always)]
406    pub fn bit(self, value: bool) -> &'a mut W {
407        self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
408        self.w
409    }
410}
411#[doc = "Reader of field `SMBDEN`"]
412pub type SMBDEN_R = crate::R<bool, bool>;
413#[doc = "Write proxy for field `SMBDEN`"]
414pub struct SMBDEN_W<'a> {
415    w: &'a mut W,
416}
417impl<'a> SMBDEN_W<'a> {
418    #[doc = r"Sets the field bit"]
419    #[inline(always)]
420    pub fn set_bit(self) -> &'a mut W {
421        self.bit(true)
422    }
423    #[doc = r"Clears the field bit"]
424    #[inline(always)]
425    pub fn clear_bit(self) -> &'a mut W {
426        self.bit(false)
427    }
428    #[doc = r"Writes raw bits to the field"]
429    #[inline(always)]
430    pub fn bit(self, value: bool) -> &'a mut W {
431        self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21);
432        self.w
433    }
434}
435#[doc = "Reader of field `ALERTEN`"]
436pub type ALERTEN_R = crate::R<bool, bool>;
437#[doc = "Write proxy for field `ALERTEN`"]
438pub struct ALERTEN_W<'a> {
439    w: &'a mut W,
440}
441impl<'a> ALERTEN_W<'a> {
442    #[doc = r"Sets the field bit"]
443    #[inline(always)]
444    pub fn set_bit(self) -> &'a mut W {
445        self.bit(true)
446    }
447    #[doc = r"Clears the field bit"]
448    #[inline(always)]
449    pub fn clear_bit(self) -> &'a mut W {
450        self.bit(false)
451    }
452    #[doc = r"Writes raw bits to the field"]
453    #[inline(always)]
454    pub fn bit(self, value: bool) -> &'a mut W {
455        self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
456        self.w
457    }
458}
459#[doc = "Reader of field `PECEN`"]
460pub type PECEN_R = crate::R<bool, bool>;
461#[doc = "Write proxy for field `PECEN`"]
462pub struct PECEN_W<'a> {
463    w: &'a mut W,
464}
465impl<'a> PECEN_W<'a> {
466    #[doc = r"Sets the field bit"]
467    #[inline(always)]
468    pub fn set_bit(self) -> &'a mut W {
469        self.bit(true)
470    }
471    #[doc = r"Clears the field bit"]
472    #[inline(always)]
473    pub fn clear_bit(self) -> &'a mut W {
474        self.bit(false)
475    }
476    #[doc = r"Writes raw bits to the field"]
477    #[inline(always)]
478    pub fn bit(self, value: bool) -> &'a mut W {
479        self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23);
480        self.w
481    }
482}
483impl R {
484    #[doc = "Bit 0 - Peripheral enable"]
485    #[inline(always)]
486    pub fn pe(&self) -> PE_R {
487        PE_R::new((self.bits & 0x01) != 0)
488    }
489    #[doc = "Bit 1 - TX Interrupt enable"]
490    #[inline(always)]
491    pub fn txie(&self) -> TXIE_R {
492        TXIE_R::new(((self.bits >> 1) & 0x01) != 0)
493    }
494    #[doc = "Bit 2 - RX Interrupt enable"]
495    #[inline(always)]
496    pub fn rxie(&self) -> RXIE_R {
497        RXIE_R::new(((self.bits >> 2) & 0x01) != 0)
498    }
499    #[doc = "Bit 3 - Address match interrupt enable (slave only)"]
500    #[inline(always)]
501    pub fn addrie(&self) -> ADDRIE_R {
502        ADDRIE_R::new(((self.bits >> 3) & 0x01) != 0)
503    }
504    #[doc = "Bit 4 - Not acknowledge received interrupt enable"]
505    #[inline(always)]
506    pub fn nackie(&self) -> NACKIE_R {
507        NACKIE_R::new(((self.bits >> 4) & 0x01) != 0)
508    }
509    #[doc = "Bit 5 - STOP detection Interrupt enable"]
510    #[inline(always)]
511    pub fn stopie(&self) -> STOPIE_R {
512        STOPIE_R::new(((self.bits >> 5) & 0x01) != 0)
513    }
514    #[doc = "Bit 6 - Transfer Complete interrupt enable"]
515    #[inline(always)]
516    pub fn tcie(&self) -> TCIE_R {
517        TCIE_R::new(((self.bits >> 6) & 0x01) != 0)
518    }
519    #[doc = "Bit 7 - Error interrupts enable"]
520    #[inline(always)]
521    pub fn errie(&self) -> ERRIE_R {
522        ERRIE_R::new(((self.bits >> 7) & 0x01) != 0)
523    }
524    #[doc = "Bits 8:11 - Digital noise filter"]
525    #[inline(always)]
526    pub fn dnf(&self) -> DNF_R {
527        DNF_R::new(((self.bits >> 8) & 0x0f) as u8)
528    }
529    #[doc = "Bit 12 - Analog noise filter OFF"]
530    #[inline(always)]
531    pub fn anfoff(&self) -> ANFOFF_R {
532        ANFOFF_R::new(((self.bits >> 12) & 0x01) != 0)
533    }
534    #[doc = "Bit 14 - DMA transmission requests enable"]
535    #[inline(always)]
536    pub fn txdmaen(&self) -> TXDMAEN_R {
537        TXDMAEN_R::new(((self.bits >> 14) & 0x01) != 0)
538    }
539    #[doc = "Bit 15 - DMA reception requests enable"]
540    #[inline(always)]
541    pub fn rxdmaen(&self) -> RXDMAEN_R {
542        RXDMAEN_R::new(((self.bits >> 15) & 0x01) != 0)
543    }
544    #[doc = "Bit 16 - Slave byte control"]
545    #[inline(always)]
546    pub fn sbc(&self) -> SBC_R {
547        SBC_R::new(((self.bits >> 16) & 0x01) != 0)
548    }
549    #[doc = "Bit 17 - Clock stretching disable"]
550    #[inline(always)]
551    pub fn nostretch(&self) -> NOSTRETCH_R {
552        NOSTRETCH_R::new(((self.bits >> 17) & 0x01) != 0)
553    }
554    #[doc = "Bit 18 - Wakeup from STOP enable"]
555    #[inline(always)]
556    pub fn wupen(&self) -> WUPEN_R {
557        WUPEN_R::new(((self.bits >> 18) & 0x01) != 0)
558    }
559    #[doc = "Bit 19 - General call enable"]
560    #[inline(always)]
561    pub fn gcen(&self) -> GCEN_R {
562        GCEN_R::new(((self.bits >> 19) & 0x01) != 0)
563    }
564    #[doc = "Bit 20 - SMBus Host address enable"]
565    #[inline(always)]
566    pub fn smbhen(&self) -> SMBHEN_R {
567        SMBHEN_R::new(((self.bits >> 20) & 0x01) != 0)
568    }
569    #[doc = "Bit 21 - SMBus Device Default address enable"]
570    #[inline(always)]
571    pub fn smbden(&self) -> SMBDEN_R {
572        SMBDEN_R::new(((self.bits >> 21) & 0x01) != 0)
573    }
574    #[doc = "Bit 22 - SMBUS alert enable"]
575    #[inline(always)]
576    pub fn alerten(&self) -> ALERTEN_R {
577        ALERTEN_R::new(((self.bits >> 22) & 0x01) != 0)
578    }
579    #[doc = "Bit 23 - PEC enable"]
580    #[inline(always)]
581    pub fn pecen(&self) -> PECEN_R {
582        PECEN_R::new(((self.bits >> 23) & 0x01) != 0)
583    }
584}
585impl W {
586    #[doc = "Bit 0 - Peripheral enable"]
587    #[inline(always)]
588    pub fn pe(&mut self) -> PE_W {
589        PE_W { w: self }
590    }
591    #[doc = "Bit 1 - TX Interrupt enable"]
592    #[inline(always)]
593    pub fn txie(&mut self) -> TXIE_W {
594        TXIE_W { w: self }
595    }
596    #[doc = "Bit 2 - RX Interrupt enable"]
597    #[inline(always)]
598    pub fn rxie(&mut self) -> RXIE_W {
599        RXIE_W { w: self }
600    }
601    #[doc = "Bit 3 - Address match interrupt enable (slave only)"]
602    #[inline(always)]
603    pub fn addrie(&mut self) -> ADDRIE_W {
604        ADDRIE_W { w: self }
605    }
606    #[doc = "Bit 4 - Not acknowledge received interrupt enable"]
607    #[inline(always)]
608    pub fn nackie(&mut self) -> NACKIE_W {
609        NACKIE_W { w: self }
610    }
611    #[doc = "Bit 5 - STOP detection Interrupt enable"]
612    #[inline(always)]
613    pub fn stopie(&mut self) -> STOPIE_W {
614        STOPIE_W { w: self }
615    }
616    #[doc = "Bit 6 - Transfer Complete interrupt enable"]
617    #[inline(always)]
618    pub fn tcie(&mut self) -> TCIE_W {
619        TCIE_W { w: self }
620    }
621    #[doc = "Bit 7 - Error interrupts enable"]
622    #[inline(always)]
623    pub fn errie(&mut self) -> ERRIE_W {
624        ERRIE_W { w: self }
625    }
626    #[doc = "Bits 8:11 - Digital noise filter"]
627    #[inline(always)]
628    pub fn dnf(&mut self) -> DNF_W {
629        DNF_W { w: self }
630    }
631    #[doc = "Bit 12 - Analog noise filter OFF"]
632    #[inline(always)]
633    pub fn anfoff(&mut self) -> ANFOFF_W {
634        ANFOFF_W { w: self }
635    }
636    #[doc = "Bit 14 - DMA transmission requests enable"]
637    #[inline(always)]
638    pub fn txdmaen(&mut self) -> TXDMAEN_W {
639        TXDMAEN_W { w: self }
640    }
641    #[doc = "Bit 15 - DMA reception requests enable"]
642    #[inline(always)]
643    pub fn rxdmaen(&mut self) -> RXDMAEN_W {
644        RXDMAEN_W { w: self }
645    }
646    #[doc = "Bit 16 - Slave byte control"]
647    #[inline(always)]
648    pub fn sbc(&mut self) -> SBC_W {
649        SBC_W { w: self }
650    }
651    #[doc = "Bit 17 - Clock stretching disable"]
652    #[inline(always)]
653    pub fn nostretch(&mut self) -> NOSTRETCH_W {
654        NOSTRETCH_W { w: self }
655    }
656    #[doc = "Bit 18 - Wakeup from STOP enable"]
657    #[inline(always)]
658    pub fn wupen(&mut self) -> WUPEN_W {
659        WUPEN_W { w: self }
660    }
661    #[doc = "Bit 19 - General call enable"]
662    #[inline(always)]
663    pub fn gcen(&mut self) -> GCEN_W {
664        GCEN_W { w: self }
665    }
666    #[doc = "Bit 20 - SMBus Host address enable"]
667    #[inline(always)]
668    pub fn smbhen(&mut self) -> SMBHEN_W {
669        SMBHEN_W { w: self }
670    }
671    #[doc = "Bit 21 - SMBus Device Default address enable"]
672    #[inline(always)]
673    pub fn smbden(&mut self) -> SMBDEN_W {
674        SMBDEN_W { w: self }
675    }
676    #[doc = "Bit 22 - SMBUS alert enable"]
677    #[inline(always)]
678    pub fn alerten(&mut self) -> ALERTEN_W {
679        ALERTEN_W { w: self }
680    }
681    #[doc = "Bit 23 - PEC enable"]
682    #[inline(always)]
683    pub fn pecen(&mut self) -> PECEN_W {
684        PECEN_W { w: self }
685    }
686}