da14682_pac/
i2c.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.2, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:45:10 +0000
19
20#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"I2C registers"]
28unsafe impl ::core::marker::Send for super::I2C {}
29unsafe impl ::core::marker::Sync for super::I2C {}
30impl super::I2C {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "I2C ACK General Call Register"]
38    #[inline(always)]
39    pub const fn i2c_ack_general_call_reg(
40        &self,
41    ) -> &'static crate::common::Reg<self::I2CAckGeneralCallReg_SPEC, crate::common::RW> {
42        unsafe {
43            crate::common::Reg::<self::I2CAckGeneralCallReg_SPEC, crate::common::RW>::from_ptr(
44                self._svd2pac_as_ptr().add(152usize),
45            )
46        }
47    }
48
49    #[doc = "Clear ACTIVITY Interrupt Register"]
50    #[inline(always)]
51    pub const fn i2c_clr_activity_reg(
52        &self,
53    ) -> &'static crate::common::Reg<self::I2CClrActivityReg_SPEC, crate::common::RW> {
54        unsafe {
55            crate::common::Reg::<self::I2CClrActivityReg_SPEC, crate::common::RW>::from_ptr(
56                self._svd2pac_as_ptr().add(92usize),
57            )
58        }
59    }
60
61    #[doc = "Clear GEN_CALL Interrupt Register"]
62    #[inline(always)]
63    pub const fn i2c_clr_gen_call_reg(
64        &self,
65    ) -> &'static crate::common::Reg<self::I2CClrGenCallReg_SPEC, crate::common::RW> {
66        unsafe {
67            crate::common::Reg::<self::I2CClrGenCallReg_SPEC, crate::common::RW>::from_ptr(
68                self._svd2pac_as_ptr().add(104usize),
69            )
70        }
71    }
72
73    #[doc = "Clear Combined and Individual Interrupt Register"]
74    #[inline(always)]
75    pub const fn i2c_clr_intr_reg(
76        &self,
77    ) -> &'static crate::common::Reg<self::I2CClrIntrReg_SPEC, crate::common::RW> {
78        unsafe {
79            crate::common::Reg::<self::I2CClrIntrReg_SPEC, crate::common::RW>::from_ptr(
80                self._svd2pac_as_ptr().add(64usize),
81            )
82        }
83    }
84
85    #[doc = "Clear RD_REQ Interrupt Register"]
86    #[inline(always)]
87    pub const fn i2c_clr_rd_req_reg(
88        &self,
89    ) -> &'static crate::common::Reg<self::I2CClrRdReqReg_SPEC, crate::common::RW> {
90        unsafe {
91            crate::common::Reg::<self::I2CClrRdReqReg_SPEC, crate::common::RW>::from_ptr(
92                self._svd2pac_as_ptr().add(80usize),
93            )
94        }
95    }
96
97    #[doc = "Clear RX_DONE Interrupt Register"]
98    #[inline(always)]
99    pub const fn i2c_clr_rx_done_reg(
100        &self,
101    ) -> &'static crate::common::Reg<self::I2CClrRxDoneReg_SPEC, crate::common::RW> {
102        unsafe {
103            crate::common::Reg::<self::I2CClrRxDoneReg_SPEC, crate::common::RW>::from_ptr(
104                self._svd2pac_as_ptr().add(88usize),
105            )
106        }
107    }
108
109    #[doc = "Clear RX_OVER Interrupt Register"]
110    #[inline(always)]
111    pub const fn i2c_clr_rx_over_reg(
112        &self,
113    ) -> &'static crate::common::Reg<self::I2CClrRxOverReg_SPEC, crate::common::RW> {
114        unsafe {
115            crate::common::Reg::<self::I2CClrRxOverReg_SPEC, crate::common::RW>::from_ptr(
116                self._svd2pac_as_ptr().add(72usize),
117            )
118        }
119    }
120
121    #[doc = "Clear RX_UNDER Interrupt Register"]
122    #[inline(always)]
123    pub const fn i2c_clr_rx_under_reg(
124        &self,
125    ) -> &'static crate::common::Reg<self::I2CClrRxUnderReg_SPEC, crate::common::RW> {
126        unsafe {
127            crate::common::Reg::<self::I2CClrRxUnderReg_SPEC, crate::common::RW>::from_ptr(
128                self._svd2pac_as_ptr().add(68usize),
129            )
130        }
131    }
132
133    #[doc = "Clear START_DET Interrupt Register"]
134    #[inline(always)]
135    pub const fn i2c_clr_start_det_reg(
136        &self,
137    ) -> &'static crate::common::Reg<self::I2CClrStartDetReg_SPEC, crate::common::RW> {
138        unsafe {
139            crate::common::Reg::<self::I2CClrStartDetReg_SPEC, crate::common::RW>::from_ptr(
140                self._svd2pac_as_ptr().add(100usize),
141            )
142        }
143    }
144
145    #[doc = "Clear STOP_DET Interrupt Register"]
146    #[inline(always)]
147    pub const fn i2c_clr_stop_det_reg(
148        &self,
149    ) -> &'static crate::common::Reg<self::I2CClrStopDetReg_SPEC, crate::common::RW> {
150        unsafe {
151            crate::common::Reg::<self::I2CClrStopDetReg_SPEC, crate::common::RW>::from_ptr(
152                self._svd2pac_as_ptr().add(96usize),
153            )
154        }
155    }
156
157    #[doc = "Clear TX_ABRT Interrupt Register"]
158    #[inline(always)]
159    pub const fn i2c_clr_tx_abrt_reg(
160        &self,
161    ) -> &'static crate::common::Reg<self::I2CClrTxAbrtReg_SPEC, crate::common::RW> {
162        unsafe {
163            crate::common::Reg::<self::I2CClrTxAbrtReg_SPEC, crate::common::RW>::from_ptr(
164                self._svd2pac_as_ptr().add(84usize),
165            )
166        }
167    }
168
169    #[doc = "Clear TX_OVER Interrupt Register"]
170    #[inline(always)]
171    pub const fn i2c_clr_tx_over_reg(
172        &self,
173    ) -> &'static crate::common::Reg<self::I2CClrTxOverReg_SPEC, crate::common::RW> {
174        unsafe {
175            crate::common::Reg::<self::I2CClrTxOverReg_SPEC, crate::common::RW>::from_ptr(
176                self._svd2pac_as_ptr().add(76usize),
177            )
178        }
179    }
180
181    #[doc = "I2C Component2 Version Register"]
182    #[inline(always)]
183    pub const fn i2c_comp2_version(
184        &self,
185    ) -> &'static crate::common::Reg<self::I2CComp2Version_SPEC, crate::common::RW> {
186        unsafe {
187            crate::common::Reg::<self::I2CComp2Version_SPEC, crate::common::RW>::from_ptr(
188                self._svd2pac_as_ptr().add(250usize),
189            )
190        }
191    }
192
193    #[doc = "Component Parameter Register"]
194    #[inline(always)]
195    pub const fn i2c_comp_param1_reg(
196        &self,
197    ) -> &'static crate::common::Reg<self::I2CCompParam1Reg_SPEC, crate::common::RW> {
198        unsafe {
199            crate::common::Reg::<self::I2CCompParam1Reg_SPEC, crate::common::RW>::from_ptr(
200                self._svd2pac_as_ptr().add(244usize),
201            )
202        }
203    }
204
205    #[doc = "Component Parameter Register 2"]
206    #[inline(always)]
207    pub const fn i2c_comp_param2_reg(
208        &self,
209    ) -> &'static crate::common::Reg<self::I2CCompParam2Reg_SPEC, crate::common::RW> {
210        unsafe {
211            crate::common::Reg::<self::I2CCompParam2Reg_SPEC, crate::common::RW>::from_ptr(
212                self._svd2pac_as_ptr().add(246usize),
213            )
214        }
215    }
216
217    #[doc = "I2C Component2 Type Register"]
218    #[inline(always)]
219    pub const fn i2c_comp_type2_reg(
220        &self,
221    ) -> &'static crate::common::Reg<self::I2CCompType2Reg_SPEC, crate::common::RW> {
222        unsafe {
223            crate::common::Reg::<self::I2CCompType2Reg_SPEC, crate::common::RW>::from_ptr(
224                self._svd2pac_as_ptr().add(254usize),
225            )
226        }
227    }
228
229    #[doc = "I2C Component Type Register"]
230    #[inline(always)]
231    pub const fn i2c_comp_type_reg(
232        &self,
233    ) -> &'static crate::common::Reg<self::I2CCompTypeReg_SPEC, crate::common::RW> {
234        unsafe {
235            crate::common::Reg::<self::I2CCompTypeReg_SPEC, crate::common::RW>::from_ptr(
236                self._svd2pac_as_ptr().add(252usize),
237            )
238        }
239    }
240
241    #[doc = "I2C Component Version Register"]
242    #[inline(always)]
243    pub const fn i2c_comp_version_reg(
244        &self,
245    ) -> &'static crate::common::Reg<self::I2CCompVersionReg_SPEC, crate::common::RW> {
246        unsafe {
247            crate::common::Reg::<self::I2CCompVersionReg_SPEC, crate::common::RW>::from_ptr(
248                self._svd2pac_as_ptr().add(248usize),
249            )
250        }
251    }
252
253    #[doc = "I2C Control Register"]
254    #[inline(always)]
255    pub const fn i2c_con_reg(
256        &self,
257    ) -> &'static crate::common::Reg<self::I2CConReg_SPEC, crate::common::RW> {
258        unsafe {
259            crate::common::Reg::<self::I2CConReg_SPEC, crate::common::RW>::from_ptr(
260                self._svd2pac_as_ptr().add(0usize),
261            )
262        }
263    }
264
265    #[doc = "I2C Rx/Tx Data Buffer and Command Register"]
266    #[inline(always)]
267    pub const fn i2c_data_cmd_reg(
268        &self,
269    ) -> &'static crate::common::Reg<self::I2CDataCmdReg_SPEC, crate::common::RW> {
270        unsafe {
271            crate::common::Reg::<self::I2CDataCmdReg_SPEC, crate::common::RW>::from_ptr(
272                self._svd2pac_as_ptr().add(16usize),
273            )
274        }
275    }
276
277    #[doc = "DMA Control Register"]
278    #[inline(always)]
279    pub const fn i2c_dma_cr_reg(
280        &self,
281    ) -> &'static crate::common::Reg<self::I2CDmaCrReg_SPEC, crate::common::RW> {
282        unsafe {
283            crate::common::Reg::<self::I2CDmaCrReg_SPEC, crate::common::RW>::from_ptr(
284                self._svd2pac_as_ptr().add(136usize),
285            )
286        }
287    }
288
289    #[doc = "I2C Receive Data Level Register"]
290    #[inline(always)]
291    pub const fn i2c_dma_rdlr_reg(
292        &self,
293    ) -> &'static crate::common::Reg<self::I2CDmaRdlrReg_SPEC, crate::common::RW> {
294        unsafe {
295            crate::common::Reg::<self::I2CDmaRdlrReg_SPEC, crate::common::RW>::from_ptr(
296                self._svd2pac_as_ptr().add(144usize),
297            )
298        }
299    }
300
301    #[doc = "DMA Transmit Data Level Register"]
302    #[inline(always)]
303    pub const fn i2c_dma_tdlr_reg(
304        &self,
305    ) -> &'static crate::common::Reg<self::I2CDmaTdlrReg_SPEC, crate::common::RW> {
306        unsafe {
307            crate::common::Reg::<self::I2CDmaTdlrReg_SPEC, crate::common::RW>::from_ptr(
308                self._svd2pac_as_ptr().add(140usize),
309            )
310        }
311    }
312
313    #[doc = "I2C Enable Register"]
314    #[inline(always)]
315    pub const fn i2c_enable_reg(
316        &self,
317    ) -> &'static crate::common::Reg<self::I2CEnableReg_SPEC, crate::common::RW> {
318        unsafe {
319            crate::common::Reg::<self::I2CEnableReg_SPEC, crate::common::RW>::from_ptr(
320                self._svd2pac_as_ptr().add(108usize),
321            )
322        }
323    }
324
325    #[doc = "I2C Enable Status Register"]
326    #[inline(always)]
327    pub const fn i2c_enable_status_reg(
328        &self,
329    ) -> &'static crate::common::Reg<self::I2CEnableStatusReg_SPEC, crate::common::RW> {
330        unsafe {
331            crate::common::Reg::<self::I2CEnableStatusReg_SPEC, crate::common::RW>::from_ptr(
332                self._svd2pac_as_ptr().add(156usize),
333            )
334        }
335    }
336
337    #[doc = "Fast Speed I2C Clock SCL High Count Register"]
338    #[inline(always)]
339    pub const fn i2c_fs_scl_hcnt_reg(
340        &self,
341    ) -> &'static crate::common::Reg<self::I2CFsSclHcntReg_SPEC, crate::common::RW> {
342        unsafe {
343            crate::common::Reg::<self::I2CFsSclHcntReg_SPEC, crate::common::RW>::from_ptr(
344                self._svd2pac_as_ptr().add(28usize),
345            )
346        }
347    }
348
349    #[doc = "Fast Speed I2C Clock SCL Low Count Register"]
350    #[inline(always)]
351    pub const fn i2c_fs_scl_lcnt_reg(
352        &self,
353    ) -> &'static crate::common::Reg<self::I2CFsSclLcntReg_SPEC, crate::common::RW> {
354        unsafe {
355            crate::common::Reg::<self::I2CFsSclLcntReg_SPEC, crate::common::RW>::from_ptr(
356                self._svd2pac_as_ptr().add(32usize),
357            )
358        }
359    }
360
361    #[doc = "I2C SS and FS spike suppression limit Size"]
362    #[inline(always)]
363    pub const fn i2c_ic_fs_spklen_reg(
364        &self,
365    ) -> &'static crate::common::Reg<self::I2CIcFsSpklenReg_SPEC, crate::common::RW> {
366        unsafe {
367            crate::common::Reg::<self::I2CIcFsSpklenReg_SPEC, crate::common::RW>::from_ptr(
368                self._svd2pac_as_ptr().add(160usize),
369            )
370        }
371    }
372
373    #[doc = "I2C Interrupt Mask Register"]
374    #[inline(always)]
375    pub const fn i2c_intr_mask_reg(
376        &self,
377    ) -> &'static crate::common::Reg<self::I2CIntrMaskReg_SPEC, crate::common::RW> {
378        unsafe {
379            crate::common::Reg::<self::I2CIntrMaskReg_SPEC, crate::common::RW>::from_ptr(
380                self._svd2pac_as_ptr().add(48usize),
381            )
382        }
383    }
384
385    #[doc = "I2C Interrupt Status Register"]
386    #[inline(always)]
387    pub const fn i2c_intr_stat_reg(
388        &self,
389    ) -> &'static crate::common::Reg<self::I2CIntrStatReg_SPEC, crate::common::RW> {
390        unsafe {
391            crate::common::Reg::<self::I2CIntrStatReg_SPEC, crate::common::RW>::from_ptr(
392                self._svd2pac_as_ptr().add(44usize),
393            )
394        }
395    }
396
397    #[doc = "I2C Raw Interrupt Status Register"]
398    #[inline(always)]
399    pub const fn i2c_raw_intr_stat_reg(
400        &self,
401    ) -> &'static crate::common::Reg<self::I2CRawIntrStatReg_SPEC, crate::common::RW> {
402        unsafe {
403            crate::common::Reg::<self::I2CRawIntrStatReg_SPEC, crate::common::RW>::from_ptr(
404                self._svd2pac_as_ptr().add(52usize),
405            )
406        }
407    }
408
409    #[doc = "I2C Receive FIFO Level Register"]
410    #[inline(always)]
411    pub const fn i2c_rxflr_reg(
412        &self,
413    ) -> &'static crate::common::Reg<self::I2CRxflrReg_SPEC, crate::common::RW> {
414        unsafe {
415            crate::common::Reg::<self::I2CRxflrReg_SPEC, crate::common::RW>::from_ptr(
416                self._svd2pac_as_ptr().add(120usize),
417            )
418        }
419    }
420
421    #[doc = "I2C Receive FIFO Threshold Register"]
422    #[inline(always)]
423    pub const fn i2c_rx_tl_reg(
424        &self,
425    ) -> &'static crate::common::Reg<self::I2CRxTlReg_SPEC, crate::common::RW> {
426        unsafe {
427            crate::common::Reg::<self::I2CRxTlReg_SPEC, crate::common::RW>::from_ptr(
428                self._svd2pac_as_ptr().add(56usize),
429            )
430        }
431    }
432
433    #[doc = "I2C Slave Address Register"]
434    #[inline(always)]
435    pub const fn i2c_sar_reg(
436        &self,
437    ) -> &'static crate::common::Reg<self::I2CSarReg_SPEC, crate::common::RW> {
438        unsafe {
439            crate::common::Reg::<self::I2CSarReg_SPEC, crate::common::RW>::from_ptr(
440                self._svd2pac_as_ptr().add(8usize),
441            )
442        }
443    }
444
445    #[doc = "I2C SDA Hold Time Length Register"]
446    #[inline(always)]
447    pub const fn i2c_sda_hold_reg(
448        &self,
449    ) -> &'static crate::common::Reg<self::I2CSdaHoldReg_SPEC, crate::common::RW> {
450        unsafe {
451            crate::common::Reg::<self::I2CSdaHoldReg_SPEC, crate::common::RW>::from_ptr(
452                self._svd2pac_as_ptr().add(124usize),
453            )
454        }
455    }
456
457    #[doc = "I2C SDA Setup Register"]
458    #[inline(always)]
459    pub const fn i2c_sda_setup_reg(
460        &self,
461    ) -> &'static crate::common::Reg<self::I2CSdaSetupReg_SPEC, crate::common::RW> {
462        unsafe {
463            crate::common::Reg::<self::I2CSdaSetupReg_SPEC, crate::common::RW>::from_ptr(
464                self._svd2pac_as_ptr().add(148usize),
465            )
466        }
467    }
468
469    #[doc = "Standard Speed I2C Clock SCL High Count Register"]
470    #[inline(always)]
471    pub const fn i2c_ss_scl_hcnt_reg(
472        &self,
473    ) -> &'static crate::common::Reg<self::I2CSsSclHcntReg_SPEC, crate::common::RW> {
474        unsafe {
475            crate::common::Reg::<self::I2CSsSclHcntReg_SPEC, crate::common::RW>::from_ptr(
476                self._svd2pac_as_ptr().add(20usize),
477            )
478        }
479    }
480
481    #[doc = "Standard Speed I2C Clock SCL Low Count Register"]
482    #[inline(always)]
483    pub const fn i2c_ss_scl_lcnt_reg(
484        &self,
485    ) -> &'static crate::common::Reg<self::I2CSsSclLcntReg_SPEC, crate::common::RW> {
486        unsafe {
487            crate::common::Reg::<self::I2CSsSclLcntReg_SPEC, crate::common::RW>::from_ptr(
488                self._svd2pac_as_ptr().add(24usize),
489            )
490        }
491    }
492
493    #[doc = "I2C Status Register"]
494    #[inline(always)]
495    pub const fn i2c_status_reg(
496        &self,
497    ) -> &'static crate::common::Reg<self::I2CStatusReg_SPEC, crate::common::RW> {
498        unsafe {
499            crate::common::Reg::<self::I2CStatusReg_SPEC, crate::common::RW>::from_ptr(
500                self._svd2pac_as_ptr().add(112usize),
501            )
502        }
503    }
504
505    #[doc = "I2C Target Address Register"]
506    #[inline(always)]
507    pub const fn i2c_tar_reg(
508        &self,
509    ) -> &'static crate::common::Reg<self::I2CTarReg_SPEC, crate::common::RW> {
510        unsafe {
511            crate::common::Reg::<self::I2CTarReg_SPEC, crate::common::RW>::from_ptr(
512                self._svd2pac_as_ptr().add(4usize),
513            )
514        }
515    }
516
517    #[doc = "I2C Transmit FIFO Level Register"]
518    #[inline(always)]
519    pub const fn i2c_txflr_reg(
520        &self,
521    ) -> &'static crate::common::Reg<self::I2CTxflrReg_SPEC, crate::common::RW> {
522        unsafe {
523            crate::common::Reg::<self::I2CTxflrReg_SPEC, crate::common::RW>::from_ptr(
524                self._svd2pac_as_ptr().add(116usize),
525            )
526        }
527    }
528
529    #[doc = "I2C Transmit Abort Source Register"]
530    #[inline(always)]
531    pub const fn i2c_tx_abrt_source_reg(
532        &self,
533    ) -> &'static crate::common::Reg<self::I2CTxAbrtSourceReg_SPEC, crate::common::RW> {
534        unsafe {
535            crate::common::Reg::<self::I2CTxAbrtSourceReg_SPEC, crate::common::RW>::from_ptr(
536                self._svd2pac_as_ptr().add(128usize),
537            )
538        }
539    }
540
541    #[doc = "I2C Transmit FIFO Threshold Register"]
542    #[inline(always)]
543    pub const fn i2c_tx_tl_reg(
544        &self,
545    ) -> &'static crate::common::Reg<self::I2CTxTlReg_SPEC, crate::common::RW> {
546        unsafe {
547            crate::common::Reg::<self::I2CTxTlReg_SPEC, crate::common::RW>::from_ptr(
548                self._svd2pac_as_ptr().add(60usize),
549            )
550        }
551    }
552}
553#[doc(hidden)]
554#[derive(Copy, Clone, Eq, PartialEq)]
555pub struct I2CAckGeneralCallReg_SPEC;
556impl crate::sealed::RegSpec for I2CAckGeneralCallReg_SPEC {
557    type DataType = u16;
558}
559
560#[doc = "I2C ACK General Call Register"]
561pub type I2CAckGeneralCallReg = crate::RegValueT<I2CAckGeneralCallReg_SPEC>;
562
563impl I2CAckGeneralCallReg {
564    #[doc = "ACK General Call. When set to 1, I2C Ctrl responds with a ACK (by asserting ic_data_oe) when it receives a General Call. When set to 0, the controller does not generate General Call interrupts."]
565    #[inline(always)]
566    pub fn ack_gen_call(
567        self,
568    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CAckGeneralCallReg_SPEC, crate::common::RW>
569    {
570        crate::common::RegisterFieldBool::<0,1,0,I2CAckGeneralCallReg_SPEC,crate::common::RW>::from_register(self,0)
571    }
572}
573impl ::core::default::Default for I2CAckGeneralCallReg {
574    #[inline(always)]
575    fn default() -> I2CAckGeneralCallReg {
576        <crate::RegValueT<I2CAckGeneralCallReg_SPEC> as RegisterValue<_>>::new(0)
577    }
578}
579
580#[doc(hidden)]
581#[derive(Copy, Clone, Eq, PartialEq)]
582pub struct I2CClrActivityReg_SPEC;
583impl crate::sealed::RegSpec for I2CClrActivityReg_SPEC {
584    type DataType = u16;
585}
586
587#[doc = "Clear ACTIVITY Interrupt Register"]
588pub type I2CClrActivityReg = crate::RegValueT<I2CClrActivityReg_SPEC>;
589
590impl I2CClrActivityReg {
591    #[doc = "Reading this register clears the ACTIVITY interrupt if the I2C is not active anymore. If the I2C module is still active on the bus, the ACTIVITY interrupt bit continues to be set. It is automatically cleared by hardware if the module is disabled and if there is no further activity on the bus. The value read from this register to get status of the ACTIVITY interrupt (bit 8) of the IC_RAW_INTR_STAT register"]
592    #[inline(always)]
593    pub fn clr_activity(
594        self,
595    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrActivityReg_SPEC, crate::common::R> {
596        crate::common::RegisterFieldBool::<0,1,0,I2CClrActivityReg_SPEC,crate::common::R>::from_register(self,0)
597    }
598}
599impl ::core::default::Default for I2CClrActivityReg {
600    #[inline(always)]
601    fn default() -> I2CClrActivityReg {
602        <crate::RegValueT<I2CClrActivityReg_SPEC> as RegisterValue<_>>::new(0)
603    }
604}
605
606#[doc(hidden)]
607#[derive(Copy, Clone, Eq, PartialEq)]
608pub struct I2CClrGenCallReg_SPEC;
609impl crate::sealed::RegSpec for I2CClrGenCallReg_SPEC {
610    type DataType = u16;
611}
612
613#[doc = "Clear GEN_CALL Interrupt Register"]
614pub type I2CClrGenCallReg = crate::RegValueT<I2CClrGenCallReg_SPEC>;
615
616impl I2CClrGenCallReg {
617    #[doc = "Read this register to clear the GEN_CALL interrupt (bit 11) of\nI2C_RAW_INTR_STAT register."]
618    #[inline(always)]
619    pub fn clr_gen_call(
620        self,
621    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrGenCallReg_SPEC, crate::common::R> {
622        crate::common::RegisterFieldBool::<0,1,0,I2CClrGenCallReg_SPEC,crate::common::R>::from_register(self,0)
623    }
624}
625impl ::core::default::Default for I2CClrGenCallReg {
626    #[inline(always)]
627    fn default() -> I2CClrGenCallReg {
628        <crate::RegValueT<I2CClrGenCallReg_SPEC> as RegisterValue<_>>::new(0)
629    }
630}
631
632#[doc(hidden)]
633#[derive(Copy, Clone, Eq, PartialEq)]
634pub struct I2CClrIntrReg_SPEC;
635impl crate::sealed::RegSpec for I2CClrIntrReg_SPEC {
636    type DataType = u16;
637}
638
639#[doc = "Clear Combined and Individual Interrupt Register"]
640pub type I2CClrIntrReg = crate::RegValueT<I2CClrIntrReg_SPEC>;
641
642impl I2CClrIntrReg {
643    #[doc = "Read this register to clear the combined interrupt, all individual interrupts, and the I2C_TX_ABRT_SOURCE register. This bit does not clear hardware clearable interrupts but software clearable interrupts. Refer to Bit 9 of the I2C_TX_ABRT_SOURCE register for an exception to clearing I2C_TX_ABRT_SOURCE"]
644    #[inline(always)]
645    pub fn clr_intr(
646        self,
647    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrIntrReg_SPEC, crate::common::R> {
648        crate::common::RegisterFieldBool::<0,1,0,I2CClrIntrReg_SPEC,crate::common::R>::from_register(self,0)
649    }
650}
651impl ::core::default::Default for I2CClrIntrReg {
652    #[inline(always)]
653    fn default() -> I2CClrIntrReg {
654        <crate::RegValueT<I2CClrIntrReg_SPEC> as RegisterValue<_>>::new(0)
655    }
656}
657
658#[doc(hidden)]
659#[derive(Copy, Clone, Eq, PartialEq)]
660pub struct I2CClrRdReqReg_SPEC;
661impl crate::sealed::RegSpec for I2CClrRdReqReg_SPEC {
662    type DataType = u16;
663}
664
665#[doc = "Clear RD_REQ Interrupt Register"]
666pub type I2CClrRdReqReg = crate::RegValueT<I2CClrRdReqReg_SPEC>;
667
668impl I2CClrRdReqReg {
669    #[doc = "Read this register to clear the RD_REQ interrupt (bit 5) of the I2C_RAW_INTR_STAT register."]
670    #[inline(always)]
671    pub fn clr_rd_req(
672        self,
673    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrRdReqReg_SPEC, crate::common::R> {
674        crate::common::RegisterFieldBool::<0,1,0,I2CClrRdReqReg_SPEC,crate::common::R>::from_register(self,0)
675    }
676}
677impl ::core::default::Default for I2CClrRdReqReg {
678    #[inline(always)]
679    fn default() -> I2CClrRdReqReg {
680        <crate::RegValueT<I2CClrRdReqReg_SPEC> as RegisterValue<_>>::new(0)
681    }
682}
683
684#[doc(hidden)]
685#[derive(Copy, Clone, Eq, PartialEq)]
686pub struct I2CClrRxDoneReg_SPEC;
687impl crate::sealed::RegSpec for I2CClrRxDoneReg_SPEC {
688    type DataType = u16;
689}
690
691#[doc = "Clear RX_DONE Interrupt Register"]
692pub type I2CClrRxDoneReg = crate::RegValueT<I2CClrRxDoneReg_SPEC>;
693
694impl I2CClrRxDoneReg {
695    #[doc = "Read this register to clear the RX_DONE interrupt (bit 7) of the\nI2C_RAW_INTR_STAT register."]
696    #[inline(always)]
697    pub fn clr_rx_done(
698        self,
699    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrRxDoneReg_SPEC, crate::common::R> {
700        crate::common::RegisterFieldBool::<0,1,0,I2CClrRxDoneReg_SPEC,crate::common::R>::from_register(self,0)
701    }
702}
703impl ::core::default::Default for I2CClrRxDoneReg {
704    #[inline(always)]
705    fn default() -> I2CClrRxDoneReg {
706        <crate::RegValueT<I2CClrRxDoneReg_SPEC> as RegisterValue<_>>::new(0)
707    }
708}
709
710#[doc(hidden)]
711#[derive(Copy, Clone, Eq, PartialEq)]
712pub struct I2CClrRxOverReg_SPEC;
713impl crate::sealed::RegSpec for I2CClrRxOverReg_SPEC {
714    type DataType = u16;
715}
716
717#[doc = "Clear RX_OVER Interrupt Register"]
718pub type I2CClrRxOverReg = crate::RegValueT<I2CClrRxOverReg_SPEC>;
719
720impl I2CClrRxOverReg {
721    #[doc = "Read this register to clear the RX_OVER interrupt (bit 1) of the\nI2C_RAW_INTR_STAT register."]
722    #[inline(always)]
723    pub fn clr_rx_over(
724        self,
725    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrRxOverReg_SPEC, crate::common::R> {
726        crate::common::RegisterFieldBool::<0,1,0,I2CClrRxOverReg_SPEC,crate::common::R>::from_register(self,0)
727    }
728}
729impl ::core::default::Default for I2CClrRxOverReg {
730    #[inline(always)]
731    fn default() -> I2CClrRxOverReg {
732        <crate::RegValueT<I2CClrRxOverReg_SPEC> as RegisterValue<_>>::new(0)
733    }
734}
735
736#[doc(hidden)]
737#[derive(Copy, Clone, Eq, PartialEq)]
738pub struct I2CClrRxUnderReg_SPEC;
739impl crate::sealed::RegSpec for I2CClrRxUnderReg_SPEC {
740    type DataType = u16;
741}
742
743#[doc = "Clear RX_UNDER Interrupt Register"]
744pub type I2CClrRxUnderReg = crate::RegValueT<I2CClrRxUnderReg_SPEC>;
745
746impl I2CClrRxUnderReg {
747    #[doc = "Read this register to clear the RX_UNDER interrupt (bit 0) of the\nI2C_RAW_INTR_STAT register."]
748    #[inline(always)]
749    pub fn clr_rx_under(
750        self,
751    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrRxUnderReg_SPEC, crate::common::R> {
752        crate::common::RegisterFieldBool::<0,1,0,I2CClrRxUnderReg_SPEC,crate::common::R>::from_register(self,0)
753    }
754}
755impl ::core::default::Default for I2CClrRxUnderReg {
756    #[inline(always)]
757    fn default() -> I2CClrRxUnderReg {
758        <crate::RegValueT<I2CClrRxUnderReg_SPEC> as RegisterValue<_>>::new(0)
759    }
760}
761
762#[doc(hidden)]
763#[derive(Copy, Clone, Eq, PartialEq)]
764pub struct I2CClrStartDetReg_SPEC;
765impl crate::sealed::RegSpec for I2CClrStartDetReg_SPEC {
766    type DataType = u16;
767}
768
769#[doc = "Clear START_DET Interrupt Register"]
770pub type I2CClrStartDetReg = crate::RegValueT<I2CClrStartDetReg_SPEC>;
771
772impl I2CClrStartDetReg {
773    #[doc = "Read this register to clear the START_DET interrupt (bit 10) of the IC_RAW_INTR_STAT register."]
774    #[inline(always)]
775    pub fn clr_start_det(
776        self,
777    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrStartDetReg_SPEC, crate::common::R> {
778        crate::common::RegisterFieldBool::<0,1,0,I2CClrStartDetReg_SPEC,crate::common::R>::from_register(self,0)
779    }
780}
781impl ::core::default::Default for I2CClrStartDetReg {
782    #[inline(always)]
783    fn default() -> I2CClrStartDetReg {
784        <crate::RegValueT<I2CClrStartDetReg_SPEC> as RegisterValue<_>>::new(0)
785    }
786}
787
788#[doc(hidden)]
789#[derive(Copy, Clone, Eq, PartialEq)]
790pub struct I2CClrStopDetReg_SPEC;
791impl crate::sealed::RegSpec for I2CClrStopDetReg_SPEC {
792    type DataType = u16;
793}
794
795#[doc = "Clear STOP_DET Interrupt Register"]
796pub type I2CClrStopDetReg = crate::RegValueT<I2CClrStopDetReg_SPEC>;
797
798impl I2CClrStopDetReg {
799    #[doc = "Reading this register clears the ACTIVITY interrupt if the I2C is not active anymore. If the I2C module is still active on the bus, the ACTIVITY interrupt bit continues to be set. It is automatically cleared by hardware if the module is disabled and if there is no further activity on the bus. The value read from this register to get status of the ACTIVITY interrupt (bit 8) of the IC_RAW_INTR_STAT register."]
800    #[inline(always)]
801    pub fn clr_activity(
802        self,
803    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrStopDetReg_SPEC, crate::common::R> {
804        crate::common::RegisterFieldBool::<0,1,0,I2CClrStopDetReg_SPEC,crate::common::R>::from_register(self,0)
805    }
806}
807impl ::core::default::Default for I2CClrStopDetReg {
808    #[inline(always)]
809    fn default() -> I2CClrStopDetReg {
810        <crate::RegValueT<I2CClrStopDetReg_SPEC> as RegisterValue<_>>::new(0)
811    }
812}
813
814#[doc(hidden)]
815#[derive(Copy, Clone, Eq, PartialEq)]
816pub struct I2CClrTxAbrtReg_SPEC;
817impl crate::sealed::RegSpec for I2CClrTxAbrtReg_SPEC {
818    type DataType = u16;
819}
820
821#[doc = "Clear TX_ABRT Interrupt Register"]
822pub type I2CClrTxAbrtReg = crate::RegValueT<I2CClrTxAbrtReg_SPEC>;
823
824impl I2CClrTxAbrtReg {
825    #[doc = "Read this register to clear the TX_ABRT interrupt (bit 6) of the\nIC_RAW_INTR_STAT register, and the I2C_TX_ABRT_SOURCE register. This also releases the TX FIFO from the flushed/reset state, allowing more writes to the TX FIFO. Refer to Bit 9 of the I2C_TX_ABRT_SOURCE register for an exception to clearing IC_TX_ABRT_SOURCE."]
826    #[inline(always)]
827    pub fn clr_tx_abrt(
828        self,
829    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrTxAbrtReg_SPEC, crate::common::R> {
830        crate::common::RegisterFieldBool::<0,1,0,I2CClrTxAbrtReg_SPEC,crate::common::R>::from_register(self,0)
831    }
832}
833impl ::core::default::Default for I2CClrTxAbrtReg {
834    #[inline(always)]
835    fn default() -> I2CClrTxAbrtReg {
836        <crate::RegValueT<I2CClrTxAbrtReg_SPEC> as RegisterValue<_>>::new(0)
837    }
838}
839
840#[doc(hidden)]
841#[derive(Copy, Clone, Eq, PartialEq)]
842pub struct I2CClrTxOverReg_SPEC;
843impl crate::sealed::RegSpec for I2CClrTxOverReg_SPEC {
844    type DataType = u16;
845}
846
847#[doc = "Clear TX_OVER Interrupt Register"]
848pub type I2CClrTxOverReg = crate::RegValueT<I2CClrTxOverReg_SPEC>;
849
850impl I2CClrTxOverReg {
851    #[doc = "Read this register to clear the TX_OVER interrupt (bit 3) of the I2C_RAW_INTR_STAT register."]
852    #[inline(always)]
853    pub fn clr_tx_over(
854        self,
855    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrTxOverReg_SPEC, crate::common::R> {
856        crate::common::RegisterFieldBool::<0,1,0,I2CClrTxOverReg_SPEC,crate::common::R>::from_register(self,0)
857    }
858}
859impl ::core::default::Default for I2CClrTxOverReg {
860    #[inline(always)]
861    fn default() -> I2CClrTxOverReg {
862        <crate::RegValueT<I2CClrTxOverReg_SPEC> as RegisterValue<_>>::new(0)
863    }
864}
865
866#[doc(hidden)]
867#[derive(Copy, Clone, Eq, PartialEq)]
868pub struct I2CComp2Version_SPEC;
869impl crate::sealed::RegSpec for I2CComp2Version_SPEC {
870    type DataType = u16;
871}
872
873#[doc = "I2C Component2 Version Register"]
874pub type I2CComp2Version = crate::RegValueT<I2CComp2Version_SPEC>;
875
876impl I2CComp2Version {
877    #[inline(always)]
878    pub fn ic_comp2_version(
879        self,
880    ) -> crate::common::RegisterField<
881        0,
882        0xffff,
883        1,
884        0,
885        u16,
886        u16,
887        I2CComp2Version_SPEC,
888        crate::common::R,
889    > {
890        crate::common::RegisterField::<
891            0,
892            0xffff,
893            1,
894            0,
895            u16,
896            u16,
897            I2CComp2Version_SPEC,
898            crate::common::R,
899        >::from_register(self, 0)
900    }
901}
902impl ::core::default::Default for I2CComp2Version {
903    #[inline(always)]
904    fn default() -> I2CComp2Version {
905        <crate::RegValueT<I2CComp2Version_SPEC> as RegisterValue<_>>::new(12594)
906    }
907}
908
909#[doc(hidden)]
910#[derive(Copy, Clone, Eq, PartialEq)]
911pub struct I2CCompParam1Reg_SPEC;
912impl crate::sealed::RegSpec for I2CCompParam1Reg_SPEC {
913    type DataType = u16;
914}
915
916#[doc = "Component Parameter Register"]
917pub type I2CCompParam1Reg = crate::RegValueT<I2CCompParam1Reg_SPEC>;
918
919impl I2CCompParam1Reg {
920    #[inline(always)]
921    pub fn ic_comp_param1(
922        self,
923    ) -> crate::common::RegisterField<
924        0,
925        0xffff,
926        1,
927        0,
928        u16,
929        u16,
930        I2CCompParam1Reg_SPEC,
931        crate::common::R,
932    > {
933        crate::common::RegisterField::<
934            0,
935            0xffff,
936            1,
937            0,
938            u16,
939            u16,
940            I2CCompParam1Reg_SPEC,
941            crate::common::R,
942        >::from_register(self, 0)
943    }
944}
945impl ::core::default::Default for I2CCompParam1Reg {
946    #[inline(always)]
947    fn default() -> I2CCompParam1Reg {
948        <crate::RegValueT<I2CCompParam1Reg_SPEC> as RegisterValue<_>>::new(0)
949    }
950}
951
952#[doc(hidden)]
953#[derive(Copy, Clone, Eq, PartialEq)]
954pub struct I2CCompParam2Reg_SPEC;
955impl crate::sealed::RegSpec for I2CCompParam2Reg_SPEC {
956    type DataType = u16;
957}
958
959#[doc = "Component Parameter Register 2"]
960pub type I2CCompParam2Reg = crate::RegValueT<I2CCompParam2Reg_SPEC>;
961
962impl I2CCompParam2Reg {
963    #[inline(always)]
964    pub fn ic_comp_param2(
965        self,
966    ) -> crate::common::RegisterField<
967        0,
968        0xffff,
969        1,
970        0,
971        u16,
972        u16,
973        I2CCompParam2Reg_SPEC,
974        crate::common::R,
975    > {
976        crate::common::RegisterField::<
977            0,
978            0xffff,
979            1,
980            0,
981            u16,
982            u16,
983            I2CCompParam2Reg_SPEC,
984            crate::common::R,
985        >::from_register(self, 0)
986    }
987}
988impl ::core::default::Default for I2CCompParam2Reg {
989    #[inline(always)]
990    fn default() -> I2CCompParam2Reg {
991        <crate::RegValueT<I2CCompParam2Reg_SPEC> as RegisterValue<_>>::new(0)
992    }
993}
994
995#[doc(hidden)]
996#[derive(Copy, Clone, Eq, PartialEq)]
997pub struct I2CCompType2Reg_SPEC;
998impl crate::sealed::RegSpec for I2CCompType2Reg_SPEC {
999    type DataType = u16;
1000}
1001
1002#[doc = "I2C Component2 Type Register"]
1003pub type I2CCompType2Reg = crate::RegValueT<I2CCompType2Reg_SPEC>;
1004
1005impl I2CCompType2Reg {
1006    #[inline(always)]
1007    pub fn ic_comp2_type(
1008        self,
1009    ) -> crate::common::RegisterField<
1010        0,
1011        0xffff,
1012        1,
1013        0,
1014        u16,
1015        u16,
1016        I2CCompType2Reg_SPEC,
1017        crate::common::R,
1018    > {
1019        crate::common::RegisterField::<
1020            0,
1021            0xffff,
1022            1,
1023            0,
1024            u16,
1025            u16,
1026            I2CCompType2Reg_SPEC,
1027            crate::common::R,
1028        >::from_register(self, 0)
1029    }
1030}
1031impl ::core::default::Default for I2CCompType2Reg {
1032    #[inline(always)]
1033    fn default() -> I2CCompType2Reg {
1034        <crate::RegValueT<I2CCompType2Reg_SPEC> as RegisterValue<_>>::new(17495)
1035    }
1036}
1037
1038#[doc(hidden)]
1039#[derive(Copy, Clone, Eq, PartialEq)]
1040pub struct I2CCompTypeReg_SPEC;
1041impl crate::sealed::RegSpec for I2CCompTypeReg_SPEC {
1042    type DataType = u16;
1043}
1044
1045#[doc = "I2C Component Type Register"]
1046pub type I2CCompTypeReg = crate::RegValueT<I2CCompTypeReg_SPEC>;
1047
1048impl I2CCompTypeReg {
1049    #[inline(always)]
1050    pub fn ic_comp_type(
1051        self,
1052    ) -> crate::common::RegisterField<
1053        0,
1054        0xffff,
1055        1,
1056        0,
1057        u16,
1058        u16,
1059        I2CCompTypeReg_SPEC,
1060        crate::common::R,
1061    > {
1062        crate::common::RegisterField::<
1063            0,
1064            0xffff,
1065            1,
1066            0,
1067            u16,
1068            u16,
1069            I2CCompTypeReg_SPEC,
1070            crate::common::R,
1071        >::from_register(self, 0)
1072    }
1073}
1074impl ::core::default::Default for I2CCompTypeReg {
1075    #[inline(always)]
1076    fn default() -> I2CCompTypeReg {
1077        <crate::RegValueT<I2CCompTypeReg_SPEC> as RegisterValue<_>>::new(320)
1078    }
1079}
1080
1081#[doc(hidden)]
1082#[derive(Copy, Clone, Eq, PartialEq)]
1083pub struct I2CCompVersionReg_SPEC;
1084impl crate::sealed::RegSpec for I2CCompVersionReg_SPEC {
1085    type DataType = u16;
1086}
1087
1088#[doc = "I2C Component Version Register"]
1089pub type I2CCompVersionReg = crate::RegValueT<I2CCompVersionReg_SPEC>;
1090
1091impl I2CCompVersionReg {
1092    #[inline(always)]
1093    pub fn ic_comp_version(
1094        self,
1095    ) -> crate::common::RegisterField<
1096        0,
1097        0xffff,
1098        1,
1099        0,
1100        u16,
1101        u16,
1102        I2CCompVersionReg_SPEC,
1103        crate::common::R,
1104    > {
1105        crate::common::RegisterField::<
1106            0,
1107            0xffff,
1108            1,
1109            0,
1110            u16,
1111            u16,
1112            I2CCompVersionReg_SPEC,
1113            crate::common::R,
1114        >::from_register(self, 0)
1115    }
1116}
1117impl ::core::default::Default for I2CCompVersionReg {
1118    #[inline(always)]
1119    fn default() -> I2CCompVersionReg {
1120        <crate::RegValueT<I2CCompVersionReg_SPEC> as RegisterValue<_>>::new(12330)
1121    }
1122}
1123
1124#[doc(hidden)]
1125#[derive(Copy, Clone, Eq, PartialEq)]
1126pub struct I2CConReg_SPEC;
1127impl crate::sealed::RegSpec for I2CConReg_SPEC {
1128    type DataType = u16;
1129}
1130
1131#[doc = "I2C Control Register"]
1132pub type I2CConReg = crate::RegValueT<I2CConReg_SPEC>;
1133
1134impl I2CConReg {
1135    #[doc = "Slave enabled or disabled after reset is applied, which means software does not have to configure the slave.\n0=slave is enabled\n1=slave is disabled\nSoftware should ensure that if this bit is written with \'0\', then bit 0 should also be written with a \'0\'."]
1136    #[inline(always)]
1137    pub fn i2c_slave_disable(
1138        self,
1139    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1140        crate::common::RegisterFieldBool::<6,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1141    }
1142
1143    #[doc = "Determines whether RESTART conditions may be sent when acting as a master\n0= disable\n1=enable"]
1144    #[inline(always)]
1145    pub fn i2c_restart_en(
1146        self,
1147    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1148        crate::common::RegisterFieldBool::<5,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1149    }
1150
1151    #[doc = "Controls whether the controller starts its transfers in 7- or 10-bit addressing mode when acting as a master.\n0= 7-bit addressing\n1= 10-bit addressing"]
1152    #[inline(always)]
1153    pub fn i2c_10bitaddr_master(
1154        self,
1155    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1156        crate::common::RegisterFieldBool::<4,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1157    }
1158
1159    #[doc = "When acting as a slave, this bit controls whether the controller responds to 7- or 10-bit addresses.\n0= 7-bit addressing\n1= 10-bit addressing"]
1160    #[inline(always)]
1161    pub fn i2c_10bitaddr_slave(
1162        self,
1163    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1164        crate::common::RegisterFieldBool::<3,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1165    }
1166
1167    #[doc = "These bits control at which speed the controller operates.\n1= standard mode (100 kbit/s)\n2= fast mode (400 kbit/s)"]
1168    #[inline(always)]
1169    pub fn i2c_speed(
1170        self,
1171    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, I2CConReg_SPEC, crate::common::RW> {
1172        crate::common::RegisterField::<1,0x3,1,0,u8,u8,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1173    }
1174
1175    #[doc = "This bit controls whether the controller master is enabled.\n0= master disabled\n1= master enabled\nSoftware should ensure that if this bit is written with \'1\' then bit 6 should also be written with a \'1\'."]
1176    #[inline(always)]
1177    pub fn i2c_master_mode(
1178        self,
1179    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1180        crate::common::RegisterFieldBool::<0,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1181    }
1182}
1183impl ::core::default::Default for I2CConReg {
1184    #[inline(always)]
1185    fn default() -> I2CConReg {
1186        <crate::RegValueT<I2CConReg_SPEC> as RegisterValue<_>>::new(125)
1187    }
1188}
1189
1190#[doc(hidden)]
1191#[derive(Copy, Clone, Eq, PartialEq)]
1192pub struct I2CDataCmdReg_SPEC;
1193impl crate::sealed::RegSpec for I2CDataCmdReg_SPEC {
1194    type DataType = u16;
1195}
1196
1197#[doc = "I2C Rx/Tx Data Buffer and Command Register"]
1198pub type I2CDataCmdReg = crate::RegValueT<I2CDataCmdReg_SPEC>;
1199
1200impl I2CDataCmdReg {
1201    #[doc = "This bit controls whether a RESTART is issued before the byte is sent or received. When 1, If IC_RESTART_EN is 1, a RESTART is issued before the data is sent/received (according to the value of CMD), regardless of whether or not the transfer direction is changing from the previous command; if IC_RESTART_EN is 0, a STOP followed by a START is issued instead. When 0 If IC_RESTART_EN is 1, a RESTART is issued only if the transfer direction is changing from the previous command; if IC_RESTART_EN is 0, a STOP followed by a START is issued instead. Reset value: 0x0"]
1202    #[inline(always)]
1203    pub fn restart(
1204        self,
1205    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CDataCmdReg_SPEC, crate::common::W> {
1206        crate::common::RegisterFieldBool::<10,1,0,I2CDataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1207    }
1208
1209    #[doc = "This bit controls whether a STOP is issued after the byte is sent or received. When 1 STOP is issued after this byte, regardless of whether or not the Tx FIFO is empty. If the Tx FIFO is not empty, the master immediately tries to start a new transfer by issuing a START and arbitrating for the bus. When 0 STOP is not issued after this byte, regardless of whether or not the Tx FIFO is empty. If the Tx FIFO is not empty, the master continues the current transfer by sending/receiving data bytes according to the value of the CMD bit. If the Tx FIFO is empty, the master holds the SCL line low and stalls the bus until a new command is available in the Tx FIFO. Reset value: 0x0"]
1210    #[inline(always)]
1211    pub fn stop(
1212        self,
1213    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CDataCmdReg_SPEC, crate::common::W> {
1214        crate::common::RegisterFieldBool::<9,1,0,I2CDataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1215    }
1216
1217    #[doc = "This bit controls whether a read or a write is performed. This bit does not control the direction when the I2C Ctrl acts as a slave. It controls only the direction when it acts as a master.\n1 = Read\n0 = Write\nWhen a command is entered in the TX FIFO, this bit distinguishes the write and read commands. In slave-receiver mode, this bit is a \"don\'t care\" because writes to this register are not required. In slave-transmitter mode, a \"0\" indicates that CPU data is to be transmitted and as DAT or IC_DATA_CMD\\[7:0\\]. When programming this bit, you should remember the following: attempting to perform a read operation after a General Call command has been sent results in a TX_ABRT interrupt (bit 6 of the I2C_RAW_INTR_STAT_REG), unless bit 11 (SPECIAL) in the I2C_TAR register has been cleared.\nIf a \"1\" is written to this bit after receiving a RD_REQ interrupt, then a TX_ABRT interrupt occurs.\nNOTE: It is possible that while attempting a master I2C read transfer on the controller, a RD_REQ interrupt may have occurred simultaneously due to a remote I2C master addressing the controller. In this type of scenario, it ignores the I2C_DATA_CMD write, generates a TX_ABRT interrupt, and waits to service the RD_REQ interrupt"]
1218    #[inline(always)]
1219    pub fn cmd(
1220        self,
1221    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CDataCmdReg_SPEC, crate::common::W> {
1222        crate::common::RegisterFieldBool::<8,1,0,I2CDataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1223    }
1224
1225    #[doc = "This register contains the data to be transmitted or received on the I2C bus. If you are writing to this register and want to perform a read, bits 7:0 (DAT) are ignored by the controller. However, when you read this register, these bits return the value of data received on the controller\'s interface."]
1226    #[inline(always)]
1227    pub fn dat(
1228        self,
1229    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2CDataCmdReg_SPEC, crate::common::RW>
1230    {
1231        crate::common::RegisterField::<0,0xff,1,0,u8,u8,I2CDataCmdReg_SPEC,crate::common::RW>::from_register(self,0)
1232    }
1233}
1234impl ::core::default::Default for I2CDataCmdReg {
1235    #[inline(always)]
1236    fn default() -> I2CDataCmdReg {
1237        <crate::RegValueT<I2CDataCmdReg_SPEC> as RegisterValue<_>>::new(0)
1238    }
1239}
1240
1241#[doc(hidden)]
1242#[derive(Copy, Clone, Eq, PartialEq)]
1243pub struct I2CDmaCrReg_SPEC;
1244impl crate::sealed::RegSpec for I2CDmaCrReg_SPEC {
1245    type DataType = u16;
1246}
1247
1248#[doc = "DMA Control Register"]
1249pub type I2CDmaCrReg = crate::RegValueT<I2CDmaCrReg_SPEC>;
1250
1251impl I2CDmaCrReg {
1252    #[doc = "Transmit DMA Enable. This bit enables/disables the transmit FIFO DMA channel. 0 = Transmit DMA disabled 1 = Transmit DMA enabled"]
1253    #[inline(always)]
1254    pub fn tdmae(
1255        self,
1256    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CDmaCrReg_SPEC, crate::common::RW> {
1257        crate::common::RegisterFieldBool::<1,1,0,I2CDmaCrReg_SPEC,crate::common::RW>::from_register(self,0)
1258    }
1259
1260    #[doc = "Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel. 0 = Receive DMA disabled 1 = Receive DMA enabled"]
1261    #[inline(always)]
1262    pub fn rdmae(
1263        self,
1264    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CDmaCrReg_SPEC, crate::common::RW> {
1265        crate::common::RegisterFieldBool::<0,1,0,I2CDmaCrReg_SPEC,crate::common::RW>::from_register(self,0)
1266    }
1267}
1268impl ::core::default::Default for I2CDmaCrReg {
1269    #[inline(always)]
1270    fn default() -> I2CDmaCrReg {
1271        <crate::RegValueT<I2CDmaCrReg_SPEC> as RegisterValue<_>>::new(0)
1272    }
1273}
1274
1275#[doc(hidden)]
1276#[derive(Copy, Clone, Eq, PartialEq)]
1277pub struct I2CDmaRdlrReg_SPEC;
1278impl crate::sealed::RegSpec for I2CDmaRdlrReg_SPEC {
1279    type DataType = u16;
1280}
1281
1282#[doc = "I2C Receive Data Level Register"]
1283pub type I2CDmaRdlrReg = crate::RegValueT<I2CDmaRdlrReg_SPEC>;
1284
1285impl I2CDmaRdlrReg {
1286    #[doc = "Receive Data Level. This bit field controls the level at which a DMA request is made by the receive logic. The watermark level = DMARDL+1; that is, dma_rx_req is generated when the number of valid data entries in the receive FIFO is equal to or more than this field value + 1, and RDMAE =1. For instance, when DMARDL is 0, then dma_rx_req is asserted when 1 or more data entries are present in the receive FIFO."]
1287    #[inline(always)]
1288    pub fn dmardl(
1289        self,
1290    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2CDmaRdlrReg_SPEC, crate::common::RW>
1291    {
1292        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2CDmaRdlrReg_SPEC,crate::common::RW>::from_register(self,0)
1293    }
1294}
1295impl ::core::default::Default for I2CDmaRdlrReg {
1296    #[inline(always)]
1297    fn default() -> I2CDmaRdlrReg {
1298        <crate::RegValueT<I2CDmaRdlrReg_SPEC> as RegisterValue<_>>::new(0)
1299    }
1300}
1301
1302#[doc(hidden)]
1303#[derive(Copy, Clone, Eq, PartialEq)]
1304pub struct I2CDmaTdlrReg_SPEC;
1305impl crate::sealed::RegSpec for I2CDmaTdlrReg_SPEC {
1306    type DataType = u16;
1307}
1308
1309#[doc = "DMA Transmit Data Level Register"]
1310pub type I2CDmaTdlrReg = crate::RegValueT<I2CDmaTdlrReg_SPEC>;
1311
1312impl I2CDmaTdlrReg {
1313    #[doc = "Transmit Data Level. This bit field controls the level at which a DMA request is made by the transmit logic. It is equal to the watermark level; that is, the dma_tx_req signal is generated when the number of valid data entries in the transmit FIFO is equal to or below this field value, and TDMAE = 1."]
1314    #[inline(always)]
1315    pub fn dmatdl(
1316        self,
1317    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2CDmaTdlrReg_SPEC, crate::common::RW>
1318    {
1319        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2CDmaTdlrReg_SPEC,crate::common::RW>::from_register(self,0)
1320    }
1321}
1322impl ::core::default::Default for I2CDmaTdlrReg {
1323    #[inline(always)]
1324    fn default() -> I2CDmaTdlrReg {
1325        <crate::RegValueT<I2CDmaTdlrReg_SPEC> as RegisterValue<_>>::new(0)
1326    }
1327}
1328
1329#[doc(hidden)]
1330#[derive(Copy, Clone, Eq, PartialEq)]
1331pub struct I2CEnableReg_SPEC;
1332impl crate::sealed::RegSpec for I2CEnableReg_SPEC {
1333    type DataType = u16;
1334}
1335
1336#[doc = "I2C Enable Register"]
1337pub type I2CEnableReg = crate::RegValueT<I2CEnableReg_SPEC>;
1338
1339impl I2CEnableReg {
1340    #[doc = "0= ABORT not initiated or ABORT done\n1= ABORT operation in progress\nThe software can abort the I2C transfer in master mode by setting this bit. The software can set this bit only when ENABLE is already set; otherwise, the controller ignores any write to ABORT bit. The software cannot clear the ABORT bit once set. In response to\nan ABORT, the controller issues a STOP and flushes the Tx FIFO after completing the current transfer, then sets the TX_ABORT interrupt after the abort operation. The ABORT bit is cleared automatically after the abort operation."]
1341    #[inline(always)]
1342    pub fn i2c_abort(
1343        self,
1344    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CEnableReg_SPEC, crate::common::RW> {
1345        crate::common::RegisterFieldBool::<1,1,0,I2CEnableReg_SPEC,crate::common::RW>::from_register(self,0)
1346    }
1347
1348    #[doc = "Controls whether the controller is enabled.\n0: Disables the controller (TX and RX FIFOs are held in an erased state)\n1: Enables the controller\nSoftware can disable the controller while it is active. However, it is important that care be taken to ensure that the controller is disabled properly. When the controller is disabled, the following occurs:\n* The TX FIFO and RX FIFO get flushed.\n* Status bits in the IC_INTR_STAT register are still active until the controller goes into IDLE state.\nIf the module is transmitting, it stops as well as deletes the contents of the transmit buffer after the current transfer is complete. If the module is receiving, the controller stops the current transfer at the end of the current byte and does not acknowledge the transfer.\nThere is a two ic_clk delay when enabling or disabling the controller"]
1349    #[inline(always)]
1350    pub fn ctrl_enable(
1351        self,
1352    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CEnableReg_SPEC, crate::common::RW> {
1353        crate::common::RegisterFieldBool::<0,1,0,I2CEnableReg_SPEC,crate::common::RW>::from_register(self,0)
1354    }
1355}
1356impl ::core::default::Default for I2CEnableReg {
1357    #[inline(always)]
1358    fn default() -> I2CEnableReg {
1359        <crate::RegValueT<I2CEnableReg_SPEC> as RegisterValue<_>>::new(0)
1360    }
1361}
1362
1363#[doc(hidden)]
1364#[derive(Copy, Clone, Eq, PartialEq)]
1365pub struct I2CEnableStatusReg_SPEC;
1366impl crate::sealed::RegSpec for I2CEnableStatusReg_SPEC {
1367    type DataType = u16;
1368}
1369
1370#[doc = "I2C Enable Status Register"]
1371pub type I2CEnableStatusReg = crate::RegValueT<I2CEnableStatusReg_SPEC>;
1372
1373impl I2CEnableStatusReg {
1374    #[doc = "Slave Received Data Lost. This bit indicates if a Slave-Receiver\noperation has been aborted with at least one data byte received from an I2C transfer due to the setting of IC_ENABLE from 1 to 0. When read as 1, the controller is deemed to have been actively engaged in an aborted I2C transfer (with matching address) and the data phase of the I2C transfer has been entered, even though a data byte has been responded with a NACK. NOTE: If the remote I2C master terminates the transfer with a STOP condition before the controller has a chance to NACK a transfer, and IC_ENABLE has been set to 0, then this bit is also set to 1.\nWhen read as 0, the controller is deemed to have been disabled without being actively involved in the data phase of a Slave-Receiver transfer.\nNOTE: The CPU can safely read this bit when IC_EN (bit 0) is read as 0."]
1375    #[inline(always)]
1376    pub fn slv_rx_data_lost(
1377        self,
1378    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CEnableStatusReg_SPEC, crate::common::R> {
1379        crate::common::RegisterFieldBool::<2,1,0,I2CEnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1380    }
1381
1382    #[doc = "Slave Disabled While Busy (Transmit, Receive). This bit indicates if a potential or active Slave operation has been aborted due to the setting of the IC_ENABLE register from 1 to 0. This bit is set when the CPU writes a 0 to the IC_ENABLE register while:\n(a) I2C Ctrl is receiving the address byte of the Slave-Transmitter operation from a remote master; OR,\n(b) address and data bytes of the Slave-Receiver operation from a remote master. When read as 1, the controller is deemed to have forced a NACK during any part of an I2C transfer, irrespective of whether the I2C address matches the slave address set in I2C Ctrl (IC_SAR register) OR if the transfer is completed before IC_ENABLE is set to 0 but has not taken effect.\nNOTE: If the remote I2C master terminates the transfer with a STOP condition before the the controller has a chance to NACK a transfer, and IC_ENABLE has been set to 0, then this bit will also be set to 1.\nWhen read as 0, the controller is deemed to have been disabled when there is master activity, or when the I2C bus is idle.\nNOTE: The CPU can safely read this bit when IC_EN (bit 0) is read as 0."]
1383    #[inline(always)]
1384    pub fn slv_disabled_while_busy(
1385        self,
1386    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CEnableStatusReg_SPEC, crate::common::R> {
1387        crate::common::RegisterFieldBool::<1,1,0,I2CEnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1388    }
1389
1390    #[doc = "ic_en Status. This bit always reflects the value driven on the output port ic_en. When read as 1, the controller is deemed to be in an enabled state.\nWhen read as 0, the controller is deemed completely inactive.\nNOTE: The CPU can safely read this bit anytime. When this bit is read as 0, the CPU can safely read SLV_RX_DATA_LOST (bit 2) and SLV_DISABLED_WHILE_BUSY (bit 1)."]
1391    #[inline(always)]
1392    pub fn ic_en(
1393        self,
1394    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CEnableStatusReg_SPEC, crate::common::R> {
1395        crate::common::RegisterFieldBool::<0,1,0,I2CEnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1396    }
1397}
1398impl ::core::default::Default for I2CEnableStatusReg {
1399    #[inline(always)]
1400    fn default() -> I2CEnableStatusReg {
1401        <crate::RegValueT<I2CEnableStatusReg_SPEC> as RegisterValue<_>>::new(0)
1402    }
1403}
1404
1405#[doc(hidden)]
1406#[derive(Copy, Clone, Eq, PartialEq)]
1407pub struct I2CFsSclHcntReg_SPEC;
1408impl crate::sealed::RegSpec for I2CFsSclHcntReg_SPEC {
1409    type DataType = u16;
1410}
1411
1412#[doc = "Fast Speed I2C Clock SCL High Count Register"]
1413pub type I2CFsSclHcntReg = crate::RegValueT<I2CFsSclHcntReg_SPEC>;
1414
1415impl I2CFsSclHcntReg {
1416    #[doc = "This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock high-period count for fast speed. It is used in high-speed mode to send the Master Code and START BYTE or General CALL. This register can be written only when the I2C interface is disabled, which corresponds to the I2C_ENABLE register being set to 0. Writes at other times have no effect.\nThe minimum valid value is 6; hardware prevents values less than this being written, and if attempted results in 6 being set."]
1417    #[inline(always)]
1418    pub fn ic_fs_scl_hcnt(
1419        self,
1420    ) -> crate::common::RegisterField<
1421        0,
1422        0xffff,
1423        1,
1424        0,
1425        u16,
1426        u16,
1427        I2CFsSclHcntReg_SPEC,
1428        crate::common::RW,
1429    > {
1430        crate::common::RegisterField::<
1431            0,
1432            0xffff,
1433            1,
1434            0,
1435            u16,
1436            u16,
1437            I2CFsSclHcntReg_SPEC,
1438            crate::common::RW,
1439        >::from_register(self, 0)
1440    }
1441}
1442impl ::core::default::Default for I2CFsSclHcntReg {
1443    #[inline(always)]
1444    fn default() -> I2CFsSclHcntReg {
1445        <crate::RegValueT<I2CFsSclHcntReg_SPEC> as RegisterValue<_>>::new(8)
1446    }
1447}
1448
1449#[doc(hidden)]
1450#[derive(Copy, Clone, Eq, PartialEq)]
1451pub struct I2CFsSclLcntReg_SPEC;
1452impl crate::sealed::RegSpec for I2CFsSclLcntReg_SPEC {
1453    type DataType = u16;
1454}
1455
1456#[doc = "Fast Speed I2C Clock SCL Low Count Register"]
1457pub type I2CFsSclLcntReg = crate::RegValueT<I2CFsSclLcntReg_SPEC>;
1458
1459impl I2CFsSclLcntReg {
1460    #[doc = "This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock low-period count for fast speed. It is used in high-speed mode to send the Master Code and START BYTE or General CALL. This register can be written only when the I2C interface is disabled, which corresponds to the I2C_ENABLE register being set to 0. Writes at other times have no effect.\nThe minimum valid value is 8; hardware prevents values less than this being written, and if attempted results in 8 being set."]
1461    #[inline(always)]
1462    pub fn ic_fs_scl_lcnt(
1463        self,
1464    ) -> crate::common::RegisterField<
1465        0,
1466        0xffff,
1467        1,
1468        0,
1469        u16,
1470        u16,
1471        I2CFsSclLcntReg_SPEC,
1472        crate::common::RW,
1473    > {
1474        crate::common::RegisterField::<
1475            0,
1476            0xffff,
1477            1,
1478            0,
1479            u16,
1480            u16,
1481            I2CFsSclLcntReg_SPEC,
1482            crate::common::RW,
1483        >::from_register(self, 0)
1484    }
1485}
1486impl ::core::default::Default for I2CFsSclLcntReg {
1487    #[inline(always)]
1488    fn default() -> I2CFsSclLcntReg {
1489        <crate::RegValueT<I2CFsSclLcntReg_SPEC> as RegisterValue<_>>::new(23)
1490    }
1491}
1492
1493#[doc(hidden)]
1494#[derive(Copy, Clone, Eq, PartialEq)]
1495pub struct I2CIcFsSpklenReg_SPEC;
1496impl crate::sealed::RegSpec for I2CIcFsSpklenReg_SPEC {
1497    type DataType = u16;
1498}
1499
1500#[doc = "I2C SS and FS spike suppression limit Size"]
1501pub type I2CIcFsSpklenReg = crate::RegValueT<I2CIcFsSpklenReg_SPEC>;
1502
1503impl I2CIcFsSpklenReg {
1504    #[doc = "This register must be set before any I2C bus transaction can take place to ensure stable operation. This register sets the duration, measured in ic_clk cycles, of the longest spike in the SCL or SDA lines that will be filtered out by the spike suppression logic. This register can be written only when the I2C interface is disabled which corresponds to the IC_ENABLE register being set to 0. Writes at other times have no effect. The minimum valid value is 1; hardware prevents values less than this being written, and if attempted results in 1 being set."]
1505    #[inline(always)]
1506    pub fn ic_fs_spklen(
1507        self,
1508    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2CIcFsSpklenReg_SPEC, crate::common::RW>
1509    {
1510        crate::common::RegisterField::<
1511            0,
1512            0xff,
1513            1,
1514            0,
1515            u8,
1516            u8,
1517            I2CIcFsSpklenReg_SPEC,
1518            crate::common::RW,
1519        >::from_register(self, 0)
1520    }
1521}
1522impl ::core::default::Default for I2CIcFsSpklenReg {
1523    #[inline(always)]
1524    fn default() -> I2CIcFsSpklenReg {
1525        <crate::RegValueT<I2CIcFsSpklenReg_SPEC> as RegisterValue<_>>::new(1)
1526    }
1527}
1528
1529#[doc(hidden)]
1530#[derive(Copy, Clone, Eq, PartialEq)]
1531pub struct I2CIntrMaskReg_SPEC;
1532impl crate::sealed::RegSpec for I2CIntrMaskReg_SPEC {
1533    type DataType = u16;
1534}
1535
1536#[doc = "I2C Interrupt Mask Register"]
1537pub type I2CIntrMaskReg = crate::RegValueT<I2CIntrMaskReg_SPEC>;
1538
1539impl I2CIntrMaskReg {
1540    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1541    #[inline(always)]
1542    pub fn m_gen_call(
1543        self,
1544    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1545        crate::common::RegisterFieldBool::<11,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1546    }
1547
1548    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1549    #[inline(always)]
1550    pub fn m_start_det(
1551        self,
1552    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1553        crate::common::RegisterFieldBool::<10,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1554    }
1555
1556    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1557    #[inline(always)]
1558    pub fn m_stop_det(
1559        self,
1560    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1561        crate::common::RegisterFieldBool::<9,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1562    }
1563
1564    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1565    #[inline(always)]
1566    pub fn m_activity(
1567        self,
1568    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1569        crate::common::RegisterFieldBool::<8,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1570    }
1571
1572    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1573    #[inline(always)]
1574    pub fn m_rx_done(
1575        self,
1576    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1577        crate::common::RegisterFieldBool::<7,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1578    }
1579
1580    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1581    #[inline(always)]
1582    pub fn m_tx_abrt(
1583        self,
1584    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1585        crate::common::RegisterFieldBool::<6,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1586    }
1587
1588    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1589    #[inline(always)]
1590    pub fn m_rd_req(
1591        self,
1592    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1593        crate::common::RegisterFieldBool::<5,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1594    }
1595
1596    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1597    #[inline(always)]
1598    pub fn m_tx_empty(
1599        self,
1600    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1601        crate::common::RegisterFieldBool::<4,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1602    }
1603
1604    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1605    #[inline(always)]
1606    pub fn m_tx_over(
1607        self,
1608    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1609        crate::common::RegisterFieldBool::<3,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1610    }
1611
1612    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1613    #[inline(always)]
1614    pub fn m_rx_full(
1615        self,
1616    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1617        crate::common::RegisterFieldBool::<2,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1618    }
1619
1620    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1621    #[inline(always)]
1622    pub fn m_rx_over(
1623        self,
1624    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1625        crate::common::RegisterFieldBool::<1,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1626    }
1627
1628    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1629    #[inline(always)]
1630    pub fn m_rx_under(
1631        self,
1632    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1633        crate::common::RegisterFieldBool::<0,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1634    }
1635}
1636impl ::core::default::Default for I2CIntrMaskReg {
1637    #[inline(always)]
1638    fn default() -> I2CIntrMaskReg {
1639        <crate::RegValueT<I2CIntrMaskReg_SPEC> as RegisterValue<_>>::new(2303)
1640    }
1641}
1642
1643#[doc(hidden)]
1644#[derive(Copy, Clone, Eq, PartialEq)]
1645pub struct I2CIntrStatReg_SPEC;
1646impl crate::sealed::RegSpec for I2CIntrStatReg_SPEC {
1647    type DataType = u16;
1648}
1649
1650#[doc = "I2C Interrupt Status Register"]
1651pub type I2CIntrStatReg = crate::RegValueT<I2CIntrStatReg_SPEC>;
1652
1653impl I2CIntrStatReg {
1654    #[doc = "Set only when a General Call address is received and it is acknowledged. It stays set until it is cleared either by disabling controller or when the CPU reads bit 0 of the I2C_CLR_GEN_CALL register. The controller stores the received data in the Rx buffer."]
1655    #[inline(always)]
1656    pub fn r_gen_call(
1657        self,
1658    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1659        crate::common::RegisterFieldBool::<11,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1660    }
1661
1662    #[doc = "Indicates whether a START or RESTART condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1663    #[inline(always)]
1664    pub fn r_start_det(
1665        self,
1666    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1667        crate::common::RegisterFieldBool::<10,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1668    }
1669
1670    #[doc = "Indicates whether a STOP condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1671    #[inline(always)]
1672    pub fn r_stop_det(
1673        self,
1674    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1675        crate::common::RegisterFieldBool::<9,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1676    }
1677
1678    #[doc = "This bit captures I2C Ctrl activity and stays set until it is cleared. There are four ways to clear it:\n=> Disabling the I2C Ctrl\n=> Reading the IC_CLR_ACTIVITY register\n=> Reading the IC_CLR_INTR register\n=> System reset\nOnce this bit is set, it stays set unless one of the four methods is used to clear it. Even if the controller module is idle, this bit remains set until cleared, indicating that there was activity on the bus."]
1679    #[inline(always)]
1680    pub fn r_activity(
1681        self,
1682    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1683        crate::common::RegisterFieldBool::<8,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1684    }
1685
1686    #[doc = "When the controller is acting as a slave-transmitter, this bit is set to 1 if the master does not acknowledge a transmitted byte. This occurs on the last byte of the transmission, indicating that the transmission is done."]
1687    #[inline(always)]
1688    pub fn r_rx_done(
1689        self,
1690    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1691        crate::common::RegisterFieldBool::<7,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1692    }
1693
1694    #[doc = "This bit indicates if the controller, as an I2C transmitter, is unable to complete the intended actions on the contents of the transmit FIFO. This situation can occur both as an I2C master or an I2C slave, and is referred to as a \"transmit abort\".\nWhen this bit is set to 1, the I2C_TX_ABRT_SOURCE register indicates the reason why the transmit abort takes places.\nNOTE: The controller flushes/resets/empties the TX FIFO whenever this bit is set. The TX FIFO remains in this flushed state until the register I2C_CLR_TX_ABRT is read. Once this read is performed, the TX FIFO is then ready to accept more data bytes from the APB interface."]
1695    #[inline(always)]
1696    pub fn r_tx_abrt(
1697        self,
1698    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1699        crate::common::RegisterFieldBool::<6,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1700    }
1701
1702    #[doc = "This bit is set to 1 when the controller is acting as a slave and another I2C master is attempting to read data from the controller. The controller holds the I2C bus in a wait state (SCL=0) until this interrupt is serviced, which means that the slave has been addressed by a remote master that is asking for data to be transferred. The processor must respond to this interrupt and then write the requested data to the I2C_DATA_CMD register. This bit is set to 0 just after the processor reads the I2C_CLR_RD_REQ register"]
1703    #[inline(always)]
1704    pub fn r_rd_req(
1705        self,
1706    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1707        crate::common::RegisterFieldBool::<5,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1708    }
1709
1710    #[doc = "This bit is set to 1 when the transmit buffer is at or below the threshold value set in the I2C_TX_TL register. It is automatically cleared by hardware when the buffer level goes above the threshold. When the IC_ENABLE bit 0 is 0, the TX FIFO is flushed and held in reset. There the TX FIFO looks like it has no data within it, so this bit is set to 1, provided there is activity in the master or slave state machines. When there is no longer activity, then with ic_en=0, this bit is set to 0."]
1711    #[inline(always)]
1712    pub fn r_tx_empty(
1713        self,
1714    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1715        crate::common::RegisterFieldBool::<4,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1716    }
1717
1718    #[doc = "Set during transmit if the transmit buffer is filled to 32 and the processor attempts to issue another I2C command by writing to the IC_DATA_CMD register. When the module is disabled, this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared"]
1719    #[inline(always)]
1720    pub fn r_tx_over(
1721        self,
1722    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1723        crate::common::RegisterFieldBool::<3,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1724    }
1725
1726    #[doc = "Set when the receive buffer reaches or goes above the RX_TL threshold in the I2C_RX_TL register. It is automatically cleared by hardware when buffer level goes below the threshold. If the module is disabled (I2C_ENABLE\\[0\\]=0), the RX FIFO is flushed and held in reset; therefore the RX FIFO is not full. So this bit is cleared once the I2C_ENABLE bit 0 is programmed with a 0, regardless of the activity that continues."]
1727    #[inline(always)]
1728    pub fn r_rx_full(
1729        self,
1730    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1731        crate::common::RegisterFieldBool::<2,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1732    }
1733
1734    #[doc = "Set if the receive buffer is completely filled to 32 and an additional byte is received from an external I2C device. The controller acknowledges this, but any data bytes received after the FIFO is full are lost. If the module is disabled (I2C_ENABLE\\[0\\]=0), this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared."]
1735    #[inline(always)]
1736    pub fn r_rx_over(
1737        self,
1738    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1739        crate::common::RegisterFieldBool::<1,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1740    }
1741
1742    #[doc = "Set if the processor attempts to read the receive buffer when it is empty by reading from the IC_DATA_CMD register. If the module is disabled (I2C_ENABLE\\[0\\]=0), this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared."]
1743    #[inline(always)]
1744    pub fn r_rx_under(
1745        self,
1746    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1747        crate::common::RegisterFieldBool::<0,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1748    }
1749}
1750impl ::core::default::Default for I2CIntrStatReg {
1751    #[inline(always)]
1752    fn default() -> I2CIntrStatReg {
1753        <crate::RegValueT<I2CIntrStatReg_SPEC> as RegisterValue<_>>::new(0)
1754    }
1755}
1756
1757#[doc(hidden)]
1758#[derive(Copy, Clone, Eq, PartialEq)]
1759pub struct I2CRawIntrStatReg_SPEC;
1760impl crate::sealed::RegSpec for I2CRawIntrStatReg_SPEC {
1761    type DataType = u16;
1762}
1763
1764#[doc = "I2C Raw Interrupt Status Register"]
1765pub type I2CRawIntrStatReg = crate::RegValueT<I2CRawIntrStatReg_SPEC>;
1766
1767impl I2CRawIntrStatReg {
1768    #[doc = "Set only when a General Call address is received and it is acknowledged. It stays set until it is cleared either by disabling controller or when the CPU reads bit 0 of the I2C_CLR_GEN_CALL register. I2C Ctrl stores the received data in the Rx buffer."]
1769    #[inline(always)]
1770    pub fn gen_call(
1771        self,
1772    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1773        crate::common::RegisterFieldBool::<11,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1774    }
1775
1776    #[doc = "Indicates whether a START or RESTART condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1777    #[inline(always)]
1778    pub fn start_det(
1779        self,
1780    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1781        crate::common::RegisterFieldBool::<10,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1782    }
1783
1784    #[doc = "Indicates whether a STOP condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1785    #[inline(always)]
1786    pub fn stop_det(
1787        self,
1788    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1789        crate::common::RegisterFieldBool::<9,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1790    }
1791
1792    #[doc = "This bit captures I2C Ctrl activity and stays set until it is cleared. There are four ways to clear it:\n=> Disabling the I2C Ctrl\n=> Reading the IC_CLR_ACTIVITY register\n=> Reading the IC_CLR_INTR register\n=> System reset\nOnce this bit is set, it stays set unless one of the four methods is used to clear it. Even if the controller module is idle, this bit remains set until cleared, indicating that there was activity on the bus."]
1793    #[inline(always)]
1794    pub fn activity(
1795        self,
1796    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1797        crate::common::RegisterFieldBool::<8,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1798    }
1799
1800    #[doc = "When the controller is acting as a slave-transmitter, this bit is set to 1 if the master does not acknowledge a transmitted byte. This occurs on the last byte of the transmission, indicating that the transmission is done."]
1801    #[inline(always)]
1802    pub fn rx_done(
1803        self,
1804    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1805        crate::common::RegisterFieldBool::<7,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1806    }
1807
1808    #[doc = "This bit indicates if the controller, as an I2C transmitter, is unable to complete the intended actions on the contents of the transmit FIFO. This situation can occur both as an I2C master or an I2C slave, and is referred to as a \"transmit abort\".\nWhen this bit is set to 1, the I2C_TX_ABRT_SOURCE register indicates the reason why the transmit abort takes places.\nNOTE: The controller flushes/resets/empties the TX FIFO whenever this bit is set. The TX FIFO remains in this flushed state until the register I2C_CLR_TX_ABRT is read. Once this read is performed, the TX FIFO is then ready to accept more data bytes from the APB interface."]
1809    #[inline(always)]
1810    pub fn tx_abrt(
1811        self,
1812    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1813        crate::common::RegisterFieldBool::<6,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1814    }
1815
1816    #[doc = "This bit is set to 1 when I2C Ctrl is acting as a slave and another I2C master is attempting to read data from the controller. The controller holds the I2C bus in a wait state (SCL=0) until this interrupt is serviced, which means that the slave has been addressed by a remote master that is asking for data to be transferred. The processor must respond to this interrupt and then write the requested data to the I2C_DATA_CMD register. This bit is set to 0 just after the processor reads the I2C_CLR_RD_REQ register"]
1817    #[inline(always)]
1818    pub fn rd_req(
1819        self,
1820    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1821        crate::common::RegisterFieldBool::<5,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1822    }
1823
1824    #[doc = "This bit is set to 1 when the transmit buffer is at or below the threshold value set in the I2C_TX_TL register. It is automatically cleared by hardware when the buffer level goes above the threshold. When the IC_ENABLE bit 0 is 0, the TX FIFO is flushed and held in reset. There the TX FIFO looks like it has no data within it, so this bit is set to 1, provided there is activity in the master or slave state machines. When there is no longer activity, then with ic_en=0, this bit is set to 0."]
1825    #[inline(always)]
1826    pub fn tx_empty(
1827        self,
1828    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1829        crate::common::RegisterFieldBool::<4,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1830    }
1831
1832    #[doc = "Set during transmit if the transmit buffer is filled to 32 and the processor attempts to issue another I2C command by writing to the IC_DATA_CMD register. When the module is disabled, this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared"]
1833    #[inline(always)]
1834    pub fn tx_over(
1835        self,
1836    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1837        crate::common::RegisterFieldBool::<3,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1838    }
1839
1840    #[doc = "Set when the receive buffer reaches or goes above the RX_TL threshold in the I2C_RX_TL register. It is automatically cleared by hardware when buffer level goes below the threshold. If the module is disabled (I2C_ENABLE\\[0\\]=0), the RX FIFO is flushed and held in reset; therefore the RX FIFO is not full. So this bit is cleared once the I2C_ENABLE bit 0 is programmed with a 0, regardless of the activity that continues."]
1841    #[inline(always)]
1842    pub fn rx_full(
1843        self,
1844    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1845        crate::common::RegisterFieldBool::<2,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1846    }
1847
1848    #[doc = "Set if the receive buffer is completely filled to 32 and an additional byte is received from an external I2C device. The controller acknowledges this, but any data bytes received after the FIFO is full are lost. If the module is disabled (I2C_ENABLE\\[0\\]=0), this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared."]
1849    #[inline(always)]
1850    pub fn rx_over(
1851        self,
1852    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1853        crate::common::RegisterFieldBool::<1,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1854    }
1855
1856    #[doc = "Set if the processor attempts to read the receive buffer when it is empty by reading from the IC_DATA_CMD register. If the module is disabled (I2C_ENABLE\\[0\\]=0), this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared."]
1857    #[inline(always)]
1858    pub fn rx_under(
1859        self,
1860    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1861        crate::common::RegisterFieldBool::<0,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1862    }
1863}
1864impl ::core::default::Default for I2CRawIntrStatReg {
1865    #[inline(always)]
1866    fn default() -> I2CRawIntrStatReg {
1867        <crate::RegValueT<I2CRawIntrStatReg_SPEC> as RegisterValue<_>>::new(0)
1868    }
1869}
1870
1871#[doc(hidden)]
1872#[derive(Copy, Clone, Eq, PartialEq)]
1873pub struct I2CRxflrReg_SPEC;
1874impl crate::sealed::RegSpec for I2CRxflrReg_SPEC {
1875    type DataType = u16;
1876}
1877
1878#[doc = "I2C Receive FIFO Level Register"]
1879pub type I2CRxflrReg = crate::RegValueT<I2CRxflrReg_SPEC>;
1880
1881impl I2CRxflrReg {
1882    #[doc = "Receive FIFO Level. Contains the number of valid data entries in the receive FIFO. Size is constrained by the RXFLR value"]
1883    #[inline(always)]
1884    pub fn rxflr(
1885        self,
1886    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, I2CRxflrReg_SPEC, crate::common::R>
1887    {
1888        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,I2CRxflrReg_SPEC,crate::common::R>::from_register(self,0)
1889    }
1890}
1891impl ::core::default::Default for I2CRxflrReg {
1892    #[inline(always)]
1893    fn default() -> I2CRxflrReg {
1894        <crate::RegValueT<I2CRxflrReg_SPEC> as RegisterValue<_>>::new(0)
1895    }
1896}
1897
1898#[doc(hidden)]
1899#[derive(Copy, Clone, Eq, PartialEq)]
1900pub struct I2CRxTlReg_SPEC;
1901impl crate::sealed::RegSpec for I2CRxTlReg_SPEC {
1902    type DataType = u16;
1903}
1904
1905#[doc = "I2C Receive FIFO Threshold Register"]
1906pub type I2CRxTlReg = crate::RegValueT<I2CRxTlReg_SPEC>;
1907
1908impl I2CRxTlReg {
1909    #[doc = "Receive FIFO Threshold Level Controls the level of entries (or above) that triggers the RX_FULL interrupt (bit 2 in I2C_RAW_INTR_STAT register). The valid range is 0-3,a value of 0 sets the threshold for 1 entry, and a value of 3 sets the threshold for 4 entries."]
1910    #[inline(always)]
1911    pub fn rx_tl(
1912        self,
1913    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2CRxTlReg_SPEC, crate::common::RW>
1914    {
1915        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2CRxTlReg_SPEC,crate::common::RW>::from_register(self,0)
1916    }
1917}
1918impl ::core::default::Default for I2CRxTlReg {
1919    #[inline(always)]
1920    fn default() -> I2CRxTlReg {
1921        <crate::RegValueT<I2CRxTlReg_SPEC> as RegisterValue<_>>::new(0)
1922    }
1923}
1924
1925#[doc(hidden)]
1926#[derive(Copy, Clone, Eq, PartialEq)]
1927pub struct I2CSarReg_SPEC;
1928impl crate::sealed::RegSpec for I2CSarReg_SPEC {
1929    type DataType = u16;
1930}
1931
1932#[doc = "I2C Slave Address Register"]
1933pub type I2CSarReg = crate::RegValueT<I2CSarReg_SPEC>;
1934
1935impl I2CSarReg {
1936    #[doc = "The IC_SAR holds the slave address when the I2C is operating as a slave. For 7-bit addressing, only IC_SAR\\[6:0\\] is used. This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE register being set to 0. Writes at other times have no effect."]
1937    #[inline(always)]
1938    pub fn ic_sar(
1939        self,
1940    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, I2CSarReg_SPEC, crate::common::RW>
1941    {
1942        crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,I2CSarReg_SPEC,crate::common::RW>::from_register(self,0)
1943    }
1944}
1945impl ::core::default::Default for I2CSarReg {
1946    #[inline(always)]
1947    fn default() -> I2CSarReg {
1948        <crate::RegValueT<I2CSarReg_SPEC> as RegisterValue<_>>::new(85)
1949    }
1950}
1951
1952#[doc(hidden)]
1953#[derive(Copy, Clone, Eq, PartialEq)]
1954pub struct I2CSdaHoldReg_SPEC;
1955impl crate::sealed::RegSpec for I2CSdaHoldReg_SPEC {
1956    type DataType = u16;
1957}
1958
1959#[doc = "I2C SDA Hold Time Length Register"]
1960pub type I2CSdaHoldReg = crate::RegValueT<I2CSdaHoldReg_SPEC>;
1961
1962impl I2CSdaHoldReg {
1963    #[doc = "SDA Hold time"]
1964    #[inline(always)]
1965    pub fn ic_sda_hold(
1966        self,
1967    ) -> crate::common::RegisterField<
1968        0,
1969        0xffff,
1970        1,
1971        0,
1972        u16,
1973        u16,
1974        I2CSdaHoldReg_SPEC,
1975        crate::common::RW,
1976    > {
1977        crate::common::RegisterField::<
1978            0,
1979            0xffff,
1980            1,
1981            0,
1982            u16,
1983            u16,
1984            I2CSdaHoldReg_SPEC,
1985            crate::common::RW,
1986        >::from_register(self, 0)
1987    }
1988}
1989impl ::core::default::Default for I2CSdaHoldReg {
1990    #[inline(always)]
1991    fn default() -> I2CSdaHoldReg {
1992        <crate::RegValueT<I2CSdaHoldReg_SPEC> as RegisterValue<_>>::new(1)
1993    }
1994}
1995
1996#[doc(hidden)]
1997#[derive(Copy, Clone, Eq, PartialEq)]
1998pub struct I2CSdaSetupReg_SPEC;
1999impl crate::sealed::RegSpec for I2CSdaSetupReg_SPEC {
2000    type DataType = u16;
2001}
2002
2003#[doc = "I2C SDA Setup Register"]
2004pub type I2CSdaSetupReg = crate::RegValueT<I2CSdaSetupReg_SPEC>;
2005
2006impl I2CSdaSetupReg {
2007    #[doc = "SDA Setup.\nThis register controls the amount of time delay (number of I2C clock periods) between the rising edge of SCL and SDA changing by holding SCL low when I2C block services a read request while operating as a slave-transmitter. This register must be programmed with a value equal to or greater than 2. It is recommended that if the required delay is 1000ns, then for an I2C frequency of 10 MHz, IC_SDA_SETUP should be programmed to a value of 11.Writes to this register succeed only when IC_ENABLE\\[0\\] = 0."]
2008    #[inline(always)]
2009    pub fn sda_setup(
2010        self,
2011    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2CSdaSetupReg_SPEC, crate::common::RW>
2012    {
2013        crate::common::RegisterField::<0,0xff,1,0,u8,u8,I2CSdaSetupReg_SPEC,crate::common::RW>::from_register(self,0)
2014    }
2015}
2016impl ::core::default::Default for I2CSdaSetupReg {
2017    #[inline(always)]
2018    fn default() -> I2CSdaSetupReg {
2019        <crate::RegValueT<I2CSdaSetupReg_SPEC> as RegisterValue<_>>::new(100)
2020    }
2021}
2022
2023#[doc(hidden)]
2024#[derive(Copy, Clone, Eq, PartialEq)]
2025pub struct I2CSsSclHcntReg_SPEC;
2026impl crate::sealed::RegSpec for I2CSsSclHcntReg_SPEC {
2027    type DataType = u16;
2028}
2029
2030#[doc = "Standard Speed I2C Clock SCL High Count Register"]
2031pub type I2CSsSclHcntReg = crate::RegValueT<I2CSsSclHcntReg_SPEC>;
2032
2033impl I2CSsSclHcntReg {
2034    #[doc = "This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock high-period count for standard speed. This register can be written only when the I2C interface is disabled which corresponds to the IC_ENABLE register being set to 0. Writes at other\ntimes have no effect.\nThe minimum valid value is 6; hardware prevents values less than this being written, and if attempted results in 6 being set.\nNOTE: This register must not be programmed to a value higher than 65525, because the controller uses a 16-bit counter to flag an I2C bus idle condition when this counter reaches a value of IC_SS_SCL_HCNT + 10."]
2035    #[inline(always)]
2036    pub fn ic_ss_scl_hcnt(
2037        self,
2038    ) -> crate::common::RegisterField<
2039        0,
2040        0xffff,
2041        1,
2042        0,
2043        u16,
2044        u16,
2045        I2CSsSclHcntReg_SPEC,
2046        crate::common::RW,
2047    > {
2048        crate::common::RegisterField::<
2049            0,
2050            0xffff,
2051            1,
2052            0,
2053            u16,
2054            u16,
2055            I2CSsSclHcntReg_SPEC,
2056            crate::common::RW,
2057        >::from_register(self, 0)
2058    }
2059}
2060impl ::core::default::Default for I2CSsSclHcntReg {
2061    #[inline(always)]
2062    fn default() -> I2CSsSclHcntReg {
2063        <crate::RegValueT<I2CSsSclHcntReg_SPEC> as RegisterValue<_>>::new(72)
2064    }
2065}
2066
2067#[doc(hidden)]
2068#[derive(Copy, Clone, Eq, PartialEq)]
2069pub struct I2CSsSclLcntReg_SPEC;
2070impl crate::sealed::RegSpec for I2CSsSclLcntReg_SPEC {
2071    type DataType = u16;
2072}
2073
2074#[doc = "Standard Speed I2C Clock SCL Low Count Register"]
2075pub type I2CSsSclLcntReg = crate::RegValueT<I2CSsSclLcntReg_SPEC>;
2076
2077impl I2CSsSclLcntReg {
2078    #[doc = "This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock low period count for standard speed.\nThis register can be written only when the I2C interface is disabled which corresponds to the I2C_ENABLE register being set to 0. Writes at other times have no effect.\nThe minimum valid value is 8; hardware prevents values less than this being written, and if attempted, results in 8 being set."]
2079    #[inline(always)]
2080    pub fn ic_ss_scl_lcnt(
2081        self,
2082    ) -> crate::common::RegisterField<
2083        0,
2084        0xffff,
2085        1,
2086        0,
2087        u16,
2088        u16,
2089        I2CSsSclLcntReg_SPEC,
2090        crate::common::RW,
2091    > {
2092        crate::common::RegisterField::<
2093            0,
2094            0xffff,
2095            1,
2096            0,
2097            u16,
2098            u16,
2099            I2CSsSclLcntReg_SPEC,
2100            crate::common::RW,
2101        >::from_register(self, 0)
2102    }
2103}
2104impl ::core::default::Default for I2CSsSclLcntReg {
2105    #[inline(always)]
2106    fn default() -> I2CSsSclLcntReg {
2107        <crate::RegValueT<I2CSsSclLcntReg_SPEC> as RegisterValue<_>>::new(79)
2108    }
2109}
2110
2111#[doc(hidden)]
2112#[derive(Copy, Clone, Eq, PartialEq)]
2113pub struct I2CStatusReg_SPEC;
2114impl crate::sealed::RegSpec for I2CStatusReg_SPEC {
2115    type DataType = u16;
2116}
2117
2118#[doc = "I2C Status Register"]
2119pub type I2CStatusReg = crate::RegValueT<I2CStatusReg_SPEC>;
2120
2121impl I2CStatusReg {
2122    #[doc = "Slave FSM Activity Status. When the Slave Finite State Machine (FSM) is not in the IDLE state, this bit is set.\n0: Slave FSM is in IDLE state so the Slave part of the controller is not Active\n1: Slave FSM is not in IDLE state so the Slave part of the controller is Active"]
2123    #[inline(always)]
2124    pub fn slv_activity(
2125        self,
2126    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2127        crate::common::RegisterFieldBool::<6,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2128    }
2129
2130    #[doc = "Master FSM Activity Status. When the Master Finite State Machine (FSM) is not in the IDLE state, this bit is set.\n0: Master FSM is in IDLE state so the Master part of the controller is not Active\n1: Master FSM is not in IDLE state so the Master part of the controller is Active"]
2131    #[inline(always)]
2132    pub fn mst_activity(
2133        self,
2134    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2135        crate::common::RegisterFieldBool::<5,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2136    }
2137
2138    #[doc = "Receive FIFO Completely Full. When the receive FIFO is completely full, this bit is set. When the receive FIFO contains one or more empty location, this bit is cleared.\n0: Receive FIFO is not full\n1: Receive FIFO is full"]
2139    #[inline(always)]
2140    pub fn rff(
2141        self,
2142    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2143        crate::common::RegisterFieldBool::<4,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2144    }
2145
2146    #[doc = "Receive FIFO Not Empty. This bit is set when the receive FIFO contains one or more entries; it is cleared when the receive FIFO is empty.\n0: Receive FIFO is empty\n1: Receive FIFO is not empty"]
2147    #[inline(always)]
2148    pub fn rfne(
2149        self,
2150    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2151        crate::common::RegisterFieldBool::<3,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2152    }
2153
2154    #[doc = "Transmit FIFO Completely Empty. When the transmit FIFO is completely empty, this bit is set. When it contains one or more valid entries, this bit is cleared. This bit field does not request an interrupt.\n0: Transmit FIFO is not empty\n1: Transmit FIFO is empty"]
2155    #[inline(always)]
2156    pub fn tfe(
2157        self,
2158    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2159        crate::common::RegisterFieldBool::<2,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2160    }
2161
2162    #[doc = "Transmit FIFO Not Full. Set when the transmit FIFO contains one or more empty locations, and is cleared when the FIFO is full.\n0: Transmit FIFO is full\n1: Transmit FIFO is not full"]
2163    #[inline(always)]
2164    pub fn tfnf(
2165        self,
2166    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2167        crate::common::RegisterFieldBool::<1,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2168    }
2169
2170    #[doc = "I2C Activity Status."]
2171    #[inline(always)]
2172    pub fn i2c_activity(
2173        self,
2174    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2175        crate::common::RegisterFieldBool::<0,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2176    }
2177}
2178impl ::core::default::Default for I2CStatusReg {
2179    #[inline(always)]
2180    fn default() -> I2CStatusReg {
2181        <crate::RegValueT<I2CStatusReg_SPEC> as RegisterValue<_>>::new(6)
2182    }
2183}
2184
2185#[doc(hidden)]
2186#[derive(Copy, Clone, Eq, PartialEq)]
2187pub struct I2CTarReg_SPEC;
2188impl crate::sealed::RegSpec for I2CTarReg_SPEC {
2189    type DataType = u16;
2190}
2191
2192#[doc = "I2C Target Address Register"]
2193pub type I2CTarReg = crate::RegValueT<I2CTarReg_SPEC>;
2194
2195impl I2CTarReg {
2196    #[doc = "This bit indicates whether software performs a General Call or\nSTART BYTE command.\n0: ignore bit 10 GC_OR_START and use IC_TAR normally\n1: perform special I2C command as specified in GC_OR_START\nbit"]
2197    #[inline(always)]
2198    pub fn special(
2199        self,
2200    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2CTarReg_SPEC, crate::common::RW> {
2201        crate::common::RegisterFieldBool::<11,1,0,I2CTarReg_SPEC,crate::common::RW>::from_register(self,0)
2202    }
2203
2204    #[doc = "If bit 11 (SPECIAL) is set to 1, then this bit indicates whether a General Call or START byte command is to be performed by the controller.\n0: General Call Address - after issuing a General Call, only writes may be performed. Attempting to issue a read command results in setting bit 6 (TX_ABRT) of the IC_RAW_INTR_STAT register. The controller remains in General Call mode until the SPECIAL bit value (bit 11) is cleared.\n1: START BYTE"]
2205    #[inline(always)]
2206    pub fn gc_or_start(
2207        self,
2208    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CTarReg_SPEC, crate::common::RW> {
2209        crate::common::RegisterFieldBool::<10,1,0,I2CTarReg_SPEC,crate::common::RW>::from_register(self,0)
2210    }
2211
2212    #[doc = "This is the target address for any master transaction. When transmitting a General Call, these bits are ignored. To generate a START BYTE, the CPU needs to write only once into these bits.\nNote: If the IC_TAR and IC_SAR are the same, loopback exists but the FIFOs are shared between master and slave, so full loopback is not feasible. Only one direction loopback mode is supported (simplex), not duplex. A master cannot transmit to itself; it can transmit to only a slave\nWrites to this register succeed only when IC_ENABLE\\[0\\] is set to 0"]
2213    #[inline(always)]
2214    pub fn ic_tar(
2215        self,
2216    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, I2CTarReg_SPEC, crate::common::RW>
2217    {
2218        crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,I2CTarReg_SPEC,crate::common::RW>::from_register(self,0)
2219    }
2220}
2221impl ::core::default::Default for I2CTarReg {
2222    #[inline(always)]
2223    fn default() -> I2CTarReg {
2224        <crate::RegValueT<I2CTarReg_SPEC> as RegisterValue<_>>::new(85)
2225    }
2226}
2227
2228#[doc(hidden)]
2229#[derive(Copy, Clone, Eq, PartialEq)]
2230pub struct I2CTxflrReg_SPEC;
2231impl crate::sealed::RegSpec for I2CTxflrReg_SPEC {
2232    type DataType = u16;
2233}
2234
2235#[doc = "I2C Transmit FIFO Level Register"]
2236pub type I2CTxflrReg = crate::RegValueT<I2CTxflrReg_SPEC>;
2237
2238impl I2CTxflrReg {
2239    #[doc = "Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO. Size is constrained by the TXFLR value"]
2240    #[inline(always)]
2241    pub fn txflr(
2242        self,
2243    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, I2CTxflrReg_SPEC, crate::common::R>
2244    {
2245        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,I2CTxflrReg_SPEC,crate::common::R>::from_register(self,0)
2246    }
2247}
2248impl ::core::default::Default for I2CTxflrReg {
2249    #[inline(always)]
2250    fn default() -> I2CTxflrReg {
2251        <crate::RegValueT<I2CTxflrReg_SPEC> as RegisterValue<_>>::new(0)
2252    }
2253}
2254
2255#[doc(hidden)]
2256#[derive(Copy, Clone, Eq, PartialEq)]
2257pub struct I2CTxAbrtSourceReg_SPEC;
2258impl crate::sealed::RegSpec for I2CTxAbrtSourceReg_SPEC {
2259    type DataType = u16;
2260}
2261
2262#[doc = "I2C Transmit Abort Source Register"]
2263pub type I2CTxAbrtSourceReg = crate::RegValueT<I2CTxAbrtSourceReg_SPEC>;
2264
2265impl I2CTxAbrtSourceReg {
2266    #[doc = "1: When the processor side responds to a slave mode request for data to be transmitted to a remote master and user writes a 1 in CMD (bit 8) of 2 IC_DATA_CMD register"]
2267    #[inline(always)]
2268    pub fn abrt_slvrd_intx(
2269        self,
2270    ) -> crate::common::RegisterFieldBool<15, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2271        crate::common::RegisterFieldBool::<15,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2272    }
2273
2274    #[doc = "1: Slave lost the bus while transmitting data to a remote master.\nI2C_TX_ABRT_SOURCE\\[12\\] is set at the same time. Note: Even though the slave never \"owns\" the bus, something could go wrong on the bus. This is a fail safe check. For instance, during a data transmission at the low-to-high transition of SCL, if what is on the data bus is not what is supposed to be transmitted, then the controller no longer own the bus."]
2275    #[inline(always)]
2276    pub fn abrt_slv_arblost(
2277        self,
2278    ) -> crate::common::RegisterFieldBool<14, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2279        crate::common::RegisterFieldBool::<14,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2280    }
2281
2282    #[doc = "1: Slave has received a read command and some data exists in the TX FIFO so the slave issues a TX_ABRT interrupt to flush old data in TX FIFO."]
2283    #[inline(always)]
2284    pub fn abrt_slvflush_txfifo(
2285        self,
2286    ) -> crate::common::RegisterFieldBool<13, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2287        crate::common::RegisterFieldBool::<13,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2288    }
2289
2290    #[doc = "1: Master has lost arbitration, or if I2C_TX_ABRT_SOURCE\\[14\\] is also set, then the slave transmitter has lost arbitration. Note: I2C can be both master and slave at the same time."]
2291    #[inline(always)]
2292    pub fn arb_lost(
2293        self,
2294    ) -> crate::common::RegisterFieldBool<12, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2295        crate::common::RegisterFieldBool::<12,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2296    }
2297
2298    #[doc = "1: User tries to initiate a Master operation with the Master mode disabled."]
2299    #[inline(always)]
2300    pub fn abrt_master_dis(
2301        self,
2302    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2303        crate::common::RegisterFieldBool::<11,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2304    }
2305
2306    #[doc = "1: The restart is disabled (IC_RESTART_EN bit (I2C_CON\\[5\\]) = 0) and the master sends a read command in 10-bit addressing mode."]
2307    #[inline(always)]
2308    pub fn abrt_10b_rd_norstrt(
2309        self,
2310    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2311        crate::common::RegisterFieldBool::<10,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2312    }
2313
2314    #[doc = "To clear Bit 9, the source of the ABRT_SBYTE_NORSTRT must be fixed first; restart must be enabled (I2C_CON\\[5\\]=1), the SPECIAL bit must be cleared (I2C_TAR\\[11\\]), or the GC_OR_START bit must be cleared (I2C_TAR\\[10\\]). Once the source of the ABRT_SBYTE_NORSTRT is fixed, then this bit can be cleared in the same manner as other bits in this register. If the source of the ABRT_SBYTE_NORSTRT is not fixed before attempting to clear this bit, bit 9 clears for one cycle and then gets re-asserted. 1: The restart is disabled (IC_RESTART_EN bit (I2C_CON\\[5\\]) = 0) and the user is trying to send a START Byte."]
2315    #[inline(always)]
2316    pub fn abrt_sbyte_norstrt(
2317        self,
2318    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2319        crate::common::RegisterFieldBool::<9,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2320    }
2321
2322    #[doc = "1: The restart is disabled (IC_RESTART_EN bit (I2C_CON\\[5\\]) = 0) and the user is trying to use the master to transfer data in High Speed mode"]
2323    #[inline(always)]
2324    pub fn abrt_hs_norstrt(
2325        self,
2326    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2327        crate::common::RegisterFieldBool::<8,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2328    }
2329
2330    #[doc = "1: Master has sent a START Byte and the START Byte was acknowledged (wrong behavior)."]
2331    #[inline(always)]
2332    pub fn abrt_sbyte_ackdet(
2333        self,
2334    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2335        crate::common::RegisterFieldBool::<7,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2336    }
2337
2338    #[doc = "1: Master is in High Speed mode and the High Speed Master code was acknowledged (wrong behavior)."]
2339    #[inline(always)]
2340    pub fn abrt_hs_ackdet(
2341        self,
2342    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2343        crate::common::RegisterFieldBool::<6,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2344    }
2345
2346    #[doc = "1: the controller in master mode sent a General Call but the user programmed the byte following the General Call to be a read from the bus (IC_DATA_CMD\\[9\\] is set to 1)."]
2347    #[inline(always)]
2348    pub fn abrt_gcall_read(
2349        self,
2350    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2351        crate::common::RegisterFieldBool::<5,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2352    }
2353
2354    #[doc = "1: the controller in master mode sent a General Call and no slave on the bus acknowledged the General Call."]
2355    #[inline(always)]
2356    pub fn abrt_gcall_noack(
2357        self,
2358    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2359        crate::common::RegisterFieldBool::<4,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2360    }
2361
2362    #[doc = "1: This is a master-mode only bit. Master has received an acknowledgement for the address, but when it sent data byte(s) following the address, it did not receive an acknowledge from the remote slave(s)."]
2363    #[inline(always)]
2364    pub fn abrt_txdata_noack(
2365        self,
2366    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2367        crate::common::RegisterFieldBool::<3,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2368    }
2369
2370    #[doc = "1: Master is in 10-bit address mode and the second address byte of the 10-bit address was not acknowledged by any slave."]
2371    #[inline(always)]
2372    pub fn abrt_10addr2_noack(
2373        self,
2374    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2375        crate::common::RegisterFieldBool::<2,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2376    }
2377
2378    #[doc = "1: Master is in 10-bit address mode and the first 10-bit address byte was not acknowledged by any slave."]
2379    #[inline(always)]
2380    pub fn abrt_10addr1_noack(
2381        self,
2382    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2383        crate::common::RegisterFieldBool::<1,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2384    }
2385
2386    #[doc = "1: Master is in 7-bit addressing mode and the address sent was not acknowledged by any slave."]
2387    #[inline(always)]
2388    pub fn abrt_7b_addr_noack(
2389        self,
2390    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2391        crate::common::RegisterFieldBool::<0,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2392    }
2393}
2394impl ::core::default::Default for I2CTxAbrtSourceReg {
2395    #[inline(always)]
2396    fn default() -> I2CTxAbrtSourceReg {
2397        <crate::RegValueT<I2CTxAbrtSourceReg_SPEC> as RegisterValue<_>>::new(0)
2398    }
2399}
2400
2401#[doc(hidden)]
2402#[derive(Copy, Clone, Eq, PartialEq)]
2403pub struct I2CTxTlReg_SPEC;
2404impl crate::sealed::RegSpec for I2CTxTlReg_SPEC {
2405    type DataType = u16;
2406}
2407
2408#[doc = "I2C Transmit FIFO Threshold Register"]
2409pub type I2CTxTlReg = crate::RegValueT<I2CTxTlReg_SPEC>;
2410
2411impl I2CTxTlReg {
2412    #[doc = "Transmit FIFO Threshold Level Controls the level of entries (or below) that trigger the TX_EMPTY interrupt (bit 4 in I2C_RAW_INTR_STAT register). The valid range is 0-3, a value of 0 sets the threshold for 0 entries, and a value of 3 sets the threshold for 4 entries.."]
2413    #[inline(always)]
2414    pub fn tx_tl(
2415        self,
2416    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2CTxTlReg_SPEC, crate::common::RW>
2417    {
2418        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2CTxTlReg_SPEC,crate::common::RW>::from_register(self,0)
2419    }
2420}
2421impl ::core::default::Default for I2CTxTlReg {
2422    #[inline(always)]
2423    fn default() -> I2CTxTlReg {
2424        <crate::RegValueT<I2CTxTlReg_SPEC> as RegisterValue<_>>::new(0)
2425    }
2426}