da14697_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:38 +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 = "Component Parameter Register"]
182    #[inline(always)]
183    pub const fn i2c_comp_param1_reg(
184        &self,
185    ) -> &'static crate::common::Reg<self::I2CCompParam1Reg_SPEC, crate::common::RW> {
186        unsafe {
187            crate::common::Reg::<self::I2CCompParam1Reg_SPEC, crate::common::RW>::from_ptr(
188                self._svd2pac_as_ptr().add(244usize),
189            )
190        }
191    }
192
193    #[doc = "I2C Component Type Register"]
194    #[inline(always)]
195    pub const fn i2c_comp_type_reg(
196        &self,
197    ) -> &'static crate::common::Reg<self::I2CCompTypeReg_SPEC, crate::common::RW> {
198        unsafe {
199            crate::common::Reg::<self::I2CCompTypeReg_SPEC, crate::common::RW>::from_ptr(
200                self._svd2pac_as_ptr().add(252usize),
201            )
202        }
203    }
204
205    #[doc = "I2C Component Version Register"]
206    #[inline(always)]
207    pub const fn i2c_comp_version_reg(
208        &self,
209    ) -> &'static crate::common::Reg<self::I2CCompVersionReg_SPEC, crate::common::RW> {
210        unsafe {
211            crate::common::Reg::<self::I2CCompVersionReg_SPEC, crate::common::RW>::from_ptr(
212                self._svd2pac_as_ptr().add(248usize),
213            )
214        }
215    }
216
217    #[doc = "I2C Control Register"]
218    #[inline(always)]
219    pub const fn i2c_con_reg(
220        &self,
221    ) -> &'static crate::common::Reg<self::I2CConReg_SPEC, crate::common::RW> {
222        unsafe {
223            crate::common::Reg::<self::I2CConReg_SPEC, crate::common::RW>::from_ptr(
224                self._svd2pac_as_ptr().add(0usize),
225            )
226        }
227    }
228
229    #[doc = "I2C Rx/Tx Data Buffer and Command Register"]
230    #[inline(always)]
231    pub const fn i2c_data_cmd_reg(
232        &self,
233    ) -> &'static crate::common::Reg<self::I2CDataCmdReg_SPEC, crate::common::RW> {
234        unsafe {
235            crate::common::Reg::<self::I2CDataCmdReg_SPEC, crate::common::RW>::from_ptr(
236                self._svd2pac_as_ptr().add(16usize),
237            )
238        }
239    }
240
241    #[doc = "DMA Control Register"]
242    #[inline(always)]
243    pub const fn i2c_dma_cr_reg(
244        &self,
245    ) -> &'static crate::common::Reg<self::I2CDmaCrReg_SPEC, crate::common::RW> {
246        unsafe {
247            crate::common::Reg::<self::I2CDmaCrReg_SPEC, crate::common::RW>::from_ptr(
248                self._svd2pac_as_ptr().add(136usize),
249            )
250        }
251    }
252
253    #[doc = "I2C Receive Data Level Register"]
254    #[inline(always)]
255    pub const fn i2c_dma_rdlr_reg(
256        &self,
257    ) -> &'static crate::common::Reg<self::I2CDmaRdlrReg_SPEC, crate::common::RW> {
258        unsafe {
259            crate::common::Reg::<self::I2CDmaRdlrReg_SPEC, crate::common::RW>::from_ptr(
260                self._svd2pac_as_ptr().add(144usize),
261            )
262        }
263    }
264
265    #[doc = "DMA Transmit Data Level Register"]
266    #[inline(always)]
267    pub const fn i2c_dma_tdlr_reg(
268        &self,
269    ) -> &'static crate::common::Reg<self::I2CDmaTdlrReg_SPEC, crate::common::RW> {
270        unsafe {
271            crate::common::Reg::<self::I2CDmaTdlrReg_SPEC, crate::common::RW>::from_ptr(
272                self._svd2pac_as_ptr().add(140usize),
273            )
274        }
275    }
276
277    #[doc = "I2C Enable Register"]
278    #[inline(always)]
279    pub const fn i2c_enable_reg(
280        &self,
281    ) -> &'static crate::common::Reg<self::I2CEnableReg_SPEC, crate::common::RW> {
282        unsafe {
283            crate::common::Reg::<self::I2CEnableReg_SPEC, crate::common::RW>::from_ptr(
284                self._svd2pac_as_ptr().add(108usize),
285            )
286        }
287    }
288
289    #[doc = "I2C Enable Status Register"]
290    #[inline(always)]
291    pub const fn i2c_enable_status_reg(
292        &self,
293    ) -> &'static crate::common::Reg<self::I2CEnableStatusReg_SPEC, crate::common::RW> {
294        unsafe {
295            crate::common::Reg::<self::I2CEnableStatusReg_SPEC, crate::common::RW>::from_ptr(
296                self._svd2pac_as_ptr().add(156usize),
297            )
298        }
299    }
300
301    #[doc = "Fast Speed I2C Clock SCL High Count Register"]
302    #[inline(always)]
303    pub const fn i2c_fs_scl_hcnt_reg(
304        &self,
305    ) -> &'static crate::common::Reg<self::I2CFsSclHcntReg_SPEC, crate::common::RW> {
306        unsafe {
307            crate::common::Reg::<self::I2CFsSclHcntReg_SPEC, crate::common::RW>::from_ptr(
308                self._svd2pac_as_ptr().add(28usize),
309            )
310        }
311    }
312
313    #[doc = "Fast Speed I2C Clock SCL Low Count Register"]
314    #[inline(always)]
315    pub const fn i2c_fs_scl_lcnt_reg(
316        &self,
317    ) -> &'static crate::common::Reg<self::I2CFsSclLcntReg_SPEC, crate::common::RW> {
318        unsafe {
319            crate::common::Reg::<self::I2CFsSclLcntReg_SPEC, crate::common::RW>::from_ptr(
320                self._svd2pac_as_ptr().add(32usize),
321            )
322        }
323    }
324
325    #[doc = "I2C High Speed Master Mode Code Address Register"]
326    #[inline(always)]
327    pub const fn i2c_hs_maddr_reg(
328        &self,
329    ) -> &'static crate::common::Reg<self::I2CHsMaddrReg_SPEC, crate::common::RW> {
330        unsafe {
331            crate::common::Reg::<self::I2CHsMaddrReg_SPEC, crate::common::RW>::from_ptr(
332                self._svd2pac_as_ptr().add(12usize),
333            )
334        }
335    }
336
337    #[doc = "High Speed I2C Clock SCL High Count Register"]
338    #[inline(always)]
339    pub const fn i2c_hs_scl_hcnt_reg(
340        &self,
341    ) -> &'static crate::common::Reg<self::I2CHsSclHcntReg_SPEC, crate::common::RW> {
342        unsafe {
343            crate::common::Reg::<self::I2CHsSclHcntReg_SPEC, crate::common::RW>::from_ptr(
344                self._svd2pac_as_ptr().add(36usize),
345            )
346        }
347    }
348
349    #[doc = "High Speed I2C Clock SCL Low Count Register"]
350    #[inline(always)]
351    pub const fn i2c_hs_scl_lcnt_reg(
352        &self,
353    ) -> &'static crate::common::Reg<self::I2CHsSclLcntReg_SPEC, crate::common::RW> {
354        unsafe {
355            crate::common::Reg::<self::I2CHsSclLcntReg_SPEC, crate::common::RW>::from_ptr(
356                self._svd2pac_as_ptr().add(40usize),
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 HS spike suppression limit Size"]
374    #[inline(always)]
375    pub const fn i2c_ic_hs_spklen_reg(
376        &self,
377    ) -> &'static crate::common::Reg<self::I2CIcHsSpklenReg_SPEC, crate::common::RW> {
378        unsafe {
379            crate::common::Reg::<self::I2CIcHsSpklenReg_SPEC, crate::common::RW>::from_ptr(
380                self._svd2pac_as_ptr().add(164usize),
381            )
382        }
383    }
384
385    #[doc = "I2C Interrupt Mask Register"]
386    #[inline(always)]
387    pub const fn i2c_intr_mask_reg(
388        &self,
389    ) -> &'static crate::common::Reg<self::I2CIntrMaskReg_SPEC, crate::common::RW> {
390        unsafe {
391            crate::common::Reg::<self::I2CIntrMaskReg_SPEC, crate::common::RW>::from_ptr(
392                self._svd2pac_as_ptr().add(48usize),
393            )
394        }
395    }
396
397    #[doc = "I2C Interrupt Status Register"]
398    #[inline(always)]
399    pub const fn i2c_intr_stat_reg(
400        &self,
401    ) -> &'static crate::common::Reg<self::I2CIntrStatReg_SPEC, crate::common::RW> {
402        unsafe {
403            crate::common::Reg::<self::I2CIntrStatReg_SPEC, crate::common::RW>::from_ptr(
404                self._svd2pac_as_ptr().add(44usize),
405            )
406        }
407    }
408
409    #[doc = "I2C Raw Interrupt Status Register"]
410    #[inline(always)]
411    pub const fn i2c_raw_intr_stat_reg(
412        &self,
413    ) -> &'static crate::common::Reg<self::I2CRawIntrStatReg_SPEC, crate::common::RW> {
414        unsafe {
415            crate::common::Reg::<self::I2CRawIntrStatReg_SPEC, crate::common::RW>::from_ptr(
416                self._svd2pac_as_ptr().add(52usize),
417            )
418        }
419    }
420
421    #[doc = "I2C Receive FIFO Level Register"]
422    #[inline(always)]
423    pub const fn i2c_rxflr_reg(
424        &self,
425    ) -> &'static crate::common::Reg<self::I2CRxflrReg_SPEC, crate::common::RW> {
426        unsafe {
427            crate::common::Reg::<self::I2CRxflrReg_SPEC, crate::common::RW>::from_ptr(
428                self._svd2pac_as_ptr().add(120usize),
429            )
430        }
431    }
432
433    #[doc = "I2C Receive FIFO Threshold Register"]
434    #[inline(always)]
435    pub const fn i2c_rx_tl_reg(
436        &self,
437    ) -> &'static crate::common::Reg<self::I2CRxTlReg_SPEC, crate::common::RW> {
438        unsafe {
439            crate::common::Reg::<self::I2CRxTlReg_SPEC, crate::common::RW>::from_ptr(
440                self._svd2pac_as_ptr().add(56usize),
441            )
442        }
443    }
444
445    #[doc = "I2C Slave Address Register"]
446    #[inline(always)]
447    pub const fn i2c_sar_reg(
448        &self,
449    ) -> &'static crate::common::Reg<self::I2CSarReg_SPEC, crate::common::RW> {
450        unsafe {
451            crate::common::Reg::<self::I2CSarReg_SPEC, crate::common::RW>::from_ptr(
452                self._svd2pac_as_ptr().add(8usize),
453            )
454        }
455    }
456
457    #[doc = "I2C SDA Hold Time Length Register"]
458    #[inline(always)]
459    pub const fn i2c_sda_hold_reg(
460        &self,
461    ) -> &'static crate::common::Reg<self::I2CSdaHoldReg_SPEC, crate::common::RW> {
462        unsafe {
463            crate::common::Reg::<self::I2CSdaHoldReg_SPEC, crate::common::RW>::from_ptr(
464                self._svd2pac_as_ptr().add(124usize),
465            )
466        }
467    }
468
469    #[doc = "I2C SDA Setup Register"]
470    #[inline(always)]
471    pub const fn i2c_sda_setup_reg(
472        &self,
473    ) -> &'static crate::common::Reg<self::I2CSdaSetupReg_SPEC, crate::common::RW> {
474        unsafe {
475            crate::common::Reg::<self::I2CSdaSetupReg_SPEC, crate::common::RW>::from_ptr(
476                self._svd2pac_as_ptr().add(148usize),
477            )
478        }
479    }
480
481    #[doc = "Standard Speed I2C Clock SCL High Count Register"]
482    #[inline(always)]
483    pub const fn i2c_ss_scl_hcnt_reg(
484        &self,
485    ) -> &'static crate::common::Reg<self::I2CSsSclHcntReg_SPEC, crate::common::RW> {
486        unsafe {
487            crate::common::Reg::<self::I2CSsSclHcntReg_SPEC, crate::common::RW>::from_ptr(
488                self._svd2pac_as_ptr().add(20usize),
489            )
490        }
491    }
492
493    #[doc = "Standard Speed I2C Clock SCL Low Count Register"]
494    #[inline(always)]
495    pub const fn i2c_ss_scl_lcnt_reg(
496        &self,
497    ) -> &'static crate::common::Reg<self::I2CSsSclLcntReg_SPEC, crate::common::RW> {
498        unsafe {
499            crate::common::Reg::<self::I2CSsSclLcntReg_SPEC, crate::common::RW>::from_ptr(
500                self._svd2pac_as_ptr().add(24usize),
501            )
502        }
503    }
504
505    #[doc = "I2C Status Register"]
506    #[inline(always)]
507    pub const fn i2c_status_reg(
508        &self,
509    ) -> &'static crate::common::Reg<self::I2CStatusReg_SPEC, crate::common::RW> {
510        unsafe {
511            crate::common::Reg::<self::I2CStatusReg_SPEC, crate::common::RW>::from_ptr(
512                self._svd2pac_as_ptr().add(112usize),
513            )
514        }
515    }
516
517    #[doc = "I2C Target Address Register"]
518    #[inline(always)]
519    pub const fn i2c_tar_reg(
520        &self,
521    ) -> &'static crate::common::Reg<self::I2CTarReg_SPEC, crate::common::RW> {
522        unsafe {
523            crate::common::Reg::<self::I2CTarReg_SPEC, crate::common::RW>::from_ptr(
524                self._svd2pac_as_ptr().add(4usize),
525            )
526        }
527    }
528
529    #[doc = "I2C Transmit FIFO Level Register"]
530    #[inline(always)]
531    pub const fn i2c_txflr_reg(
532        &self,
533    ) -> &'static crate::common::Reg<self::I2CTxflrReg_SPEC, crate::common::RW> {
534        unsafe {
535            crate::common::Reg::<self::I2CTxflrReg_SPEC, crate::common::RW>::from_ptr(
536                self._svd2pac_as_ptr().add(116usize),
537            )
538        }
539    }
540
541    #[doc = "I2C Transmit Abort Source Register"]
542    #[inline(always)]
543    pub const fn i2c_tx_abrt_source_reg(
544        &self,
545    ) -> &'static crate::common::Reg<self::I2CTxAbrtSourceReg_SPEC, crate::common::RW> {
546        unsafe {
547            crate::common::Reg::<self::I2CTxAbrtSourceReg_SPEC, crate::common::RW>::from_ptr(
548                self._svd2pac_as_ptr().add(128usize),
549            )
550        }
551    }
552
553    #[doc = "I2C Transmit FIFO Threshold Register"]
554    #[inline(always)]
555    pub const fn i2c_tx_tl_reg(
556        &self,
557    ) -> &'static crate::common::Reg<self::I2CTxTlReg_SPEC, crate::common::RW> {
558        unsafe {
559            crate::common::Reg::<self::I2CTxTlReg_SPEC, crate::common::RW>::from_ptr(
560                self._svd2pac_as_ptr().add(60usize),
561            )
562        }
563    }
564}
565#[doc(hidden)]
566#[derive(Copy, Clone, Eq, PartialEq)]
567pub struct I2CAckGeneralCallReg_SPEC;
568impl crate::sealed::RegSpec for I2CAckGeneralCallReg_SPEC {
569    type DataType = u32;
570}
571
572#[doc = "I2C ACK General Call Register"]
573pub type I2CAckGeneralCallReg = crate::RegValueT<I2CAckGeneralCallReg_SPEC>;
574
575impl I2CAckGeneralCallReg {
576    #[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.\n1 = Generate ACK for a General Call\n0 = Generate NACK for General Call"]
577    #[inline(always)]
578    pub fn ack_gen_call(
579        self,
580    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CAckGeneralCallReg_SPEC, crate::common::RW>
581    {
582        crate::common::RegisterFieldBool::<0,1,0,I2CAckGeneralCallReg_SPEC,crate::common::RW>::from_register(self,0)
583    }
584}
585impl ::core::default::Default for I2CAckGeneralCallReg {
586    #[inline(always)]
587    fn default() -> I2CAckGeneralCallReg {
588        <crate::RegValueT<I2CAckGeneralCallReg_SPEC> as RegisterValue<_>>::new(0)
589    }
590}
591
592#[doc(hidden)]
593#[derive(Copy, Clone, Eq, PartialEq)]
594pub struct I2CClrActivityReg_SPEC;
595impl crate::sealed::RegSpec for I2CClrActivityReg_SPEC {
596    type DataType = u32;
597}
598
599#[doc = "Clear ACTIVITY Interrupt Register"]
600pub type I2CClrActivityReg = crate::RegValueT<I2CClrActivityReg_SPEC>;
601
602impl I2CClrActivityReg {
603    #[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"]
604    #[inline(always)]
605    pub fn clr_activity(
606        self,
607    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrActivityReg_SPEC, crate::common::R> {
608        crate::common::RegisterFieldBool::<0,1,0,I2CClrActivityReg_SPEC,crate::common::R>::from_register(self,0)
609    }
610}
611impl ::core::default::Default for I2CClrActivityReg {
612    #[inline(always)]
613    fn default() -> I2CClrActivityReg {
614        <crate::RegValueT<I2CClrActivityReg_SPEC> as RegisterValue<_>>::new(0)
615    }
616}
617
618#[doc(hidden)]
619#[derive(Copy, Clone, Eq, PartialEq)]
620pub struct I2CClrGenCallReg_SPEC;
621impl crate::sealed::RegSpec for I2CClrGenCallReg_SPEC {
622    type DataType = u32;
623}
624
625#[doc = "Clear GEN_CALL Interrupt Register"]
626pub type I2CClrGenCallReg = crate::RegValueT<I2CClrGenCallReg_SPEC>;
627
628impl I2CClrGenCallReg {
629    #[doc = "Read this register to clear the GEN_CALL interrupt (bit 11) of\nI2C_RAW_INTR_STAT register."]
630    #[inline(always)]
631    pub fn clr_gen_call(
632        self,
633    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrGenCallReg_SPEC, crate::common::R> {
634        crate::common::RegisterFieldBool::<0,1,0,I2CClrGenCallReg_SPEC,crate::common::R>::from_register(self,0)
635    }
636}
637impl ::core::default::Default for I2CClrGenCallReg {
638    #[inline(always)]
639    fn default() -> I2CClrGenCallReg {
640        <crate::RegValueT<I2CClrGenCallReg_SPEC> as RegisterValue<_>>::new(0)
641    }
642}
643
644#[doc(hidden)]
645#[derive(Copy, Clone, Eq, PartialEq)]
646pub struct I2CClrIntrReg_SPEC;
647impl crate::sealed::RegSpec for I2CClrIntrReg_SPEC {
648    type DataType = u32;
649}
650
651#[doc = "Clear Combined and Individual Interrupt Register"]
652pub type I2CClrIntrReg = crate::RegValueT<I2CClrIntrReg_SPEC>;
653
654impl I2CClrIntrReg {
655    #[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"]
656    #[inline(always)]
657    pub fn clr_intr(
658        self,
659    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrIntrReg_SPEC, crate::common::R> {
660        crate::common::RegisterFieldBool::<0,1,0,I2CClrIntrReg_SPEC,crate::common::R>::from_register(self,0)
661    }
662}
663impl ::core::default::Default for I2CClrIntrReg {
664    #[inline(always)]
665    fn default() -> I2CClrIntrReg {
666        <crate::RegValueT<I2CClrIntrReg_SPEC> as RegisterValue<_>>::new(0)
667    }
668}
669
670#[doc(hidden)]
671#[derive(Copy, Clone, Eq, PartialEq)]
672pub struct I2CClrRdReqReg_SPEC;
673impl crate::sealed::RegSpec for I2CClrRdReqReg_SPEC {
674    type DataType = u32;
675}
676
677#[doc = "Clear RD_REQ Interrupt Register"]
678pub type I2CClrRdReqReg = crate::RegValueT<I2CClrRdReqReg_SPEC>;
679
680impl I2CClrRdReqReg {
681    #[doc = "Read this register to clear the RD_REQ interrupt (bit 5) of the I2C_RAW_INTR_STAT register."]
682    #[inline(always)]
683    pub fn clr_rd_req(
684        self,
685    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrRdReqReg_SPEC, crate::common::R> {
686        crate::common::RegisterFieldBool::<0,1,0,I2CClrRdReqReg_SPEC,crate::common::R>::from_register(self,0)
687    }
688}
689impl ::core::default::Default for I2CClrRdReqReg {
690    #[inline(always)]
691    fn default() -> I2CClrRdReqReg {
692        <crate::RegValueT<I2CClrRdReqReg_SPEC> as RegisterValue<_>>::new(0)
693    }
694}
695
696#[doc(hidden)]
697#[derive(Copy, Clone, Eq, PartialEq)]
698pub struct I2CClrRxDoneReg_SPEC;
699impl crate::sealed::RegSpec for I2CClrRxDoneReg_SPEC {
700    type DataType = u32;
701}
702
703#[doc = "Clear RX_DONE Interrupt Register"]
704pub type I2CClrRxDoneReg = crate::RegValueT<I2CClrRxDoneReg_SPEC>;
705
706impl I2CClrRxDoneReg {
707    #[doc = "Read this register to clear the RX_DONE interrupt (bit 7) of the\nI2C_RAW_INTR_STAT register."]
708    #[inline(always)]
709    pub fn clr_rx_done(
710        self,
711    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrRxDoneReg_SPEC, crate::common::R> {
712        crate::common::RegisterFieldBool::<0,1,0,I2CClrRxDoneReg_SPEC,crate::common::R>::from_register(self,0)
713    }
714}
715impl ::core::default::Default for I2CClrRxDoneReg {
716    #[inline(always)]
717    fn default() -> I2CClrRxDoneReg {
718        <crate::RegValueT<I2CClrRxDoneReg_SPEC> as RegisterValue<_>>::new(0)
719    }
720}
721
722#[doc(hidden)]
723#[derive(Copy, Clone, Eq, PartialEq)]
724pub struct I2CClrRxOverReg_SPEC;
725impl crate::sealed::RegSpec for I2CClrRxOverReg_SPEC {
726    type DataType = u32;
727}
728
729#[doc = "Clear RX_OVER Interrupt Register"]
730pub type I2CClrRxOverReg = crate::RegValueT<I2CClrRxOverReg_SPEC>;
731
732impl I2CClrRxOverReg {
733    #[doc = "Read this register to clear the RX_OVER interrupt (bit 1) of the\nI2C_RAW_INTR_STAT register."]
734    #[inline(always)]
735    pub fn clr_rx_over(
736        self,
737    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrRxOverReg_SPEC, crate::common::R> {
738        crate::common::RegisterFieldBool::<0,1,0,I2CClrRxOverReg_SPEC,crate::common::R>::from_register(self,0)
739    }
740}
741impl ::core::default::Default for I2CClrRxOverReg {
742    #[inline(always)]
743    fn default() -> I2CClrRxOverReg {
744        <crate::RegValueT<I2CClrRxOverReg_SPEC> as RegisterValue<_>>::new(0)
745    }
746}
747
748#[doc(hidden)]
749#[derive(Copy, Clone, Eq, PartialEq)]
750pub struct I2CClrRxUnderReg_SPEC;
751impl crate::sealed::RegSpec for I2CClrRxUnderReg_SPEC {
752    type DataType = u32;
753}
754
755#[doc = "Clear RX_UNDER Interrupt Register"]
756pub type I2CClrRxUnderReg = crate::RegValueT<I2CClrRxUnderReg_SPEC>;
757
758impl I2CClrRxUnderReg {
759    #[doc = "Read this register to clear the RX_UNDER interrupt (bit 0) of the\nI2C_RAW_INTR_STAT register."]
760    #[inline(always)]
761    pub fn clr_rx_under(
762        self,
763    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrRxUnderReg_SPEC, crate::common::R> {
764        crate::common::RegisterFieldBool::<0,1,0,I2CClrRxUnderReg_SPEC,crate::common::R>::from_register(self,0)
765    }
766}
767impl ::core::default::Default for I2CClrRxUnderReg {
768    #[inline(always)]
769    fn default() -> I2CClrRxUnderReg {
770        <crate::RegValueT<I2CClrRxUnderReg_SPEC> as RegisterValue<_>>::new(0)
771    }
772}
773
774#[doc(hidden)]
775#[derive(Copy, Clone, Eq, PartialEq)]
776pub struct I2CClrStartDetReg_SPEC;
777impl crate::sealed::RegSpec for I2CClrStartDetReg_SPEC {
778    type DataType = u32;
779}
780
781#[doc = "Clear START_DET Interrupt Register"]
782pub type I2CClrStartDetReg = crate::RegValueT<I2CClrStartDetReg_SPEC>;
783
784impl I2CClrStartDetReg {
785    #[doc = "Read this register to clear the START_DET interrupt (bit 10) of the IC_RAW_INTR_STAT register."]
786    #[inline(always)]
787    pub fn clr_start_det(
788        self,
789    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrStartDetReg_SPEC, crate::common::R> {
790        crate::common::RegisterFieldBool::<0,1,0,I2CClrStartDetReg_SPEC,crate::common::R>::from_register(self,0)
791    }
792}
793impl ::core::default::Default for I2CClrStartDetReg {
794    #[inline(always)]
795    fn default() -> I2CClrStartDetReg {
796        <crate::RegValueT<I2CClrStartDetReg_SPEC> as RegisterValue<_>>::new(0)
797    }
798}
799
800#[doc(hidden)]
801#[derive(Copy, Clone, Eq, PartialEq)]
802pub struct I2CClrStopDetReg_SPEC;
803impl crate::sealed::RegSpec for I2CClrStopDetReg_SPEC {
804    type DataType = u32;
805}
806
807#[doc = "Clear STOP_DET Interrupt Register"]
808pub type I2CClrStopDetReg = crate::RegValueT<I2CClrStopDetReg_SPEC>;
809
810impl I2CClrStopDetReg {
811    #[doc = "Read this register to clear the STOP_DET interrupt (bit 9) of the IC_RAW_INTR_STAT register."]
812    #[inline(always)]
813    pub fn clr_stop_det(
814        self,
815    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrStopDetReg_SPEC, crate::common::R> {
816        crate::common::RegisterFieldBool::<0,1,0,I2CClrStopDetReg_SPEC,crate::common::R>::from_register(self,0)
817    }
818}
819impl ::core::default::Default for I2CClrStopDetReg {
820    #[inline(always)]
821    fn default() -> I2CClrStopDetReg {
822        <crate::RegValueT<I2CClrStopDetReg_SPEC> as RegisterValue<_>>::new(0)
823    }
824}
825
826#[doc(hidden)]
827#[derive(Copy, Clone, Eq, PartialEq)]
828pub struct I2CClrTxAbrtReg_SPEC;
829impl crate::sealed::RegSpec for I2CClrTxAbrtReg_SPEC {
830    type DataType = u32;
831}
832
833#[doc = "Clear TX_ABRT Interrupt Register"]
834pub type I2CClrTxAbrtReg = crate::RegValueT<I2CClrTxAbrtReg_SPEC>;
835
836impl I2CClrTxAbrtReg {
837    #[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."]
838    #[inline(always)]
839    pub fn clr_tx_abrt(
840        self,
841    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrTxAbrtReg_SPEC, crate::common::R> {
842        crate::common::RegisterFieldBool::<0,1,0,I2CClrTxAbrtReg_SPEC,crate::common::R>::from_register(self,0)
843    }
844}
845impl ::core::default::Default for I2CClrTxAbrtReg {
846    #[inline(always)]
847    fn default() -> I2CClrTxAbrtReg {
848        <crate::RegValueT<I2CClrTxAbrtReg_SPEC> as RegisterValue<_>>::new(0)
849    }
850}
851
852#[doc(hidden)]
853#[derive(Copy, Clone, Eq, PartialEq)]
854pub struct I2CClrTxOverReg_SPEC;
855impl crate::sealed::RegSpec for I2CClrTxOverReg_SPEC {
856    type DataType = u32;
857}
858
859#[doc = "Clear TX_OVER Interrupt Register"]
860pub type I2CClrTxOverReg = crate::RegValueT<I2CClrTxOverReg_SPEC>;
861
862impl I2CClrTxOverReg {
863    #[doc = "Read this register to clear the TX_OVER interrupt (bit 3) of the I2C_RAW_INTR_STAT register."]
864    #[inline(always)]
865    pub fn clr_tx_over(
866        self,
867    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CClrTxOverReg_SPEC, crate::common::R> {
868        crate::common::RegisterFieldBool::<0,1,0,I2CClrTxOverReg_SPEC,crate::common::R>::from_register(self,0)
869    }
870}
871impl ::core::default::Default for I2CClrTxOverReg {
872    #[inline(always)]
873    fn default() -> I2CClrTxOverReg {
874        <crate::RegValueT<I2CClrTxOverReg_SPEC> as RegisterValue<_>>::new(0)
875    }
876}
877
878#[doc(hidden)]
879#[derive(Copy, Clone, Eq, PartialEq)]
880pub struct I2CCompParam1Reg_SPEC;
881impl crate::sealed::RegSpec for I2CCompParam1Reg_SPEC {
882    type DataType = u32;
883}
884
885#[doc = "Component Parameter Register"]
886pub type I2CCompParam1Reg = crate::RegValueT<I2CCompParam1Reg_SPEC>;
887
888impl I2CCompParam1Reg {
889    #[doc = "This is a constant read-only register that contains encoded information about the component\'s parameter settings."]
890    #[inline(always)]
891    pub fn ic_comp_param1(
892        self,
893    ) -> crate::common::RegisterField<
894        0,
895        0xffffffff,
896        1,
897        0,
898        u32,
899        u32,
900        I2CCompParam1Reg_SPEC,
901        crate::common::R,
902    > {
903        crate::common::RegisterField::<
904            0,
905            0xffffffff,
906            1,
907            0,
908            u32,
909            u32,
910            I2CCompParam1Reg_SPEC,
911            crate::common::R,
912        >::from_register(self, 0)
913    }
914}
915impl ::core::default::Default for I2CCompParam1Reg {
916    #[inline(always)]
917    fn default() -> I2CCompParam1Reg {
918        <crate::RegValueT<I2CCompParam1Reg_SPEC> as RegisterValue<_>>::new(0)
919    }
920}
921
922#[doc(hidden)]
923#[derive(Copy, Clone, Eq, PartialEq)]
924pub struct I2CCompTypeReg_SPEC;
925impl crate::sealed::RegSpec for I2CCompTypeReg_SPEC {
926    type DataType = u32;
927}
928
929#[doc = "I2C Component Type Register"]
930pub type I2CCompTypeReg = crate::RegValueT<I2CCompTypeReg_SPEC>;
931
932impl I2CCompTypeReg {
933    #[inline(always)]
934    pub fn ic_comp_type(
935        self,
936    ) -> crate::common::RegisterField<
937        0,
938        0xffffffff,
939        1,
940        0,
941        u32,
942        u32,
943        I2CCompTypeReg_SPEC,
944        crate::common::R,
945    > {
946        crate::common::RegisterField::<
947            0,
948            0xffffffff,
949            1,
950            0,
951            u32,
952            u32,
953            I2CCompTypeReg_SPEC,
954            crate::common::R,
955        >::from_register(self, 0)
956    }
957}
958impl ::core::default::Default for I2CCompTypeReg {
959    #[inline(always)]
960    fn default() -> I2CCompTypeReg {
961        <crate::RegValueT<I2CCompTypeReg_SPEC> as RegisterValue<_>>::new(1146552640)
962    }
963}
964
965#[doc(hidden)]
966#[derive(Copy, Clone, Eq, PartialEq)]
967pub struct I2CCompVersionReg_SPEC;
968impl crate::sealed::RegSpec for I2CCompVersionReg_SPEC {
969    type DataType = u32;
970}
971
972#[doc = "I2C Component Version Register"]
973pub type I2CCompVersionReg = crate::RegValueT<I2CCompVersionReg_SPEC>;
974
975impl I2CCompVersionReg {
976    #[inline(always)]
977    pub fn ic_comp_version(
978        self,
979    ) -> crate::common::RegisterField<
980        0,
981        0xffffffff,
982        1,
983        0,
984        u32,
985        u32,
986        I2CCompVersionReg_SPEC,
987        crate::common::R,
988    > {
989        crate::common::RegisterField::<
990            0,
991            0xffffffff,
992            1,
993            0,
994            u32,
995            u32,
996            I2CCompVersionReg_SPEC,
997            crate::common::R,
998        >::from_register(self, 0)
999    }
1000}
1001impl ::core::default::Default for I2CCompVersionReg {
1002    #[inline(always)]
1003    fn default() -> I2CCompVersionReg {
1004        <crate::RegValueT<I2CCompVersionReg_SPEC> as RegisterValue<_>>::new(842019370)
1005    }
1006}
1007
1008#[doc(hidden)]
1009#[derive(Copy, Clone, Eq, PartialEq)]
1010pub struct I2CConReg_SPEC;
1011impl crate::sealed::RegSpec for I2CConReg_SPEC {
1012    type DataType = u32;
1013}
1014
1015#[doc = "I2C Control Register"]
1016pub type I2CConReg = crate::RegValueT<I2CConReg_SPEC>;
1017
1018impl I2CConReg {
1019    #[doc = "In Master mode:\n1 = issues the STOP_DET interrupt only when master is active.\n0 = issues the STOP_DET irrespective of whether master is active or not."]
1020    #[inline(always)]
1021    pub fn i2c_stop_det_if_master_active(
1022        self,
1023    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CConReg_SPEC, crate::common::R> {
1024        crate::common::RegisterFieldBool::<10,1,0,I2CConReg_SPEC,crate::common::R>::from_register(self,0)
1025    }
1026
1027    #[doc = "This bit controls whether DW_apb_i2c should hold the bus when the Rx FIFO is physically full to its RX_BUFFER_DEPTH\n1 = Hold bus when RX_FIFO is full\n0 = Overflow when RX_FIFO is full"]
1028    #[inline(always)]
1029    pub fn i2c_rx_fifo_full_hld_ctrl(
1030        self,
1031    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1032        crate::common::RegisterFieldBool::<9,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1033    }
1034
1035    #[doc = "This bit controls the generation of the TX_EMPTY interrupt, as described in the IC_RAW_INTR_STAT register.\n1 = Controlled generation of TX_EMPTY interrupt\n0 = Default behaviour of TX_EMPTY interrupt"]
1036    #[inline(always)]
1037    pub fn i2c_tx_empty_ctrl(
1038        self,
1039    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1040        crate::common::RegisterFieldBool::<8,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1041    }
1042
1043    #[doc = "1 = slave issues STOP_DET intr only if addressed\n0 = slave issues STOP_DET intr always\nDuring a general call address, this slave does not issue the STOP_DET interrupt if STOP_DET_IF_ADDRESSED = 1\'b1, even if the slave responds to the general call address by generating ACK. The STOP_DET interrupt is generated only when the transmitted address matches the slave address (SAR)."]
1044    #[inline(always)]
1045    pub fn i2c_stop_det_ifaddressed(
1046        self,
1047    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1048        crate::common::RegisterFieldBool::<7,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1049    }
1050
1051    #[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\'."]
1052    #[inline(always)]
1053    pub fn i2c_slave_disable(
1054        self,
1055    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1056        crate::common::RegisterFieldBool::<6,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1057    }
1058
1059    #[doc = "Determines whether RESTART conditions may be sent when acting as a master\n0= disable\n1=enable"]
1060    #[inline(always)]
1061    pub fn i2c_restart_en(
1062        self,
1063    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1064        crate::common::RegisterFieldBool::<5,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1065    }
1066
1067    #[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"]
1068    #[inline(always)]
1069    pub fn i2c_10bitaddr_master(
1070        self,
1071    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1072        crate::common::RegisterFieldBool::<4,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1073    }
1074
1075    #[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"]
1076    #[inline(always)]
1077    pub fn i2c_10bitaddr_slave(
1078        self,
1079    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1080        crate::common::RegisterFieldBool::<3,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1081    }
1082
1083    #[doc = "These bits control at which speed the controller operates.\n1= standard mode (100 kbit/s)\n2= fast mode (400 kbit/s)\n3= high speed mode"]
1084    #[inline(always)]
1085    pub fn i2c_speed(
1086        self,
1087    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, I2CConReg_SPEC, crate::common::RW> {
1088        crate::common::RegisterField::<1,0x3,1,0,u8,u8,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1089    }
1090
1091    #[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\'."]
1092    #[inline(always)]
1093    pub fn i2c_master_mode(
1094        self,
1095    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CConReg_SPEC, crate::common::RW> {
1096        crate::common::RegisterFieldBool::<0,1,0,I2CConReg_SPEC,crate::common::RW>::from_register(self,0)
1097    }
1098}
1099impl ::core::default::Default for I2CConReg {
1100    #[inline(always)]
1101    fn default() -> I2CConReg {
1102        <crate::RegValueT<I2CConReg_SPEC> as RegisterValue<_>>::new(127)
1103    }
1104}
1105
1106#[doc(hidden)]
1107#[derive(Copy, Clone, Eq, PartialEq)]
1108pub struct I2CDataCmdReg_SPEC;
1109impl crate::sealed::RegSpec for I2CDataCmdReg_SPEC {
1110    type DataType = u32;
1111}
1112
1113#[doc = "I2C Rx/Tx Data Buffer and Command Register"]
1114pub type I2CDataCmdReg = crate::RegValueT<I2CDataCmdReg_SPEC>;
1115
1116impl I2CDataCmdReg {
1117    #[doc = "This bit controls whether a RESTART is issued before the byte is sent or received. \n1 = 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.\n0 = 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."]
1118    #[inline(always)]
1119    pub fn i2c_restart(
1120        self,
1121    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CDataCmdReg_SPEC, crate::common::W> {
1122        crate::common::RegisterFieldBool::<10,1,0,I2CDataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1123    }
1124
1125    #[doc = "This bit controls whether a STOP is issued after the byte is sent or received.\n1 = 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.\n0 = 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."]
1126    #[inline(always)]
1127    pub fn i2c_stop(
1128        self,
1129    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CDataCmdReg_SPEC, crate::common::W> {
1130        crate::common::RegisterFieldBool::<9,1,0,I2CDataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1131    }
1132
1133    #[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"]
1134    #[inline(always)]
1135    pub fn i2c_cmd(
1136        self,
1137    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CDataCmdReg_SPEC, crate::common::W> {
1138        crate::common::RegisterFieldBool::<8,1,0,I2CDataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1139    }
1140
1141    #[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."]
1142    #[inline(always)]
1143    pub fn i2c_dat(
1144        self,
1145    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2CDataCmdReg_SPEC, crate::common::RW>
1146    {
1147        crate::common::RegisterField::<0,0xff,1,0,u8,u8,I2CDataCmdReg_SPEC,crate::common::RW>::from_register(self,0)
1148    }
1149}
1150impl ::core::default::Default for I2CDataCmdReg {
1151    #[inline(always)]
1152    fn default() -> I2CDataCmdReg {
1153        <crate::RegValueT<I2CDataCmdReg_SPEC> as RegisterValue<_>>::new(0)
1154    }
1155}
1156
1157#[doc(hidden)]
1158#[derive(Copy, Clone, Eq, PartialEq)]
1159pub struct I2CDmaCrReg_SPEC;
1160impl crate::sealed::RegSpec for I2CDmaCrReg_SPEC {
1161    type DataType = u32;
1162}
1163
1164#[doc = "DMA Control Register"]
1165pub type I2CDmaCrReg = crate::RegValueT<I2CDmaCrReg_SPEC>;
1166
1167impl I2CDmaCrReg {
1168    #[doc = "Transmit DMA Enable. //This bit enables/disables the transmit FIFO DMA channel.\n0 = Transmit DMA disabled\n1 = Transmit DMA enabled"]
1169    #[inline(always)]
1170    pub fn tdmae(
1171        self,
1172    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CDmaCrReg_SPEC, crate::common::RW> {
1173        crate::common::RegisterFieldBool::<1,1,0,I2CDmaCrReg_SPEC,crate::common::RW>::from_register(self,0)
1174    }
1175
1176    #[doc = "Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel.\n0 = Receive DMA disabled\n1 = Receive DMA enabled"]
1177    #[inline(always)]
1178    pub fn rdmae(
1179        self,
1180    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CDmaCrReg_SPEC, crate::common::RW> {
1181        crate::common::RegisterFieldBool::<0,1,0,I2CDmaCrReg_SPEC,crate::common::RW>::from_register(self,0)
1182    }
1183}
1184impl ::core::default::Default for I2CDmaCrReg {
1185    #[inline(always)]
1186    fn default() -> I2CDmaCrReg {
1187        <crate::RegValueT<I2CDmaCrReg_SPEC> as RegisterValue<_>>::new(0)
1188    }
1189}
1190
1191#[doc(hidden)]
1192#[derive(Copy, Clone, Eq, PartialEq)]
1193pub struct I2CDmaRdlrReg_SPEC;
1194impl crate::sealed::RegSpec for I2CDmaRdlrReg_SPEC {
1195    type DataType = u32;
1196}
1197
1198#[doc = "I2C Receive Data Level Register"]
1199pub type I2CDmaRdlrReg = crate::RegValueT<I2CDmaRdlrReg_SPEC>;
1200
1201impl I2CDmaRdlrReg {
1202    #[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."]
1203    #[inline(always)]
1204    pub fn dmardl(
1205        self,
1206    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2CDmaRdlrReg_SPEC, crate::common::RW>
1207    {
1208        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2CDmaRdlrReg_SPEC,crate::common::RW>::from_register(self,0)
1209    }
1210}
1211impl ::core::default::Default for I2CDmaRdlrReg {
1212    #[inline(always)]
1213    fn default() -> I2CDmaRdlrReg {
1214        <crate::RegValueT<I2CDmaRdlrReg_SPEC> as RegisterValue<_>>::new(0)
1215    }
1216}
1217
1218#[doc(hidden)]
1219#[derive(Copy, Clone, Eq, PartialEq)]
1220pub struct I2CDmaTdlrReg_SPEC;
1221impl crate::sealed::RegSpec for I2CDmaTdlrReg_SPEC {
1222    type DataType = u32;
1223}
1224
1225#[doc = "DMA Transmit Data Level Register"]
1226pub type I2CDmaTdlrReg = crate::RegValueT<I2CDmaTdlrReg_SPEC>;
1227
1228impl I2CDmaTdlrReg {
1229    #[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."]
1230    #[inline(always)]
1231    pub fn dmatdl(
1232        self,
1233    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2CDmaTdlrReg_SPEC, crate::common::RW>
1234    {
1235        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2CDmaTdlrReg_SPEC,crate::common::RW>::from_register(self,0)
1236    }
1237}
1238impl ::core::default::Default for I2CDmaTdlrReg {
1239    #[inline(always)]
1240    fn default() -> I2CDmaTdlrReg {
1241        <crate::RegValueT<I2CDmaTdlrReg_SPEC> as RegisterValue<_>>::new(0)
1242    }
1243}
1244
1245#[doc(hidden)]
1246#[derive(Copy, Clone, Eq, PartialEq)]
1247pub struct I2CEnableReg_SPEC;
1248impl crate::sealed::RegSpec for I2CEnableReg_SPEC {
1249    type DataType = u32;
1250}
1251
1252#[doc = "I2C Enable Register"]
1253pub type I2CEnableReg = crate::RegValueT<I2CEnableReg_SPEC>;
1254
1255impl I2CEnableReg {
1256    #[doc = "In Master mode:\n1 = Blocks the transmission of data on I2C bus even if Tx FIFO has data to transmit.\n0.= The transmission of data starts on I2C bus automatically, as soon as the first data is available in the Tx FIFO."]
1257    #[inline(always)]
1258    pub fn i2c_tx_cmd_block(
1259        self,
1260    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CEnableReg_SPEC, crate::common::RW> {
1261        crate::common::RegisterFieldBool::<2,1,0,I2CEnableReg_SPEC,crate::common::RW>::from_register(self,0)
1262    }
1263
1264    #[doc = "The 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 an 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."]
1265    #[inline(always)]
1266    pub fn i2c_abort(
1267        self,
1268    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CEnableReg_SPEC, crate::common::RW> {
1269        crate::common::RegisterFieldBool::<1,1,0,I2CEnableReg_SPEC,crate::common::RW>::from_register(self,0)
1270    }
1271
1272    #[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"]
1273    #[inline(always)]
1274    pub fn i2c_en(
1275        self,
1276    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CEnableReg_SPEC, crate::common::RW> {
1277        crate::common::RegisterFieldBool::<0,1,0,I2CEnableReg_SPEC,crate::common::RW>::from_register(self,0)
1278    }
1279}
1280impl ::core::default::Default for I2CEnableReg {
1281    #[inline(always)]
1282    fn default() -> I2CEnableReg {
1283        <crate::RegValueT<I2CEnableReg_SPEC> as RegisterValue<_>>::new(0)
1284    }
1285}
1286
1287#[doc(hidden)]
1288#[derive(Copy, Clone, Eq, PartialEq)]
1289pub struct I2CEnableStatusReg_SPEC;
1290impl crate::sealed::RegSpec for I2CEnableStatusReg_SPEC {
1291    type DataType = u32;
1292}
1293
1294#[doc = "I2C Enable Status Register"]
1295pub type I2CEnableStatusReg = crate::RegValueT<I2CEnableStatusReg_SPEC>;
1296
1297impl I2CEnableStatusReg {
1298    #[doc = "Slave Received Data Lost. This bit indicates if a Slave-Receiver operation 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. When 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.\n1 = Slave RX Data is lost\n0 = Slave RX Data is not lost"]
1299    #[inline(always)]
1300    pub fn slv_rx_data_lost(
1301        self,
1302    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CEnableStatusReg_SPEC, crate::common::R> {
1303        crate::common::RegisterFieldBool::<2,1,0,I2CEnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1304    }
1305
1306    #[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.\n1 =Slave is disabled when it is active\n0 =Slave is disabled when it is idle"]
1307    #[inline(always)]
1308    pub fn slv_disabled_while_busy(
1309        self,
1310    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CEnableStatusReg_SPEC, crate::common::R> {
1311        crate::common::RegisterFieldBool::<1,1,0,I2CEnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1312    }
1313
1314    #[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).\n1 = I2C enabled\n0 =I2C disabled"]
1315    #[inline(always)]
1316    pub fn ic_en(
1317        self,
1318    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CEnableStatusReg_SPEC, crate::common::R> {
1319        crate::common::RegisterFieldBool::<0,1,0,I2CEnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1320    }
1321}
1322impl ::core::default::Default for I2CEnableStatusReg {
1323    #[inline(always)]
1324    fn default() -> I2CEnableStatusReg {
1325        <crate::RegValueT<I2CEnableStatusReg_SPEC> as RegisterValue<_>>::new(0)
1326    }
1327}
1328
1329#[doc(hidden)]
1330#[derive(Copy, Clone, Eq, PartialEq)]
1331pub struct I2CFsSclHcntReg_SPEC;
1332impl crate::sealed::RegSpec for I2CFsSclHcntReg_SPEC {
1333    type DataType = u32;
1334}
1335
1336#[doc = "Fast Speed I2C Clock SCL High Count Register"]
1337pub type I2CFsSclHcntReg = crate::RegValueT<I2CFsSclHcntReg_SPEC>;
1338
1339impl I2CFsSclHcntReg {
1340    #[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."]
1341    #[inline(always)]
1342    pub fn ic_fs_scl_hcnt(
1343        self,
1344    ) -> crate::common::RegisterField<
1345        0,
1346        0xffff,
1347        1,
1348        0,
1349        u16,
1350        u16,
1351        I2CFsSclHcntReg_SPEC,
1352        crate::common::RW,
1353    > {
1354        crate::common::RegisterField::<
1355            0,
1356            0xffff,
1357            1,
1358            0,
1359            u16,
1360            u16,
1361            I2CFsSclHcntReg_SPEC,
1362            crate::common::RW,
1363        >::from_register(self, 0)
1364    }
1365}
1366impl ::core::default::Default for I2CFsSclHcntReg {
1367    #[inline(always)]
1368    fn default() -> I2CFsSclHcntReg {
1369        <crate::RegValueT<I2CFsSclHcntReg_SPEC> as RegisterValue<_>>::new(26)
1370    }
1371}
1372
1373#[doc(hidden)]
1374#[derive(Copy, Clone, Eq, PartialEq)]
1375pub struct I2CFsSclLcntReg_SPEC;
1376impl crate::sealed::RegSpec for I2CFsSclLcntReg_SPEC {
1377    type DataType = u32;
1378}
1379
1380#[doc = "Fast Speed I2C Clock SCL Low Count Register"]
1381pub type I2CFsSclLcntReg = crate::RegValueT<I2CFsSclLcntReg_SPEC>;
1382
1383impl I2CFsSclLcntReg {
1384    #[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. For designs with APB_DATA_WIDTH = 8 the order of programming is important to ensure the correct operation of the controller. The lower byte must be programmed first. Then the upper byte is programmed."]
1385    #[inline(always)]
1386    pub fn ic_fs_scl_lcnt(
1387        self,
1388    ) -> crate::common::RegisterField<
1389        0,
1390        0xffff,
1391        1,
1392        0,
1393        u16,
1394        u16,
1395        I2CFsSclLcntReg_SPEC,
1396        crate::common::RW,
1397    > {
1398        crate::common::RegisterField::<
1399            0,
1400            0xffff,
1401            1,
1402            0,
1403            u16,
1404            u16,
1405            I2CFsSclLcntReg_SPEC,
1406            crate::common::RW,
1407        >::from_register(self, 0)
1408    }
1409}
1410impl ::core::default::Default for I2CFsSclLcntReg {
1411    #[inline(always)]
1412    fn default() -> I2CFsSclLcntReg {
1413        <crate::RegValueT<I2CFsSclLcntReg_SPEC> as RegisterValue<_>>::new(50)
1414    }
1415}
1416
1417#[doc(hidden)]
1418#[derive(Copy, Clone, Eq, PartialEq)]
1419pub struct I2CHsMaddrReg_SPEC;
1420impl crate::sealed::RegSpec for I2CHsMaddrReg_SPEC {
1421    type DataType = u32;
1422}
1423
1424#[doc = "I2C High Speed Master Mode Code Address Register"]
1425pub type I2CHsMaddrReg = crate::RegValueT<I2CHsMaddrReg_SPEC>;
1426
1427impl I2CHsMaddrReg {
1428    #[doc = "This bit field holds the value of the I2C HS mode master code. HS-mode master codes are reserved 8-bit codes (00001xxx) that are not used for slave addressing or other purposes. Each master has its unique master code; up to eight high-speed mode masters can be present on the same I2C bus system. Valid values are from 0 to 7. This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE\\[0\\] register being set to 0. Writes at other times have no effect."]
1429    #[inline(always)]
1430    pub fn i2c_ic_hs_mar(
1431        self,
1432    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, I2CHsMaddrReg_SPEC, crate::common::RW>
1433    {
1434        crate::common::RegisterField::<0,0x7,1,0,u8,u8,I2CHsMaddrReg_SPEC,crate::common::RW>::from_register(self,0)
1435    }
1436}
1437impl ::core::default::Default for I2CHsMaddrReg {
1438    #[inline(always)]
1439    fn default() -> I2CHsMaddrReg {
1440        <crate::RegValueT<I2CHsMaddrReg_SPEC> as RegisterValue<_>>::new(1)
1441    }
1442}
1443
1444#[doc(hidden)]
1445#[derive(Copy, Clone, Eq, PartialEq)]
1446pub struct I2CHsSclHcntReg_SPEC;
1447impl crate::sealed::RegSpec for I2CHsSclHcntReg_SPEC {
1448    type DataType = u32;
1449}
1450
1451#[doc = "High Speed I2C Clock SCL High Count Register"]
1452pub type I2CHsSclHcntReg = crate::RegValueT<I2CHsSclHcntReg_SPEC>;
1453
1454impl I2CHsSclHcntReg {
1455    #[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 high speed.refer to \"IC_CLK Frequency Configuration\".\nThe SCL High time depends on the loading of the bus. For 100pF loading, the SCL High time is 60ns; for 400pF loading, the SCL High time is 120ns. This register goes away and becomes read-only returning 0s if IC_MAX_SPEED_MODE != high.\nThis register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE\\[0\\] 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. For designs with APB_DATA_WIDTH = 8 the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed."]
1456    #[inline(always)]
1457    pub fn ic_hs_scl_hcnt(
1458        self,
1459    ) -> crate::common::RegisterField<
1460        0,
1461        0xffff,
1462        1,
1463        0,
1464        u16,
1465        u16,
1466        I2CHsSclHcntReg_SPEC,
1467        crate::common::RW,
1468    > {
1469        crate::common::RegisterField::<
1470            0,
1471            0xffff,
1472            1,
1473            0,
1474            u16,
1475            u16,
1476            I2CHsSclHcntReg_SPEC,
1477            crate::common::RW,
1478        >::from_register(self, 0)
1479    }
1480}
1481impl ::core::default::Default for I2CHsSclHcntReg {
1482    #[inline(always)]
1483    fn default() -> I2CHsSclHcntReg {
1484        <crate::RegValueT<I2CHsSclHcntReg_SPEC> as RegisterValue<_>>::new(6)
1485    }
1486}
1487
1488#[doc(hidden)]
1489#[derive(Copy, Clone, Eq, PartialEq)]
1490pub struct I2CHsSclLcntReg_SPEC;
1491impl crate::sealed::RegSpec for I2CHsSclLcntReg_SPEC {
1492    type DataType = u32;
1493}
1494
1495#[doc = "High Speed I2C Clock SCL Low Count Register"]
1496pub type I2CHsSclLcntReg = crate::RegValueT<I2CHsSclLcntReg_SPEC>;
1497
1498impl I2CHsSclLcntReg {
1499    #[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 high speed. For more information, refer to \"IC_CLK Frequency Configuration\".\nThe SCL low time depends on the loading of the bus. For 100pF loading, the SCL low time is 160ns; for 400pF loading, the SCL low time is 320ns. This register goes away and becomes read-only returning 0s if IC_MAX_SPEED_MODE != high.\nThis register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE\\[0\\] 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. For designs with APB_DATA_WIDTH == 8 the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed. If the value is less than 8 then the count value gets changed to 8."]
1500    #[inline(always)]
1501    pub fn ic_hs_scl_lcnt(
1502        self,
1503    ) -> crate::common::RegisterField<
1504        0,
1505        0xffff,
1506        1,
1507        0,
1508        u16,
1509        u16,
1510        I2CHsSclLcntReg_SPEC,
1511        crate::common::RW,
1512    > {
1513        crate::common::RegisterField::<
1514            0,
1515            0xffff,
1516            1,
1517            0,
1518            u16,
1519            u16,
1520            I2CHsSclLcntReg_SPEC,
1521            crate::common::RW,
1522        >::from_register(self, 0)
1523    }
1524}
1525impl ::core::default::Default for I2CHsSclLcntReg {
1526    #[inline(always)]
1527    fn default() -> I2CHsSclLcntReg {
1528        <crate::RegValueT<I2CHsSclLcntReg_SPEC> as RegisterValue<_>>::new(16)
1529    }
1530}
1531
1532#[doc(hidden)]
1533#[derive(Copy, Clone, Eq, PartialEq)]
1534pub struct I2CIcFsSpklenReg_SPEC;
1535impl crate::sealed::RegSpec for I2CIcFsSpklenReg_SPEC {
1536    type DataType = u32;
1537}
1538
1539#[doc = "I2C SS and FS spike suppression limit Size"]
1540pub type I2CIcFsSpklenReg = crate::RegValueT<I2CIcFsSpklenReg_SPEC>;
1541
1542impl I2CIcFsSpklenReg {
1543    #[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."]
1544    #[inline(always)]
1545    pub fn i2c_fs_spklen(
1546        self,
1547    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2CIcFsSpklenReg_SPEC, crate::common::RW>
1548    {
1549        crate::common::RegisterField::<
1550            0,
1551            0xff,
1552            1,
1553            0,
1554            u8,
1555            u8,
1556            I2CIcFsSpklenReg_SPEC,
1557            crate::common::RW,
1558        >::from_register(self, 0)
1559    }
1560}
1561impl ::core::default::Default for I2CIcFsSpklenReg {
1562    #[inline(always)]
1563    fn default() -> I2CIcFsSpklenReg {
1564        <crate::RegValueT<I2CIcFsSpklenReg_SPEC> as RegisterValue<_>>::new(1)
1565    }
1566}
1567
1568#[doc(hidden)]
1569#[derive(Copy, Clone, Eq, PartialEq)]
1570pub struct I2CIcHsSpklenReg_SPEC;
1571impl crate::sealed::RegSpec for I2CIcHsSpklenReg_SPEC {
1572    type DataType = u32;
1573}
1574
1575#[doc = "I2C HS spike suppression limit Size"]
1576pub type I2CIcHsSpklenReg = crate::RegValueT<I2CIcHsSpklenReg_SPEC>;
1577
1578impl I2CIcHsSpklenReg {
1579    #[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\\[0\\] register being set to 0. Writes at other times have no effect.\nThe minimum valid value is 1; hardware prevents values less than this being written, and if attempted results in 1 being set."]
1580    #[inline(always)]
1581    pub fn i2c_hs_spklen(
1582        self,
1583    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2CIcHsSpklenReg_SPEC, crate::common::RW>
1584    {
1585        crate::common::RegisterField::<
1586            0,
1587            0xff,
1588            1,
1589            0,
1590            u8,
1591            u8,
1592            I2CIcHsSpklenReg_SPEC,
1593            crate::common::RW,
1594        >::from_register(self, 0)
1595    }
1596}
1597impl ::core::default::Default for I2CIcHsSpklenReg {
1598    #[inline(always)]
1599    fn default() -> I2CIcHsSpklenReg {
1600        <crate::RegValueT<I2CIcHsSpklenReg_SPEC> as RegisterValue<_>>::new(1)
1601    }
1602}
1603
1604#[doc(hidden)]
1605#[derive(Copy, Clone, Eq, PartialEq)]
1606pub struct I2CIntrMaskReg_SPEC;
1607impl crate::sealed::RegSpec for I2CIntrMaskReg_SPEC {
1608    type DataType = u32;
1609}
1610
1611#[doc = "I2C Interrupt Mask Register"]
1612pub type I2CIntrMaskReg = crate::RegValueT<I2CIntrMaskReg_SPEC>;
1613
1614impl I2CIntrMaskReg {
1615    #[doc = "M_SCL_STUCK_AT_LOW Register field Reserved bits"]
1616    #[inline(always)]
1617    pub fn m_scl_stuck_at_low(
1618        self,
1619    ) -> crate::common::RegisterFieldBool<14, 1, 0, I2CIntrMaskReg_SPEC, crate::common::R> {
1620        crate::common::RegisterFieldBool::<14,1,0,I2CIntrMaskReg_SPEC,crate::common::R>::from_register(self,0)
1621    }
1622
1623    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1624    #[inline(always)]
1625    pub fn m_master_on_hold(
1626        self,
1627    ) -> crate::common::RegisterFieldBool<13, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1628        crate::common::RegisterFieldBool::<13,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1629    }
1630
1631    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1632    #[inline(always)]
1633    pub fn m_restart_det(
1634        self,
1635    ) -> crate::common::RegisterFieldBool<12, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1636        crate::common::RegisterFieldBool::<12,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1637    }
1638
1639    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1640    #[inline(always)]
1641    pub fn m_gen_call(
1642        self,
1643    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1644        crate::common::RegisterFieldBool::<11,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1645    }
1646
1647    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1648    #[inline(always)]
1649    pub fn m_start_det(
1650        self,
1651    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1652        crate::common::RegisterFieldBool::<10,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1653    }
1654
1655    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1656    #[inline(always)]
1657    pub fn m_stop_det(
1658        self,
1659    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1660        crate::common::RegisterFieldBool::<9,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1661    }
1662
1663    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1664    #[inline(always)]
1665    pub fn m_activity(
1666        self,
1667    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1668        crate::common::RegisterFieldBool::<8,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1669    }
1670
1671    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1672    #[inline(always)]
1673    pub fn m_rx_done(
1674        self,
1675    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1676        crate::common::RegisterFieldBool::<7,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1677    }
1678
1679    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1680    #[inline(always)]
1681    pub fn m_tx_abrt(
1682        self,
1683    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1684        crate::common::RegisterFieldBool::<6,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1685    }
1686
1687    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1688    #[inline(always)]
1689    pub fn m_rd_req(
1690        self,
1691    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1692        crate::common::RegisterFieldBool::<5,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1693    }
1694
1695    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1696    #[inline(always)]
1697    pub fn m_tx_empty(
1698        self,
1699    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1700        crate::common::RegisterFieldBool::<4,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1701    }
1702
1703    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1704    #[inline(always)]
1705    pub fn m_tx_over(
1706        self,
1707    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1708        crate::common::RegisterFieldBool::<3,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1709    }
1710
1711    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1712    #[inline(always)]
1713    pub fn m_rx_full(
1714        self,
1715    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1716        crate::common::RegisterFieldBool::<2,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1717    }
1718
1719    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1720    #[inline(always)]
1721    pub fn m_rx_over(
1722        self,
1723    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1724        crate::common::RegisterFieldBool::<1,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1725    }
1726
1727    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1728    #[inline(always)]
1729    pub fn m_rx_under(
1730        self,
1731    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CIntrMaskReg_SPEC, crate::common::RW> {
1732        crate::common::RegisterFieldBool::<0,1,0,I2CIntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1733    }
1734}
1735impl ::core::default::Default for I2CIntrMaskReg {
1736    #[inline(always)]
1737    fn default() -> I2CIntrMaskReg {
1738        <crate::RegValueT<I2CIntrMaskReg_SPEC> as RegisterValue<_>>::new(2303)
1739    }
1740}
1741
1742#[doc(hidden)]
1743#[derive(Copy, Clone, Eq, PartialEq)]
1744pub struct I2CIntrStatReg_SPEC;
1745impl crate::sealed::RegSpec for I2CIntrStatReg_SPEC {
1746    type DataType = u32;
1747}
1748
1749#[doc = "I2C Interrupt Status Register"]
1750pub type I2CIntrStatReg = crate::RegValueT<I2CIntrStatReg_SPEC>;
1751
1752impl I2CIntrStatReg {
1753    #[doc = "1 = R_SCL_STUCK_AT_LOW interrupt is active\n0 = R_SCL_STUCK_AT_LOW interrupt is inactive"]
1754    #[inline(always)]
1755    pub fn r_scl_stuck_at_low(
1756        self,
1757    ) -> crate::common::RegisterFieldBool<14, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1758        crate::common::RegisterFieldBool::<14,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1759    }
1760
1761    #[doc = "Indicates whether master is holding the bus and TX FIFO is empty. Enabled only when I2C_DYNAMIC_TAR_UPDATE=1 and IC_EMPTYFIFO_HOLD_MASTER_EN=1."]
1762    #[inline(always)]
1763    pub fn r_master_on_hold(
1764        self,
1765    ) -> crate::common::RegisterFieldBool<13, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1766        crate::common::RegisterFieldBool::<13,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1767    }
1768
1769    #[doc = "Indicates whether a RESTART condition has occurred on the I2C interface when DW_apb_i2c is operating in Slave mode and the slave is being addressed.\nEnabled only when IC_SLV_RESTART_DET_EN=1.\nNote: However, in high-speed mode or during a START BYTE transfer, the RESTART comes before the address field as per the I2C protocol. In this case, the slave is not the addressed slave when the RESTART is issued, therefore DW_apb_i2c does not generate the RESTART_DET interrupt."]
1770    #[inline(always)]
1771    pub fn r_restart_det(
1772        self,
1773    ) -> crate::common::RegisterFieldBool<12, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1774        crate::common::RegisterFieldBool::<12,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1775    }
1776
1777    #[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."]
1778    #[inline(always)]
1779    pub fn r_gen_call(
1780        self,
1781    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1782        crate::common::RegisterFieldBool::<11,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1783    }
1784
1785    #[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."]
1786    #[inline(always)]
1787    pub fn r_start_det(
1788        self,
1789    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1790        crate::common::RegisterFieldBool::<10,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1791    }
1792
1793    #[doc = "Indicates whether a STOP condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1794    #[inline(always)]
1795    pub fn r_stop_det(
1796        self,
1797    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1798        crate::common::RegisterFieldBool::<9,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1799    }
1800
1801    #[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."]
1802    #[inline(always)]
1803    pub fn r_activity(
1804        self,
1805    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1806        crate::common::RegisterFieldBool::<8,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1807    }
1808
1809    #[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."]
1810    #[inline(always)]
1811    pub fn r_rx_done(
1812        self,
1813    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1814        crate::common::RegisterFieldBool::<7,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1815    }
1816
1817    #[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."]
1818    #[inline(always)]
1819    pub fn r_tx_abrt(
1820        self,
1821    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1822        crate::common::RegisterFieldBool::<6,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1823    }
1824
1825    #[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"]
1826    #[inline(always)]
1827    pub fn r_rd_req(
1828        self,
1829    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1830        crate::common::RegisterFieldBool::<5,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1831    }
1832
1833    #[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."]
1834    #[inline(always)]
1835    pub fn r_tx_empty(
1836        self,
1837    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1838        crate::common::RegisterFieldBool::<4,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1839    }
1840
1841    #[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"]
1842    #[inline(always)]
1843    pub fn r_tx_over(
1844        self,
1845    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1846        crate::common::RegisterFieldBool::<3,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1847    }
1848
1849    #[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."]
1850    #[inline(always)]
1851    pub fn r_rx_full(
1852        self,
1853    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1854        crate::common::RegisterFieldBool::<2,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1855    }
1856
1857    #[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."]
1858    #[inline(always)]
1859    pub fn r_rx_over(
1860        self,
1861    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1862        crate::common::RegisterFieldBool::<1,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1863    }
1864
1865    #[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."]
1866    #[inline(always)]
1867    pub fn r_rx_under(
1868        self,
1869    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CIntrStatReg_SPEC, crate::common::R> {
1870        crate::common::RegisterFieldBool::<0,1,0,I2CIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1871    }
1872}
1873impl ::core::default::Default for I2CIntrStatReg {
1874    #[inline(always)]
1875    fn default() -> I2CIntrStatReg {
1876        <crate::RegValueT<I2CIntrStatReg_SPEC> as RegisterValue<_>>::new(0)
1877    }
1878}
1879
1880#[doc(hidden)]
1881#[derive(Copy, Clone, Eq, PartialEq)]
1882pub struct I2CRawIntrStatReg_SPEC;
1883impl crate::sealed::RegSpec for I2CRawIntrStatReg_SPEC {
1884    type DataType = u32;
1885}
1886
1887#[doc = "I2C Raw Interrupt Status Register"]
1888pub type I2CRawIntrStatReg = crate::RegValueT<I2CRawIntrStatReg_SPEC>;
1889
1890impl I2CRawIntrStatReg {
1891    #[doc = "CL_STUCK_AT_LOW Register field Reserved bits"]
1892    #[inline(always)]
1893    pub fn scl_stuck_at_low(
1894        self,
1895    ) -> crate::common::RegisterFieldBool<14, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1896        crate::common::RegisterFieldBool::<14,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1897    }
1898
1899    #[doc = "ndicates whether master is holding the bus and TX FIFO is empty. Enabled only when I2C_DYNAMIC_TAR_UPDATE=1 and IC_EMPTYFIFO_HOLD_MASTER_EN=1."]
1900    #[inline(always)]
1901    pub fn master_on_hold(
1902        self,
1903    ) -> crate::common::RegisterFieldBool<13, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1904        crate::common::RegisterFieldBool::<13,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1905    }
1906
1907    #[doc = "Indicates whether a RESTART condition has occurred on the I2C interface when DW_apb_i2c is operating in Slave mode and the slave is being addressed.\nEnabled only when IC_SLV_RESTART_DET_EN=1.\nNote: However, in high-speed mode or during a START BYTE transfer, the RESTART comes before the address field as per the I2C protocol. In this case, the slave is not the addressed slave when the RESTART is issued, therefore DW_apb_i2c does not generate the RESTART_DET interrupt."]
1908    #[inline(always)]
1909    pub fn restart_det(
1910        self,
1911    ) -> crate::common::RegisterFieldBool<12, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1912        crate::common::RegisterFieldBool::<12,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1913    }
1914
1915    #[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."]
1916    #[inline(always)]
1917    pub fn gen_call(
1918        self,
1919    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1920        crate::common::RegisterFieldBool::<11,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1921    }
1922
1923    #[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."]
1924    #[inline(always)]
1925    pub fn start_det(
1926        self,
1927    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1928        crate::common::RegisterFieldBool::<10,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1929    }
1930
1931    #[doc = "Indicates whether a STOP condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1932    #[inline(always)]
1933    pub fn stop_det(
1934        self,
1935    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1936        crate::common::RegisterFieldBool::<9,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1937    }
1938
1939    #[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."]
1940    #[inline(always)]
1941    pub fn activity(
1942        self,
1943    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1944        crate::common::RegisterFieldBool::<8,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1945    }
1946
1947    #[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."]
1948    #[inline(always)]
1949    pub fn rx_done(
1950        self,
1951    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1952        crate::common::RegisterFieldBool::<7,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1953    }
1954
1955    #[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."]
1956    #[inline(always)]
1957    pub fn tx_abrt(
1958        self,
1959    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1960        crate::common::RegisterFieldBool::<6,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1961    }
1962
1963    #[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"]
1964    #[inline(always)]
1965    pub fn rd_req(
1966        self,
1967    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1968        crate::common::RegisterFieldBool::<5,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1969    }
1970
1971    #[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."]
1972    #[inline(always)]
1973    pub fn tx_empty(
1974        self,
1975    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1976        crate::common::RegisterFieldBool::<4,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1977    }
1978
1979    #[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"]
1980    #[inline(always)]
1981    pub fn tx_over(
1982        self,
1983    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1984        crate::common::RegisterFieldBool::<3,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1985    }
1986
1987    #[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."]
1988    #[inline(always)]
1989    pub fn rx_full(
1990        self,
1991    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
1992        crate::common::RegisterFieldBool::<2,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1993    }
1994
1995    #[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."]
1996    #[inline(always)]
1997    pub fn rx_over(
1998        self,
1999    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
2000        crate::common::RegisterFieldBool::<1,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
2001    }
2002
2003    #[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."]
2004    #[inline(always)]
2005    pub fn rx_under(
2006        self,
2007    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CRawIntrStatReg_SPEC, crate::common::R> {
2008        crate::common::RegisterFieldBool::<0,1,0,I2CRawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
2009    }
2010}
2011impl ::core::default::Default for I2CRawIntrStatReg {
2012    #[inline(always)]
2013    fn default() -> I2CRawIntrStatReg {
2014        <crate::RegValueT<I2CRawIntrStatReg_SPEC> as RegisterValue<_>>::new(0)
2015    }
2016}
2017
2018#[doc(hidden)]
2019#[derive(Copy, Clone, Eq, PartialEq)]
2020pub struct I2CRxflrReg_SPEC;
2021impl crate::sealed::RegSpec for I2CRxflrReg_SPEC {
2022    type DataType = u32;
2023}
2024
2025#[doc = "I2C Receive FIFO Level Register"]
2026pub type I2CRxflrReg = crate::RegValueT<I2CRxflrReg_SPEC>;
2027
2028impl I2CRxflrReg {
2029    #[doc = "Receive FIFO Level. Contains the number of valid data entries in the receive FIFO. Size is constrained by the RXFLR value"]
2030    #[inline(always)]
2031    pub fn rxflr(
2032        self,
2033    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, I2CRxflrReg_SPEC, crate::common::R>
2034    {
2035        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,I2CRxflrReg_SPEC,crate::common::R>::from_register(self,0)
2036    }
2037}
2038impl ::core::default::Default for I2CRxflrReg {
2039    #[inline(always)]
2040    fn default() -> I2CRxflrReg {
2041        <crate::RegValueT<I2CRxflrReg_SPEC> as RegisterValue<_>>::new(0)
2042    }
2043}
2044
2045#[doc(hidden)]
2046#[derive(Copy, Clone, Eq, PartialEq)]
2047pub struct I2CRxTlReg_SPEC;
2048impl crate::sealed::RegSpec for I2CRxTlReg_SPEC {
2049    type DataType = u32;
2050}
2051
2052#[doc = "I2C Receive FIFO Threshold Register"]
2053pub type I2CRxTlReg = crate::RegValueT<I2CRxTlReg_SPEC>;
2054
2055impl I2CRxTlReg {
2056    #[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-31, with the additional restriction that hardware does not allow this value to be set to a value larger than the depth of the buffer. If an attempt is made to do that, the actual value set will be the maximum depth of the buffer. A value of 0 sets the threshold for 1 entry, and a value of 31 sets the threshold for 32 entries."]
2057    #[inline(always)]
2058    pub fn rx_tl(
2059        self,
2060    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2CRxTlReg_SPEC, crate::common::RW>
2061    {
2062        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2CRxTlReg_SPEC,crate::common::RW>::from_register(self,0)
2063    }
2064}
2065impl ::core::default::Default for I2CRxTlReg {
2066    #[inline(always)]
2067    fn default() -> I2CRxTlReg {
2068        <crate::RegValueT<I2CRxTlReg_SPEC> as RegisterValue<_>>::new(0)
2069    }
2070}
2071
2072#[doc(hidden)]
2073#[derive(Copy, Clone, Eq, PartialEq)]
2074pub struct I2CSarReg_SPEC;
2075impl crate::sealed::RegSpec for I2CSarReg_SPEC {
2076    type DataType = u32;
2077}
2078
2079#[doc = "I2C Slave Address Register"]
2080pub type I2CSarReg = crate::RegValueT<I2CSarReg_SPEC>;
2081
2082impl I2CSarReg {
2083    #[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.\nWrites to this register succeed only when IC_ENABLE\\[0\\] is set to 0."]
2084    #[inline(always)]
2085    pub fn ic_sar(
2086        self,
2087    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, I2CSarReg_SPEC, crate::common::RW>
2088    {
2089        crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,I2CSarReg_SPEC,crate::common::RW>::from_register(self,0)
2090    }
2091}
2092impl ::core::default::Default for I2CSarReg {
2093    #[inline(always)]
2094    fn default() -> I2CSarReg {
2095        <crate::RegValueT<I2CSarReg_SPEC> as RegisterValue<_>>::new(85)
2096    }
2097}
2098
2099#[doc(hidden)]
2100#[derive(Copy, Clone, Eq, PartialEq)]
2101pub struct I2CSdaHoldReg_SPEC;
2102impl crate::sealed::RegSpec for I2CSdaHoldReg_SPEC {
2103    type DataType = u32;
2104}
2105
2106#[doc = "I2C SDA Hold Time Length Register"]
2107pub type I2CSdaHoldReg = crate::RegValueT<I2CSdaHoldReg_SPEC>;
2108
2109impl I2CSdaHoldReg {
2110    #[doc = "Sets the required SDA hold time in units of ic_clk period, when receiver."]
2111    #[inline(always)]
2112    pub fn i2c_sda_rx_hold(
2113        self,
2114    ) -> crate::common::RegisterField<16, 0xff, 1, 0, u8, u8, I2CSdaHoldReg_SPEC, crate::common::RW>
2115    {
2116        crate::common::RegisterField::<16,0xff,1,0,u8,u8,I2CSdaHoldReg_SPEC,crate::common::RW>::from_register(self,0)
2117    }
2118
2119    #[doc = "Sets the required SDA hold time in units of ic_clk period, when transmitter."]
2120    #[inline(always)]
2121    pub fn i2c_sda_tx_hold(
2122        self,
2123    ) -> crate::common::RegisterField<
2124        0,
2125        0xffff,
2126        1,
2127        0,
2128        u16,
2129        u16,
2130        I2CSdaHoldReg_SPEC,
2131        crate::common::RW,
2132    > {
2133        crate::common::RegisterField::<
2134            0,
2135            0xffff,
2136            1,
2137            0,
2138            u16,
2139            u16,
2140            I2CSdaHoldReg_SPEC,
2141            crate::common::RW,
2142        >::from_register(self, 0)
2143    }
2144}
2145impl ::core::default::Default for I2CSdaHoldReg {
2146    #[inline(always)]
2147    fn default() -> I2CSdaHoldReg {
2148        <crate::RegValueT<I2CSdaHoldReg_SPEC> as RegisterValue<_>>::new(1)
2149    }
2150}
2151
2152#[doc(hidden)]
2153#[derive(Copy, Clone, Eq, PartialEq)]
2154pub struct I2CSdaSetupReg_SPEC;
2155impl crate::sealed::RegSpec for I2CSdaSetupReg_SPEC {
2156    type DataType = u32;
2157}
2158
2159#[doc = "I2C SDA Setup Register"]
2160pub type I2CSdaSetupReg = crate::RegValueT<I2CSdaSetupReg_SPEC>;
2161
2162impl I2CSdaSetupReg {
2163    #[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. The relevant I2C requirement is tSU:DAT (note 4) as detailed in the I2C Bus Specification. This register must be programmed with a value equal to or greater than 2.\nIt 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."]
2164    #[inline(always)]
2165    pub fn sda_setup(
2166        self,
2167    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2CSdaSetupReg_SPEC, crate::common::RW>
2168    {
2169        crate::common::RegisterField::<0,0xff,1,0,u8,u8,I2CSdaSetupReg_SPEC,crate::common::RW>::from_register(self,0)
2170    }
2171}
2172impl ::core::default::Default for I2CSdaSetupReg {
2173    #[inline(always)]
2174    fn default() -> I2CSdaSetupReg {
2175        <crate::RegValueT<I2CSdaSetupReg_SPEC> as RegisterValue<_>>::new(100)
2176    }
2177}
2178
2179#[doc(hidden)]
2180#[derive(Copy, Clone, Eq, PartialEq)]
2181pub struct I2CSsSclHcntReg_SPEC;
2182impl crate::sealed::RegSpec for I2CSsSclHcntReg_SPEC {
2183    type DataType = u32;
2184}
2185
2186#[doc = "Standard Speed I2C Clock SCL High Count Register"]
2187pub type I2CSsSclHcntReg = crate::RegValueT<I2CSsSclHcntReg_SPEC>;
2188
2189impl I2CSsSclHcntReg {
2190    #[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."]
2191    #[inline(always)]
2192    pub fn ic_ss_scl_hcnt(
2193        self,
2194    ) -> crate::common::RegisterField<
2195        0,
2196        0xffff,
2197        1,
2198        0,
2199        u16,
2200        u16,
2201        I2CSsSclHcntReg_SPEC,
2202        crate::common::RW,
2203    > {
2204        crate::common::RegisterField::<
2205            0,
2206            0xffff,
2207            1,
2208            0,
2209            u16,
2210            u16,
2211            I2CSsSclHcntReg_SPEC,
2212            crate::common::RW,
2213        >::from_register(self, 0)
2214    }
2215}
2216impl ::core::default::Default for I2CSsSclHcntReg {
2217    #[inline(always)]
2218    fn default() -> I2CSsSclHcntReg {
2219        <crate::RegValueT<I2CSsSclHcntReg_SPEC> as RegisterValue<_>>::new(145)
2220    }
2221}
2222
2223#[doc(hidden)]
2224#[derive(Copy, Clone, Eq, PartialEq)]
2225pub struct I2CSsSclLcntReg_SPEC;
2226impl crate::sealed::RegSpec for I2CSsSclLcntReg_SPEC {
2227    type DataType = u32;
2228}
2229
2230#[doc = "Standard Speed I2C Clock SCL Low Count Register"]
2231pub type I2CSsSclLcntReg = crate::RegValueT<I2CSsSclLcntReg_SPEC>;
2232
2233impl I2CSsSclLcntReg {
2234    #[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."]
2235    #[inline(always)]
2236    pub fn ic_ss_scl_lcnt(
2237        self,
2238    ) -> crate::common::RegisterField<
2239        0,
2240        0xffff,
2241        1,
2242        0,
2243        u16,
2244        u16,
2245        I2CSsSclLcntReg_SPEC,
2246        crate::common::RW,
2247    > {
2248        crate::common::RegisterField::<
2249            0,
2250            0xffff,
2251            1,
2252            0,
2253            u16,
2254            u16,
2255            I2CSsSclLcntReg_SPEC,
2256            crate::common::RW,
2257        >::from_register(self, 0)
2258    }
2259}
2260impl ::core::default::Default for I2CSsSclLcntReg {
2261    #[inline(always)]
2262    fn default() -> I2CSsSclLcntReg {
2263        <crate::RegValueT<I2CSsSclLcntReg_SPEC> as RegisterValue<_>>::new(171)
2264    }
2265}
2266
2267#[doc(hidden)]
2268#[derive(Copy, Clone, Eq, PartialEq)]
2269pub struct I2CStatusReg_SPEC;
2270impl crate::sealed::RegSpec for I2CStatusReg_SPEC {
2271    type DataType = u32;
2272}
2273
2274#[doc = "I2C Status Register"]
2275pub type I2CStatusReg = crate::RegValueT<I2CStatusReg_SPEC>;
2276
2277impl I2CStatusReg {
2278    #[doc = "This bit indicates the BUS Hold in Slave mode due to Rx FIFO is Full and an additional byte has been received\n1 = Slave holds the bus due to Rx FIFO is full\n0 = Slave is not holding the bus or Bus hold is not due to Rx FIFO is full"]
2279    #[inline(always)]
2280    pub fn lv_hold_rx_fifo_full(
2281        self,
2282    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2283        crate::common::RegisterFieldBool::<10,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2284    }
2285
2286    #[doc = "This bit indicates the BUS Hold in Slave mode for the Read request when the Tx FIFO is empty. The Bus is in hold until the Tx FIFO has data to Transmit for the read request.\n1 = Slave holds the bus due to Tx FIFO is empty\n0 = Slave is not holding the bus or Bus hold is not due to Tx FIFO is empty"]
2287    #[inline(always)]
2288    pub fn slv_hold_tx_fifo_empty(
2289        self,
2290    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2291        crate::common::RegisterFieldBool::<9,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2292    }
2293
2294    #[doc = "This bit indicates the BUS Hold in Master mode due to Rx FIFO is Full and additional byte has been received\n1 = Master holds the bus due to Rx FIFO is full\n0 = Master is not holding the bus or Bus hold is not due to Rx FIFO is full"]
2295    #[inline(always)]
2296    pub fn mst_hold_rx_fifo_full(
2297        self,
2298    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2299        crate::common::RegisterFieldBool::<8,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2300    }
2301
2302    #[doc = "the DW_apb_i2c master stalls the write transfer when Tx FIFO is empty, and the the last byte does not have the Stop bit set. This bit indicates the BUS hold when the master holds the bus because of the Tx FIFO being empty, and the the previous transferred command does not have the Stop bit set.\n1 =Master holds the bus due to Tx FIFO is empty\n0 =Master is not holding the bus or Bus hold is not due to Tx FIFO is empty"]
2303    #[inline(always)]
2304    pub fn mst_hold_tx_fifo_empty(
2305        self,
2306    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2307        crate::common::RegisterFieldBool::<7,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2308    }
2309
2310    #[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"]
2311    #[inline(always)]
2312    pub fn slv_activity(
2313        self,
2314    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2315        crate::common::RegisterFieldBool::<6,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2316    }
2317
2318    #[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"]
2319    #[inline(always)]
2320    pub fn mst_activity(
2321        self,
2322    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2323        crate::common::RegisterFieldBool::<5,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2324    }
2325
2326    #[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"]
2327    #[inline(always)]
2328    pub fn rff(
2329        self,
2330    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2331        crate::common::RegisterFieldBool::<4,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2332    }
2333
2334    #[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"]
2335    #[inline(always)]
2336    pub fn rfne(
2337        self,
2338    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2339        crate::common::RegisterFieldBool::<3,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2340    }
2341
2342    #[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"]
2343    #[inline(always)]
2344    pub fn tfe(
2345        self,
2346    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2347        crate::common::RegisterFieldBool::<2,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2348    }
2349
2350    #[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"]
2351    #[inline(always)]
2352    pub fn tfnf(
2353        self,
2354    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2355        crate::common::RegisterFieldBool::<1,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2356    }
2357
2358    #[doc = "I2C Activity Status."]
2359    #[inline(always)]
2360    pub fn i2c_activity(
2361        self,
2362    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CStatusReg_SPEC, crate::common::R> {
2363        crate::common::RegisterFieldBool::<0,1,0,I2CStatusReg_SPEC,crate::common::R>::from_register(self,0)
2364    }
2365}
2366impl ::core::default::Default for I2CStatusReg {
2367    #[inline(always)]
2368    fn default() -> I2CStatusReg {
2369        <crate::RegValueT<I2CStatusReg_SPEC> as RegisterValue<_>>::new(6)
2370    }
2371}
2372
2373#[doc(hidden)]
2374#[derive(Copy, Clone, Eq, PartialEq)]
2375pub struct I2CTarReg_SPEC;
2376impl crate::sealed::RegSpec for I2CTarReg_SPEC {
2377    type DataType = u32;
2378}
2379
2380#[doc = "I2C Target Address Register"]
2381pub type I2CTarReg = crate::RegValueT<I2CTarReg_SPEC>;
2382
2383impl I2CTarReg {
2384    #[doc = "On read\nThis bit indicates whether software performs a General Call or START 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\nOn write\n1 = Enables programming of GENERAL_CALL or START_BYTE transmission\n0 = Disables programming of GENERAL_CALL or START_BYTE transmission\nWrites to this register succeed only when IC_ENABLE\\[0\\] is set to 0."]
2385    #[inline(always)]
2386    pub fn special(
2387        self,
2388    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2CTarReg_SPEC, crate::common::RW> {
2389        crate::common::RegisterFieldBool::<11,1,0,I2CTarReg_SPEC,crate::common::RW>::from_register(self,0)
2390    }
2391
2392    #[doc = "On read\nIf 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\nOn write\n1 = START byte transmission\n0 = GENERAL_CALL byte transmission\nWrites to this register succeed only when IC_ENABLE\\[0\\] is set to 0."]
2393    #[inline(always)]
2394    pub fn gc_or_start(
2395        self,
2396    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CTarReg_SPEC, crate::common::RW> {
2397        crate::common::RegisterFieldBool::<10,1,0,I2CTarReg_SPEC,crate::common::RW>::from_register(self,0)
2398    }
2399
2400    #[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."]
2401    #[inline(always)]
2402    pub fn ic_tar(
2403        self,
2404    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, I2CTarReg_SPEC, crate::common::RW>
2405    {
2406        crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,I2CTarReg_SPEC,crate::common::RW>::from_register(self,0)
2407    }
2408}
2409impl ::core::default::Default for I2CTarReg {
2410    #[inline(always)]
2411    fn default() -> I2CTarReg {
2412        <crate::RegValueT<I2CTarReg_SPEC> as RegisterValue<_>>::new(85)
2413    }
2414}
2415
2416#[doc(hidden)]
2417#[derive(Copy, Clone, Eq, PartialEq)]
2418pub struct I2CTxflrReg_SPEC;
2419impl crate::sealed::RegSpec for I2CTxflrReg_SPEC {
2420    type DataType = u32;
2421}
2422
2423#[doc = "I2C Transmit FIFO Level Register"]
2424pub type I2CTxflrReg = crate::RegValueT<I2CTxflrReg_SPEC>;
2425
2426impl I2CTxflrReg {
2427    #[doc = "Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO. Size is constrained by the TXFLR value"]
2428    #[inline(always)]
2429    pub fn txflr(
2430        self,
2431    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, I2CTxflrReg_SPEC, crate::common::R>
2432    {
2433        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,I2CTxflrReg_SPEC,crate::common::R>::from_register(self,0)
2434    }
2435}
2436impl ::core::default::Default for I2CTxflrReg {
2437    #[inline(always)]
2438    fn default() -> I2CTxflrReg {
2439        <crate::RegValueT<I2CTxflrReg_SPEC> as RegisterValue<_>>::new(0)
2440    }
2441}
2442
2443#[doc(hidden)]
2444#[derive(Copy, Clone, Eq, PartialEq)]
2445pub struct I2CTxAbrtSourceReg_SPEC;
2446impl crate::sealed::RegSpec for I2CTxAbrtSourceReg_SPEC {
2447    type DataType = u32;
2448}
2449
2450#[doc = "I2C Transmit Abort Source Register"]
2451pub type I2CTxAbrtSourceReg = crate::RegValueT<I2CTxAbrtSourceReg_SPEC>;
2452
2453impl I2CTxAbrtSourceReg {
2454    #[doc = "Master-Transmitter : This is a master-mode-only bit. Master has detected the transfer abort (IC_ENABLE\\[1\\])"]
2455    #[inline(always)]
2456    pub fn abrt_user_abrt(
2457        self,
2458    ) -> crate::common::RegisterFieldBool<16, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2459        crate::common::RegisterFieldBool::<16,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2460    }
2461
2462    #[doc = "Slave-Transmitter : 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 2IC_DATA_CMD register\n1 = Slave trying to transmit to remote master in read mode\n0 = Slave trying to transmit to remote master in read mode- scenario not present"]
2463    #[inline(always)]
2464    pub fn abrt_slvrd_intx(
2465        self,
2466    ) -> crate::common::RegisterFieldBool<15, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2467        crate::common::RegisterFieldBool::<15,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2468    }
2469
2470    #[doc = "Slave-Transmitter : Slave lost the bus while transmitting data to a remote master. I2C_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.\n1 = Slave lost arbitration to remote master\n0 = Slave lost arbitration to remote master- scenario not present"]
2471    #[inline(always)]
2472    pub fn abrt_slv_arblost(
2473        self,
2474    ) -> crate::common::RegisterFieldBool<14, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2475        crate::common::RegisterFieldBool::<14,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2476    }
2477
2478    #[doc = "Slave-Transmitter : 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.\n1 = Slave flushes existing data in TX-FIFO upon getting read command\n0 = Slave flushes existing data in TX-FIFO upon getting read command- scenario not present"]
2479    #[inline(always)]
2480    pub fn abrt_slvflush_txfifo(
2481        self,
2482    ) -> crate::common::RegisterFieldBool<13, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2483        crate::common::RegisterFieldBool::<13,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2484    }
2485
2486    #[doc = "Master-Transmitter or Slave-Transmitter : 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.\n1 = Master or Slave-Transmitter lost arbitration\n0 = Master or Slave-Transmitter lost arbitration- scenario not present"]
2487    #[inline(always)]
2488    pub fn arb_lost(
2489        self,
2490    ) -> crate::common::RegisterFieldBool<12, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2491        crate::common::RegisterFieldBool::<12,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2492    }
2493
2494    #[doc = "Master-Transmitter or Master-Receiver : User tries to initiate a Master operation with the Master mode disabled.\n1 = User intitating master operation when MASTER disable\n0 = User initiating master operation when MASTER disabled- scenario not present"]
2495    #[inline(always)]
2496    pub fn abrt_master_dis(
2497        self,
2498    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2499        crate::common::RegisterFieldBool::<11,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2500    }
2501
2502    #[doc = "Master-Receiver : The restart is disabled (IC_RESTART_EN bit (I2C_CON\\[5\\]) = 0) and the master sends a read command in 10-bit addressing mode.\n1 =Master trying to read in 10Bit addressing mode when RESTART disabled\n0 =Master not trying to read in 10Bit addressing mode when RESTART disabled"]
2503    #[inline(always)]
2504    pub fn abrt_10b_rd_norstrt(
2505        self,
2506    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2507        crate::common::RegisterFieldBool::<10,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2508    }
2509
2510    #[doc = "Master : 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. \n1 = User trying to send START byte when RESTART disabled\n0 = User trying to send START byte when RESTART disabled- scenario not present"]
2511    #[inline(always)]
2512    pub fn abrt_sbyte_norstrt(
2513        self,
2514    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2515        crate::common::RegisterFieldBool::<9,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2516    }
2517
2518    #[doc = "Master-Transmitter or Master-Receiver : 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\n1 = User trying to switch Master to HS mode when RESTART disabled\n0 = User trying to switch Master to HS mode when RESTART disabled- scenario not present"]
2519    #[inline(always)]
2520    pub fn abrt_hs_norstrt(
2521        self,
2522    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2523        crate::common::RegisterFieldBool::<8,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2524    }
2525
2526    #[doc = "Master : Master has sent a START Byte and the START Byte was acknowledged (wrong behavior). \n1 = ACK detected for START byte\n0 = ACK detected for START byte- scenario not present"]
2527    #[inline(always)]
2528    pub fn abrt_sbyte_ackdet(
2529        self,
2530    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2531        crate::common::RegisterFieldBool::<7,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2532    }
2533
2534    #[doc = "Master : Master is in High Speed mode and the High Speed Master code was acknowledged (wrong behavior).\n1 = HS Master code ACKed in HS Mode\n0 = HS Master code ACKed in HS Mode- scenario not present"]
2535    #[inline(always)]
2536    pub fn abrt_hs_ackdet(
2537        self,
2538    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2539        crate::common::RegisterFieldBool::<6,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2540    }
2541
2542    #[doc = "Master-Transmitter : 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).\n1 = GCALL is followed by read from bus\n0 = GCALL is followed by read from bus-scenario not present"]
2543    #[inline(always)]
2544    pub fn abrt_gcall_read(
2545        self,
2546    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2547        crate::common::RegisterFieldBool::<5,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2548    }
2549
2550    #[doc = "Master-Transmitter : the controller in master mode sent a General Call and no slave on the bus acknowledged the General Call.\n1 = GCALL not ACKed by any slave\n0 = GCALL not ACKed by any slave-scenario not present"]
2551    #[inline(always)]
2552    pub fn abrt_gcall_noack(
2553        self,
2554    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2555        crate::common::RegisterFieldBool::<4,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2556    }
2557
2558    #[doc = "Master-Transmitter : 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).\n1 = Transmitted data not ACKed by addressed slave\n0 = Transmitted data non-ACKed by addressed slave-scenario not present"]
2559    #[inline(always)]
2560    pub fn abrt_txdata_noack(
2561        self,
2562    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2563        crate::common::RegisterFieldBool::<3,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2564    }
2565
2566    #[doc = "Master-Transmitter or Master-Receiver : Master is in 10-bit address mode and the second address byte of the 10-bit address was not acknowledged by any slave.\n1= Byte 2 of 10Bit Address not ACKed by any slave\n0 = This abort is not generated"]
2567    #[inline(always)]
2568    pub fn abrt_10addr2_noack(
2569        self,
2570    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2571        crate::common::RegisterFieldBool::<2,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2572    }
2573
2574    #[doc = "Master-Transmitter or Master-Receiver : Master is in 10-bit address mode and the first 10-bit address byte was not acknowledged by any slave.\n1 =Byte 1 of 10Bit Address not ACKed by any slave\n0 =This abort is not generated"]
2575    #[inline(always)]
2576    pub fn abrt_10addr1_noack(
2577        self,
2578    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2579        crate::common::RegisterFieldBool::<1,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2580    }
2581
2582    #[doc = "Master-Transmitter or Master-Receiver : Master is in 7-bit addressing mode and the address sent was not acknowledged by any slave.\n1 =This abort is generated because of NOACK for 7-bit address\n0 =This abort is not generated"]
2583    #[inline(always)]
2584    pub fn abrt_7b_addr_noack(
2585        self,
2586    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2CTxAbrtSourceReg_SPEC, crate::common::R> {
2587        crate::common::RegisterFieldBool::<0,1,0,I2CTxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2588    }
2589}
2590impl ::core::default::Default for I2CTxAbrtSourceReg {
2591    #[inline(always)]
2592    fn default() -> I2CTxAbrtSourceReg {
2593        <crate::RegValueT<I2CTxAbrtSourceReg_SPEC> as RegisterValue<_>>::new(0)
2594    }
2595}
2596
2597#[doc(hidden)]
2598#[derive(Copy, Clone, Eq, PartialEq)]
2599pub struct I2CTxTlReg_SPEC;
2600impl crate::sealed::RegSpec for I2CTxTlReg_SPEC {
2601    type DataType = u32;
2602}
2603
2604#[doc = "I2C Transmit FIFO Threshold Register"]
2605pub type I2CTxTlReg = crate::RegValueT<I2CTxTlReg_SPEC>;
2606
2607impl I2CTxTlReg {
2608    #[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-31, with the additional restriction that it may not be set to value larger than the depth of the buffer. If an attempt is made to do that, the actual value set will be the maximum depth of the buffer. A value of 0 sets the threshold for 0 entries, and a value of 31 sets the threshold for 32 entries.."]
2609    #[inline(always)]
2610    pub fn tx_tl(
2611        self,
2612    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2CTxTlReg_SPEC, crate::common::RW>
2613    {
2614        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2CTxTlReg_SPEC,crate::common::RW>::from_register(self,0)
2615    }
2616}
2617impl ::core::default::Default for I2CTxTlReg {
2618    #[inline(always)]
2619    fn default() -> I2CTxTlReg {
2620        <crate::RegValueT<I2CTxTlReg_SPEC> as RegisterValue<_>>::new(0)
2621    }
2622}