da14697_pac/
i2c2.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"I2C2 registers"]
28unsafe impl ::core::marker::Send for super::I2C2 {}
29unsafe impl ::core::marker::Sync for super::I2C2 {}
30impl super::I2C2 {
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 i2c2_ack_general_call_reg(
40        &self,
41    ) -> &'static crate::common::Reg<self::I2C2AckGeneralCallReg_SPEC, crate::common::RW> {
42        unsafe {
43            crate::common::Reg::<self::I2C2AckGeneralCallReg_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 i2c2_clr_activity_reg(
52        &self,
53    ) -> &'static crate::common::Reg<self::I2C2ClrActivityReg_SPEC, crate::common::RW> {
54        unsafe {
55            crate::common::Reg::<self::I2C2ClrActivityReg_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 i2c2_clr_gen_call_reg(
64        &self,
65    ) -> &'static crate::common::Reg<self::I2C2ClrGenCallReg_SPEC, crate::common::RW> {
66        unsafe {
67            crate::common::Reg::<self::I2C2ClrGenCallReg_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 i2c2_clr_intr_reg(
76        &self,
77    ) -> &'static crate::common::Reg<self::I2C2ClrIntrReg_SPEC, crate::common::RW> {
78        unsafe {
79            crate::common::Reg::<self::I2C2ClrIntrReg_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 i2c2_clr_rd_req_reg(
88        &self,
89    ) -> &'static crate::common::Reg<self::I2C2ClrRdReqReg_SPEC, crate::common::RW> {
90        unsafe {
91            crate::common::Reg::<self::I2C2ClrRdReqReg_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 i2c2_clr_rx_done_reg(
100        &self,
101    ) -> &'static crate::common::Reg<self::I2C2ClrRxDoneReg_SPEC, crate::common::RW> {
102        unsafe {
103            crate::common::Reg::<self::I2C2ClrRxDoneReg_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 i2c2_clr_rx_over_reg(
112        &self,
113    ) -> &'static crate::common::Reg<self::I2C2ClrRxOverReg_SPEC, crate::common::RW> {
114        unsafe {
115            crate::common::Reg::<self::I2C2ClrRxOverReg_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 i2c2_clr_rx_under_reg(
124        &self,
125    ) -> &'static crate::common::Reg<self::I2C2ClrRxUnderReg_SPEC, crate::common::RW> {
126        unsafe {
127            crate::common::Reg::<self::I2C2ClrRxUnderReg_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 i2c2_clr_start_det_reg(
136        &self,
137    ) -> &'static crate::common::Reg<self::I2C2ClrStartDetReg_SPEC, crate::common::RW> {
138        unsafe {
139            crate::common::Reg::<self::I2C2ClrStartDetReg_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 i2c2_clr_stop_det_reg(
148        &self,
149    ) -> &'static crate::common::Reg<self::I2C2ClrStopDetReg_SPEC, crate::common::RW> {
150        unsafe {
151            crate::common::Reg::<self::I2C2ClrStopDetReg_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 i2c2_clr_tx_abrt_reg(
160        &self,
161    ) -> &'static crate::common::Reg<self::I2C2ClrTxAbrtReg_SPEC, crate::common::RW> {
162        unsafe {
163            crate::common::Reg::<self::I2C2ClrTxAbrtReg_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 i2c2_clr_tx_over_reg(
172        &self,
173    ) -> &'static crate::common::Reg<self::I2C2ClrTxOverReg_SPEC, crate::common::RW> {
174        unsafe {
175            crate::common::Reg::<self::I2C2ClrTxOverReg_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 i2c2_comp_param1_reg(
184        &self,
185    ) -> &'static crate::common::Reg<self::I2C2CompParam1Reg_SPEC, crate::common::RW> {
186        unsafe {
187            crate::common::Reg::<self::I2C2CompParam1Reg_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 i2c2_comp_type_reg(
196        &self,
197    ) -> &'static crate::common::Reg<self::I2C2CompTypeReg_SPEC, crate::common::RW> {
198        unsafe {
199            crate::common::Reg::<self::I2C2CompTypeReg_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 i2c2_comp_version_reg(
208        &self,
209    ) -> &'static crate::common::Reg<self::I2C2CompVersionReg_SPEC, crate::common::RW> {
210        unsafe {
211            crate::common::Reg::<self::I2C2CompVersionReg_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 i2c2_con_reg(
220        &self,
221    ) -> &'static crate::common::Reg<self::I2C2ConReg_SPEC, crate::common::RW> {
222        unsafe {
223            crate::common::Reg::<self::I2C2ConReg_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 i2c2_data_cmd_reg(
232        &self,
233    ) -> &'static crate::common::Reg<self::I2C2DataCmdReg_SPEC, crate::common::RW> {
234        unsafe {
235            crate::common::Reg::<self::I2C2DataCmdReg_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 i2c2_dma_cr_reg(
244        &self,
245    ) -> &'static crate::common::Reg<self::I2C2DmaCrReg_SPEC, crate::common::RW> {
246        unsafe {
247            crate::common::Reg::<self::I2C2DmaCrReg_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 i2c2_dma_rdlr_reg(
256        &self,
257    ) -> &'static crate::common::Reg<self::I2C2DmaRdlrReg_SPEC, crate::common::RW> {
258        unsafe {
259            crate::common::Reg::<self::I2C2DmaRdlrReg_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 i2c2_dma_tdlr_reg(
268        &self,
269    ) -> &'static crate::common::Reg<self::I2C2DmaTdlrReg_SPEC, crate::common::RW> {
270        unsafe {
271            crate::common::Reg::<self::I2C2DmaTdlrReg_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 i2c2_enable_reg(
280        &self,
281    ) -> &'static crate::common::Reg<self::I2C2EnableReg_SPEC, crate::common::RW> {
282        unsafe {
283            crate::common::Reg::<self::I2C2EnableReg_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 i2c2_enable_status_reg(
292        &self,
293    ) -> &'static crate::common::Reg<self::I2C2EnableStatusReg_SPEC, crate::common::RW> {
294        unsafe {
295            crate::common::Reg::<self::I2C2EnableStatusReg_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 i2c2_fs_scl_hcnt_reg(
304        &self,
305    ) -> &'static crate::common::Reg<self::I2C2FsSclHcntReg_SPEC, crate::common::RW> {
306        unsafe {
307            crate::common::Reg::<self::I2C2FsSclHcntReg_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 i2c2_fs_scl_lcnt_reg(
316        &self,
317    ) -> &'static crate::common::Reg<self::I2C2FsSclLcntReg_SPEC, crate::common::RW> {
318        unsafe {
319            crate::common::Reg::<self::I2C2FsSclLcntReg_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 i2c2_hs_maddr_reg(
328        &self,
329    ) -> &'static crate::common::Reg<self::I2C2HsMaddrReg_SPEC, crate::common::RW> {
330        unsafe {
331            crate::common::Reg::<self::I2C2HsMaddrReg_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 i2c2_hs_scl_hcnt_reg(
340        &self,
341    ) -> &'static crate::common::Reg<self::I2C2HsSclHcntReg_SPEC, crate::common::RW> {
342        unsafe {
343            crate::common::Reg::<self::I2C2HsSclHcntReg_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 i2c2_hs_scl_lcnt_reg(
352        &self,
353    ) -> &'static crate::common::Reg<self::I2C2HsSclLcntReg_SPEC, crate::common::RW> {
354        unsafe {
355            crate::common::Reg::<self::I2C2HsSclLcntReg_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 i2c2_ic_fs_spklen_reg(
364        &self,
365    ) -> &'static crate::common::Reg<self::I2C2IcFsSpklenReg_SPEC, crate::common::RW> {
366        unsafe {
367            crate::common::Reg::<self::I2C2IcFsSpklenReg_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 i2c2_ic_hs_spklen_reg(
376        &self,
377    ) -> &'static crate::common::Reg<self::I2C2IcHsSpklenReg_SPEC, crate::common::RW> {
378        unsafe {
379            crate::common::Reg::<self::I2C2IcHsSpklenReg_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 i2c2_intr_mask_reg(
388        &self,
389    ) -> &'static crate::common::Reg<self::I2C2IntrMaskReg_SPEC, crate::common::RW> {
390        unsafe {
391            crate::common::Reg::<self::I2C2IntrMaskReg_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 i2c2_intr_stat_reg(
400        &self,
401    ) -> &'static crate::common::Reg<self::I2C2IntrStatReg_SPEC, crate::common::RW> {
402        unsafe {
403            crate::common::Reg::<self::I2C2IntrStatReg_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 i2c2_raw_intr_stat_reg(
412        &self,
413    ) -> &'static crate::common::Reg<self::I2C2RawIntrStatReg_SPEC, crate::common::RW> {
414        unsafe {
415            crate::common::Reg::<self::I2C2RawIntrStatReg_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 i2c2_rxflr_reg(
424        &self,
425    ) -> &'static crate::common::Reg<self::I2C2RxflrReg_SPEC, crate::common::RW> {
426        unsafe {
427            crate::common::Reg::<self::I2C2RxflrReg_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 i2c2_rx_tl_reg(
436        &self,
437    ) -> &'static crate::common::Reg<self::I2C2RxTlReg_SPEC, crate::common::RW> {
438        unsafe {
439            crate::common::Reg::<self::I2C2RxTlReg_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 i2c2_sar_reg(
448        &self,
449    ) -> &'static crate::common::Reg<self::I2C2SarReg_SPEC, crate::common::RW> {
450        unsafe {
451            crate::common::Reg::<self::I2C2SarReg_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 i2c2_sda_hold_reg(
460        &self,
461    ) -> &'static crate::common::Reg<self::I2C2SdaHoldReg_SPEC, crate::common::RW> {
462        unsafe {
463            crate::common::Reg::<self::I2C2SdaHoldReg_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 i2c2_sda_setup_reg(
472        &self,
473    ) -> &'static crate::common::Reg<self::I2C2SdaSetupReg_SPEC, crate::common::RW> {
474        unsafe {
475            crate::common::Reg::<self::I2C2SdaSetupReg_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 i2c2_ss_scl_hcnt_reg(
484        &self,
485    ) -> &'static crate::common::Reg<self::I2C2SsSclHcntReg_SPEC, crate::common::RW> {
486        unsafe {
487            crate::common::Reg::<self::I2C2SsSclHcntReg_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 i2c2_ss_scl_lcnt_reg(
496        &self,
497    ) -> &'static crate::common::Reg<self::I2C2SsSclLcntReg_SPEC, crate::common::RW> {
498        unsafe {
499            crate::common::Reg::<self::I2C2SsSclLcntReg_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 i2c2_status_reg(
508        &self,
509    ) -> &'static crate::common::Reg<self::I2C2StatusReg_SPEC, crate::common::RW> {
510        unsafe {
511            crate::common::Reg::<self::I2C2StatusReg_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 i2c2_tar_reg(
520        &self,
521    ) -> &'static crate::common::Reg<self::I2C2TarReg_SPEC, crate::common::RW> {
522        unsafe {
523            crate::common::Reg::<self::I2C2TarReg_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 i2c2_txflr_reg(
532        &self,
533    ) -> &'static crate::common::Reg<self::I2C2TxflrReg_SPEC, crate::common::RW> {
534        unsafe {
535            crate::common::Reg::<self::I2C2TxflrReg_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 i2c2_tx_abrt_source_reg(
544        &self,
545    ) -> &'static crate::common::Reg<self::I2C2TxAbrtSourceReg_SPEC, crate::common::RW> {
546        unsafe {
547            crate::common::Reg::<self::I2C2TxAbrtSourceReg_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 i2c2_tx_tl_reg(
556        &self,
557    ) -> &'static crate::common::Reg<self::I2C2TxTlReg_SPEC, crate::common::RW> {
558        unsafe {
559            crate::common::Reg::<self::I2C2TxTlReg_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 I2C2AckGeneralCallReg_SPEC;
568impl crate::sealed::RegSpec for I2C2AckGeneralCallReg_SPEC {
569    type DataType = u32;
570}
571
572#[doc = "I2C ACK General Call Register"]
573pub type I2C2AckGeneralCallReg = crate::RegValueT<I2C2AckGeneralCallReg_SPEC>;
574
575impl I2C2AckGeneralCallReg {
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, I2C2AckGeneralCallReg_SPEC, crate::common::RW>
581    {
582        crate::common::RegisterFieldBool::<0,1,0,I2C2AckGeneralCallReg_SPEC,crate::common::RW>::from_register(self,0)
583    }
584}
585impl ::core::default::Default for I2C2AckGeneralCallReg {
586    #[inline(always)]
587    fn default() -> I2C2AckGeneralCallReg {
588        <crate::RegValueT<I2C2AckGeneralCallReg_SPEC> as RegisterValue<_>>::new(0)
589    }
590}
591
592#[doc(hidden)]
593#[derive(Copy, Clone, Eq, PartialEq)]
594pub struct I2C2ClrActivityReg_SPEC;
595impl crate::sealed::RegSpec for I2C2ClrActivityReg_SPEC {
596    type DataType = u32;
597}
598
599#[doc = "Clear ACTIVITY Interrupt Register"]
600pub type I2C2ClrActivityReg = crate::RegValueT<I2C2ClrActivityReg_SPEC>;
601
602impl I2C2ClrActivityReg {
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, I2C2ClrActivityReg_SPEC, crate::common::R> {
608        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrActivityReg_SPEC,crate::common::R>::from_register(self,0)
609    }
610}
611impl ::core::default::Default for I2C2ClrActivityReg {
612    #[inline(always)]
613    fn default() -> I2C2ClrActivityReg {
614        <crate::RegValueT<I2C2ClrActivityReg_SPEC> as RegisterValue<_>>::new(0)
615    }
616}
617
618#[doc(hidden)]
619#[derive(Copy, Clone, Eq, PartialEq)]
620pub struct I2C2ClrGenCallReg_SPEC;
621impl crate::sealed::RegSpec for I2C2ClrGenCallReg_SPEC {
622    type DataType = u32;
623}
624
625#[doc = "Clear GEN_CALL Interrupt Register"]
626pub type I2C2ClrGenCallReg = crate::RegValueT<I2C2ClrGenCallReg_SPEC>;
627
628impl I2C2ClrGenCallReg {
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, I2C2ClrGenCallReg_SPEC, crate::common::R> {
634        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrGenCallReg_SPEC,crate::common::R>::from_register(self,0)
635    }
636}
637impl ::core::default::Default for I2C2ClrGenCallReg {
638    #[inline(always)]
639    fn default() -> I2C2ClrGenCallReg {
640        <crate::RegValueT<I2C2ClrGenCallReg_SPEC> as RegisterValue<_>>::new(0)
641    }
642}
643
644#[doc(hidden)]
645#[derive(Copy, Clone, Eq, PartialEq)]
646pub struct I2C2ClrIntrReg_SPEC;
647impl crate::sealed::RegSpec for I2C2ClrIntrReg_SPEC {
648    type DataType = u32;
649}
650
651#[doc = "Clear Combined and Individual Interrupt Register"]
652pub type I2C2ClrIntrReg = crate::RegValueT<I2C2ClrIntrReg_SPEC>;
653
654impl I2C2ClrIntrReg {
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, I2C2ClrIntrReg_SPEC, crate::common::R> {
660        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrIntrReg_SPEC,crate::common::R>::from_register(self,0)
661    }
662}
663impl ::core::default::Default for I2C2ClrIntrReg {
664    #[inline(always)]
665    fn default() -> I2C2ClrIntrReg {
666        <crate::RegValueT<I2C2ClrIntrReg_SPEC> as RegisterValue<_>>::new(0)
667    }
668}
669
670#[doc(hidden)]
671#[derive(Copy, Clone, Eq, PartialEq)]
672pub struct I2C2ClrRdReqReg_SPEC;
673impl crate::sealed::RegSpec for I2C2ClrRdReqReg_SPEC {
674    type DataType = u32;
675}
676
677#[doc = "Clear RD_REQ Interrupt Register"]
678pub type I2C2ClrRdReqReg = crate::RegValueT<I2C2ClrRdReqReg_SPEC>;
679
680impl I2C2ClrRdReqReg {
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, I2C2ClrRdReqReg_SPEC, crate::common::R> {
686        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrRdReqReg_SPEC,crate::common::R>::from_register(self,0)
687    }
688}
689impl ::core::default::Default for I2C2ClrRdReqReg {
690    #[inline(always)]
691    fn default() -> I2C2ClrRdReqReg {
692        <crate::RegValueT<I2C2ClrRdReqReg_SPEC> as RegisterValue<_>>::new(0)
693    }
694}
695
696#[doc(hidden)]
697#[derive(Copy, Clone, Eq, PartialEq)]
698pub struct I2C2ClrRxDoneReg_SPEC;
699impl crate::sealed::RegSpec for I2C2ClrRxDoneReg_SPEC {
700    type DataType = u32;
701}
702
703#[doc = "Clear RX_DONE Interrupt Register"]
704pub type I2C2ClrRxDoneReg = crate::RegValueT<I2C2ClrRxDoneReg_SPEC>;
705
706impl I2C2ClrRxDoneReg {
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, I2C2ClrRxDoneReg_SPEC, crate::common::R> {
712        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrRxDoneReg_SPEC,crate::common::R>::from_register(self,0)
713    }
714}
715impl ::core::default::Default for I2C2ClrRxDoneReg {
716    #[inline(always)]
717    fn default() -> I2C2ClrRxDoneReg {
718        <crate::RegValueT<I2C2ClrRxDoneReg_SPEC> as RegisterValue<_>>::new(0)
719    }
720}
721
722#[doc(hidden)]
723#[derive(Copy, Clone, Eq, PartialEq)]
724pub struct I2C2ClrRxOverReg_SPEC;
725impl crate::sealed::RegSpec for I2C2ClrRxOverReg_SPEC {
726    type DataType = u32;
727}
728
729#[doc = "Clear RX_OVER Interrupt Register"]
730pub type I2C2ClrRxOverReg = crate::RegValueT<I2C2ClrRxOverReg_SPEC>;
731
732impl I2C2ClrRxOverReg {
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, I2C2ClrRxOverReg_SPEC, crate::common::R> {
738        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrRxOverReg_SPEC,crate::common::R>::from_register(self,0)
739    }
740}
741impl ::core::default::Default for I2C2ClrRxOverReg {
742    #[inline(always)]
743    fn default() -> I2C2ClrRxOverReg {
744        <crate::RegValueT<I2C2ClrRxOverReg_SPEC> as RegisterValue<_>>::new(0)
745    }
746}
747
748#[doc(hidden)]
749#[derive(Copy, Clone, Eq, PartialEq)]
750pub struct I2C2ClrRxUnderReg_SPEC;
751impl crate::sealed::RegSpec for I2C2ClrRxUnderReg_SPEC {
752    type DataType = u32;
753}
754
755#[doc = "Clear RX_UNDER Interrupt Register"]
756pub type I2C2ClrRxUnderReg = crate::RegValueT<I2C2ClrRxUnderReg_SPEC>;
757
758impl I2C2ClrRxUnderReg {
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, I2C2ClrRxUnderReg_SPEC, crate::common::R> {
764        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrRxUnderReg_SPEC,crate::common::R>::from_register(self,0)
765    }
766}
767impl ::core::default::Default for I2C2ClrRxUnderReg {
768    #[inline(always)]
769    fn default() -> I2C2ClrRxUnderReg {
770        <crate::RegValueT<I2C2ClrRxUnderReg_SPEC> as RegisterValue<_>>::new(0)
771    }
772}
773
774#[doc(hidden)]
775#[derive(Copy, Clone, Eq, PartialEq)]
776pub struct I2C2ClrStartDetReg_SPEC;
777impl crate::sealed::RegSpec for I2C2ClrStartDetReg_SPEC {
778    type DataType = u32;
779}
780
781#[doc = "Clear START_DET Interrupt Register"]
782pub type I2C2ClrStartDetReg = crate::RegValueT<I2C2ClrStartDetReg_SPEC>;
783
784impl I2C2ClrStartDetReg {
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, I2C2ClrStartDetReg_SPEC, crate::common::R> {
790        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrStartDetReg_SPEC,crate::common::R>::from_register(self,0)
791    }
792}
793impl ::core::default::Default for I2C2ClrStartDetReg {
794    #[inline(always)]
795    fn default() -> I2C2ClrStartDetReg {
796        <crate::RegValueT<I2C2ClrStartDetReg_SPEC> as RegisterValue<_>>::new(0)
797    }
798}
799
800#[doc(hidden)]
801#[derive(Copy, Clone, Eq, PartialEq)]
802pub struct I2C2ClrStopDetReg_SPEC;
803impl crate::sealed::RegSpec for I2C2ClrStopDetReg_SPEC {
804    type DataType = u32;
805}
806
807#[doc = "Clear STOP_DET Interrupt Register"]
808pub type I2C2ClrStopDetReg = crate::RegValueT<I2C2ClrStopDetReg_SPEC>;
809
810impl I2C2ClrStopDetReg {
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, I2C2ClrStopDetReg_SPEC, crate::common::R> {
816        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrStopDetReg_SPEC,crate::common::R>::from_register(self,0)
817    }
818}
819impl ::core::default::Default for I2C2ClrStopDetReg {
820    #[inline(always)]
821    fn default() -> I2C2ClrStopDetReg {
822        <crate::RegValueT<I2C2ClrStopDetReg_SPEC> as RegisterValue<_>>::new(0)
823    }
824}
825
826#[doc(hidden)]
827#[derive(Copy, Clone, Eq, PartialEq)]
828pub struct I2C2ClrTxAbrtReg_SPEC;
829impl crate::sealed::RegSpec for I2C2ClrTxAbrtReg_SPEC {
830    type DataType = u32;
831}
832
833#[doc = "Clear TX_ABRT Interrupt Register"]
834pub type I2C2ClrTxAbrtReg = crate::RegValueT<I2C2ClrTxAbrtReg_SPEC>;
835
836impl I2C2ClrTxAbrtReg {
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, I2C2ClrTxAbrtReg_SPEC, crate::common::R> {
842        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrTxAbrtReg_SPEC,crate::common::R>::from_register(self,0)
843    }
844}
845impl ::core::default::Default for I2C2ClrTxAbrtReg {
846    #[inline(always)]
847    fn default() -> I2C2ClrTxAbrtReg {
848        <crate::RegValueT<I2C2ClrTxAbrtReg_SPEC> as RegisterValue<_>>::new(0)
849    }
850}
851
852#[doc(hidden)]
853#[derive(Copy, Clone, Eq, PartialEq)]
854pub struct I2C2ClrTxOverReg_SPEC;
855impl crate::sealed::RegSpec for I2C2ClrTxOverReg_SPEC {
856    type DataType = u32;
857}
858
859#[doc = "Clear TX_OVER Interrupt Register"]
860pub type I2C2ClrTxOverReg = crate::RegValueT<I2C2ClrTxOverReg_SPEC>;
861
862impl I2C2ClrTxOverReg {
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, I2C2ClrTxOverReg_SPEC, crate::common::R> {
868        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrTxOverReg_SPEC,crate::common::R>::from_register(self,0)
869    }
870}
871impl ::core::default::Default for I2C2ClrTxOverReg {
872    #[inline(always)]
873    fn default() -> I2C2ClrTxOverReg {
874        <crate::RegValueT<I2C2ClrTxOverReg_SPEC> as RegisterValue<_>>::new(0)
875    }
876}
877
878#[doc(hidden)]
879#[derive(Copy, Clone, Eq, PartialEq)]
880pub struct I2C2CompParam1Reg_SPEC;
881impl crate::sealed::RegSpec for I2C2CompParam1Reg_SPEC {
882    type DataType = u32;
883}
884
885#[doc = "Component Parameter Register"]
886pub type I2C2CompParam1Reg = crate::RegValueT<I2C2CompParam1Reg_SPEC>;
887
888impl I2C2CompParam1Reg {
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        I2C2CompParam1Reg_SPEC,
901        crate::common::R,
902    > {
903        crate::common::RegisterField::<
904            0,
905            0xffffffff,
906            1,
907            0,
908            u32,
909            u32,
910            I2C2CompParam1Reg_SPEC,
911            crate::common::R,
912        >::from_register(self, 0)
913    }
914}
915impl ::core::default::Default for I2C2CompParam1Reg {
916    #[inline(always)]
917    fn default() -> I2C2CompParam1Reg {
918        <crate::RegValueT<I2C2CompParam1Reg_SPEC> as RegisterValue<_>>::new(0)
919    }
920}
921
922#[doc(hidden)]
923#[derive(Copy, Clone, Eq, PartialEq)]
924pub struct I2C2CompTypeReg_SPEC;
925impl crate::sealed::RegSpec for I2C2CompTypeReg_SPEC {
926    type DataType = u32;
927}
928
929#[doc = "I2C Component Type Register"]
930pub type I2C2CompTypeReg = crate::RegValueT<I2C2CompTypeReg_SPEC>;
931
932impl I2C2CompTypeReg {
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        I2C2CompTypeReg_SPEC,
944        crate::common::R,
945    > {
946        crate::common::RegisterField::<
947            0,
948            0xffffffff,
949            1,
950            0,
951            u32,
952            u32,
953            I2C2CompTypeReg_SPEC,
954            crate::common::R,
955        >::from_register(self, 0)
956    }
957}
958impl ::core::default::Default for I2C2CompTypeReg {
959    #[inline(always)]
960    fn default() -> I2C2CompTypeReg {
961        <crate::RegValueT<I2C2CompTypeReg_SPEC> as RegisterValue<_>>::new(1146552640)
962    }
963}
964
965#[doc(hidden)]
966#[derive(Copy, Clone, Eq, PartialEq)]
967pub struct I2C2CompVersionReg_SPEC;
968impl crate::sealed::RegSpec for I2C2CompVersionReg_SPEC {
969    type DataType = u32;
970}
971
972#[doc = "I2C Component Version Register"]
973pub type I2C2CompVersionReg = crate::RegValueT<I2C2CompVersionReg_SPEC>;
974
975impl I2C2CompVersionReg {
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        I2C2CompVersionReg_SPEC,
987        crate::common::R,
988    > {
989        crate::common::RegisterField::<
990            0,
991            0xffffffff,
992            1,
993            0,
994            u32,
995            u32,
996            I2C2CompVersionReg_SPEC,
997            crate::common::R,
998        >::from_register(self, 0)
999    }
1000}
1001impl ::core::default::Default for I2C2CompVersionReg {
1002    #[inline(always)]
1003    fn default() -> I2C2CompVersionReg {
1004        <crate::RegValueT<I2C2CompVersionReg_SPEC> as RegisterValue<_>>::new(842019370)
1005    }
1006}
1007
1008#[doc(hidden)]
1009#[derive(Copy, Clone, Eq, PartialEq)]
1010pub struct I2C2ConReg_SPEC;
1011impl crate::sealed::RegSpec for I2C2ConReg_SPEC {
1012    type DataType = u32;
1013}
1014
1015#[doc = "I2C Control Register"]
1016pub type I2C2ConReg = crate::RegValueT<I2C2ConReg_SPEC>;
1017
1018impl I2C2ConReg {
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, I2C2ConReg_SPEC, crate::common::R> {
1024        crate::common::RegisterFieldBool::<10,1,0,I2C2ConReg_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, I2C2ConReg_SPEC, crate::common::RW> {
1032        crate::common::RegisterFieldBool::<9,1,0,I2C2ConReg_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, I2C2ConReg_SPEC, crate::common::RW> {
1040        crate::common::RegisterFieldBool::<8,1,0,I2C2ConReg_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, I2C2ConReg_SPEC, crate::common::RW> {
1048        crate::common::RegisterFieldBool::<7,1,0,I2C2ConReg_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, I2C2ConReg_SPEC, crate::common::RW> {
1056        crate::common::RegisterFieldBool::<6,1,0,I2C2ConReg_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, I2C2ConReg_SPEC, crate::common::RW> {
1064        crate::common::RegisterFieldBool::<5,1,0,I2C2ConReg_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, I2C2ConReg_SPEC, crate::common::RW> {
1072        crate::common::RegisterFieldBool::<4,1,0,I2C2ConReg_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, I2C2ConReg_SPEC, crate::common::RW> {
1080        crate::common::RegisterFieldBool::<3,1,0,I2C2ConReg_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, I2C2ConReg_SPEC, crate::common::RW>
1088    {
1089        crate::common::RegisterField::<1,0x3,1,0,u8,u8,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1090    }
1091
1092    #[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\'."]
1093    #[inline(always)]
1094    pub fn i2c_master_mode(
1095        self,
1096    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ConReg_SPEC, crate::common::RW> {
1097        crate::common::RegisterFieldBool::<0,1,0,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1098    }
1099}
1100impl ::core::default::Default for I2C2ConReg {
1101    #[inline(always)]
1102    fn default() -> I2C2ConReg {
1103        <crate::RegValueT<I2C2ConReg_SPEC> as RegisterValue<_>>::new(127)
1104    }
1105}
1106
1107#[doc(hidden)]
1108#[derive(Copy, Clone, Eq, PartialEq)]
1109pub struct I2C2DataCmdReg_SPEC;
1110impl crate::sealed::RegSpec for I2C2DataCmdReg_SPEC {
1111    type DataType = u32;
1112}
1113
1114#[doc = "I2C Rx/Tx Data Buffer and Command Register"]
1115pub type I2C2DataCmdReg = crate::RegValueT<I2C2DataCmdReg_SPEC>;
1116
1117impl I2C2DataCmdReg {
1118    #[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."]
1119    #[inline(always)]
1120    pub fn i2c_restart(
1121        self,
1122    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2DataCmdReg_SPEC, crate::common::W> {
1123        crate::common::RegisterFieldBool::<10,1,0,I2C2DataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1124    }
1125
1126    #[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."]
1127    #[inline(always)]
1128    pub fn i2c_stop(
1129        self,
1130    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2DataCmdReg_SPEC, crate::common::W> {
1131        crate::common::RegisterFieldBool::<9,1,0,I2C2DataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1132    }
1133
1134    #[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"]
1135    #[inline(always)]
1136    pub fn i2c_cmd(
1137        self,
1138    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2DataCmdReg_SPEC, crate::common::W> {
1139        crate::common::RegisterFieldBool::<8,1,0,I2C2DataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1140    }
1141
1142    #[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."]
1143    #[inline(always)]
1144    pub fn i2c_dat(
1145        self,
1146    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2C2DataCmdReg_SPEC, crate::common::RW>
1147    {
1148        crate::common::RegisterField::<0,0xff,1,0,u8,u8,I2C2DataCmdReg_SPEC,crate::common::RW>::from_register(self,0)
1149    }
1150}
1151impl ::core::default::Default for I2C2DataCmdReg {
1152    #[inline(always)]
1153    fn default() -> I2C2DataCmdReg {
1154        <crate::RegValueT<I2C2DataCmdReg_SPEC> as RegisterValue<_>>::new(0)
1155    }
1156}
1157
1158#[doc(hidden)]
1159#[derive(Copy, Clone, Eq, PartialEq)]
1160pub struct I2C2DmaCrReg_SPEC;
1161impl crate::sealed::RegSpec for I2C2DmaCrReg_SPEC {
1162    type DataType = u32;
1163}
1164
1165#[doc = "DMA Control Register"]
1166pub type I2C2DmaCrReg = crate::RegValueT<I2C2DmaCrReg_SPEC>;
1167
1168impl I2C2DmaCrReg {
1169    #[doc = "Transmit DMA Enable. //This bit enables/disables the transmit FIFO DMA channel.\n0 = Transmit DMA disabled\n1 = Transmit DMA enabled"]
1170    #[inline(always)]
1171    pub fn tdmae(
1172        self,
1173    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2DmaCrReg_SPEC, crate::common::RW> {
1174        crate::common::RegisterFieldBool::<1,1,0,I2C2DmaCrReg_SPEC,crate::common::RW>::from_register(self,0)
1175    }
1176
1177    #[doc = "Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel.\n0 = Receive DMA disabled\n1 = Receive DMA enabled"]
1178    #[inline(always)]
1179    pub fn rdmae(
1180        self,
1181    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2DmaCrReg_SPEC, crate::common::RW> {
1182        crate::common::RegisterFieldBool::<0,1,0,I2C2DmaCrReg_SPEC,crate::common::RW>::from_register(self,0)
1183    }
1184}
1185impl ::core::default::Default for I2C2DmaCrReg {
1186    #[inline(always)]
1187    fn default() -> I2C2DmaCrReg {
1188        <crate::RegValueT<I2C2DmaCrReg_SPEC> as RegisterValue<_>>::new(0)
1189    }
1190}
1191
1192#[doc(hidden)]
1193#[derive(Copy, Clone, Eq, PartialEq)]
1194pub struct I2C2DmaRdlrReg_SPEC;
1195impl crate::sealed::RegSpec for I2C2DmaRdlrReg_SPEC {
1196    type DataType = u32;
1197}
1198
1199#[doc = "I2C Receive Data Level Register"]
1200pub type I2C2DmaRdlrReg = crate::RegValueT<I2C2DmaRdlrReg_SPEC>;
1201
1202impl I2C2DmaRdlrReg {
1203    #[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."]
1204    #[inline(always)]
1205    pub fn dmardl(
1206        self,
1207    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2DmaRdlrReg_SPEC, crate::common::RW>
1208    {
1209        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2DmaRdlrReg_SPEC,crate::common::RW>::from_register(self,0)
1210    }
1211}
1212impl ::core::default::Default for I2C2DmaRdlrReg {
1213    #[inline(always)]
1214    fn default() -> I2C2DmaRdlrReg {
1215        <crate::RegValueT<I2C2DmaRdlrReg_SPEC> as RegisterValue<_>>::new(0)
1216    }
1217}
1218
1219#[doc(hidden)]
1220#[derive(Copy, Clone, Eq, PartialEq)]
1221pub struct I2C2DmaTdlrReg_SPEC;
1222impl crate::sealed::RegSpec for I2C2DmaTdlrReg_SPEC {
1223    type DataType = u32;
1224}
1225
1226#[doc = "DMA Transmit Data Level Register"]
1227pub type I2C2DmaTdlrReg = crate::RegValueT<I2C2DmaTdlrReg_SPEC>;
1228
1229impl I2C2DmaTdlrReg {
1230    #[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."]
1231    #[inline(always)]
1232    pub fn dmatdl(
1233        self,
1234    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2DmaTdlrReg_SPEC, crate::common::RW>
1235    {
1236        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2DmaTdlrReg_SPEC,crate::common::RW>::from_register(self,0)
1237    }
1238}
1239impl ::core::default::Default for I2C2DmaTdlrReg {
1240    #[inline(always)]
1241    fn default() -> I2C2DmaTdlrReg {
1242        <crate::RegValueT<I2C2DmaTdlrReg_SPEC> as RegisterValue<_>>::new(0)
1243    }
1244}
1245
1246#[doc(hidden)]
1247#[derive(Copy, Clone, Eq, PartialEq)]
1248pub struct I2C2EnableReg_SPEC;
1249impl crate::sealed::RegSpec for I2C2EnableReg_SPEC {
1250    type DataType = u32;
1251}
1252
1253#[doc = "I2C Enable Register"]
1254pub type I2C2EnableReg = crate::RegValueT<I2C2EnableReg_SPEC>;
1255
1256impl I2C2EnableReg {
1257    #[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."]
1258    #[inline(always)]
1259    pub fn i2c_tx_cmd_block(
1260        self,
1261    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2EnableReg_SPEC, crate::common::RW> {
1262        crate::common::RegisterFieldBool::<2,1,0,I2C2EnableReg_SPEC,crate::common::RW>::from_register(self,0)
1263    }
1264
1265    #[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."]
1266    #[inline(always)]
1267    pub fn i2c_abort(
1268        self,
1269    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2EnableReg_SPEC, crate::common::RW> {
1270        crate::common::RegisterFieldBool::<1,1,0,I2C2EnableReg_SPEC,crate::common::RW>::from_register(self,0)
1271    }
1272
1273    #[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"]
1274    #[inline(always)]
1275    pub fn i2c_en(
1276        self,
1277    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2EnableReg_SPEC, crate::common::RW> {
1278        crate::common::RegisterFieldBool::<0,1,0,I2C2EnableReg_SPEC,crate::common::RW>::from_register(self,0)
1279    }
1280}
1281impl ::core::default::Default for I2C2EnableReg {
1282    #[inline(always)]
1283    fn default() -> I2C2EnableReg {
1284        <crate::RegValueT<I2C2EnableReg_SPEC> as RegisterValue<_>>::new(0)
1285    }
1286}
1287
1288#[doc(hidden)]
1289#[derive(Copy, Clone, Eq, PartialEq)]
1290pub struct I2C2EnableStatusReg_SPEC;
1291impl crate::sealed::RegSpec for I2C2EnableStatusReg_SPEC {
1292    type DataType = u32;
1293}
1294
1295#[doc = "I2C Enable Status Register"]
1296pub type I2C2EnableStatusReg = crate::RegValueT<I2C2EnableStatusReg_SPEC>;
1297
1298impl I2C2EnableStatusReg {
1299    #[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"]
1300    #[inline(always)]
1301    pub fn slv_rx_data_lost(
1302        self,
1303    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2EnableStatusReg_SPEC, crate::common::R> {
1304        crate::common::RegisterFieldBool::<2,1,0,I2C2EnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1305    }
1306
1307    #[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"]
1308    #[inline(always)]
1309    pub fn slv_disabled_while_busy(
1310        self,
1311    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2EnableStatusReg_SPEC, crate::common::R> {
1312        crate::common::RegisterFieldBool::<1,1,0,I2C2EnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1313    }
1314
1315    #[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"]
1316    #[inline(always)]
1317    pub fn ic_en(
1318        self,
1319    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2EnableStatusReg_SPEC, crate::common::R> {
1320        crate::common::RegisterFieldBool::<0,1,0,I2C2EnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1321    }
1322}
1323impl ::core::default::Default for I2C2EnableStatusReg {
1324    #[inline(always)]
1325    fn default() -> I2C2EnableStatusReg {
1326        <crate::RegValueT<I2C2EnableStatusReg_SPEC> as RegisterValue<_>>::new(0)
1327    }
1328}
1329
1330#[doc(hidden)]
1331#[derive(Copy, Clone, Eq, PartialEq)]
1332pub struct I2C2FsSclHcntReg_SPEC;
1333impl crate::sealed::RegSpec for I2C2FsSclHcntReg_SPEC {
1334    type DataType = u32;
1335}
1336
1337#[doc = "Fast Speed I2C Clock SCL High Count Register"]
1338pub type I2C2FsSclHcntReg = crate::RegValueT<I2C2FsSclHcntReg_SPEC>;
1339
1340impl I2C2FsSclHcntReg {
1341    #[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."]
1342    #[inline(always)]
1343    pub fn ic_fs_scl_hcnt(
1344        self,
1345    ) -> crate::common::RegisterField<
1346        0,
1347        0xffff,
1348        1,
1349        0,
1350        u16,
1351        u16,
1352        I2C2FsSclHcntReg_SPEC,
1353        crate::common::RW,
1354    > {
1355        crate::common::RegisterField::<
1356            0,
1357            0xffff,
1358            1,
1359            0,
1360            u16,
1361            u16,
1362            I2C2FsSclHcntReg_SPEC,
1363            crate::common::RW,
1364        >::from_register(self, 0)
1365    }
1366}
1367impl ::core::default::Default for I2C2FsSclHcntReg {
1368    #[inline(always)]
1369    fn default() -> I2C2FsSclHcntReg {
1370        <crate::RegValueT<I2C2FsSclHcntReg_SPEC> as RegisterValue<_>>::new(26)
1371    }
1372}
1373
1374#[doc(hidden)]
1375#[derive(Copy, Clone, Eq, PartialEq)]
1376pub struct I2C2FsSclLcntReg_SPEC;
1377impl crate::sealed::RegSpec for I2C2FsSclLcntReg_SPEC {
1378    type DataType = u32;
1379}
1380
1381#[doc = "Fast Speed I2C Clock SCL Low Count Register"]
1382pub type I2C2FsSclLcntReg = crate::RegValueT<I2C2FsSclLcntReg_SPEC>;
1383
1384impl I2C2FsSclLcntReg {
1385    #[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."]
1386    #[inline(always)]
1387    pub fn ic_fs_scl_lcnt(
1388        self,
1389    ) -> crate::common::RegisterField<
1390        0,
1391        0xffff,
1392        1,
1393        0,
1394        u16,
1395        u16,
1396        I2C2FsSclLcntReg_SPEC,
1397        crate::common::RW,
1398    > {
1399        crate::common::RegisterField::<
1400            0,
1401            0xffff,
1402            1,
1403            0,
1404            u16,
1405            u16,
1406            I2C2FsSclLcntReg_SPEC,
1407            crate::common::RW,
1408        >::from_register(self, 0)
1409    }
1410}
1411impl ::core::default::Default for I2C2FsSclLcntReg {
1412    #[inline(always)]
1413    fn default() -> I2C2FsSclLcntReg {
1414        <crate::RegValueT<I2C2FsSclLcntReg_SPEC> as RegisterValue<_>>::new(50)
1415    }
1416}
1417
1418#[doc(hidden)]
1419#[derive(Copy, Clone, Eq, PartialEq)]
1420pub struct I2C2HsMaddrReg_SPEC;
1421impl crate::sealed::RegSpec for I2C2HsMaddrReg_SPEC {
1422    type DataType = u32;
1423}
1424
1425#[doc = "I2C High Speed Master Mode Code Address Register"]
1426pub type I2C2HsMaddrReg = crate::RegValueT<I2C2HsMaddrReg_SPEC>;
1427
1428impl I2C2HsMaddrReg {
1429    #[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."]
1430    #[inline(always)]
1431    pub fn i2c_ic_hs_mar(
1432        self,
1433    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, I2C2HsMaddrReg_SPEC, crate::common::RW>
1434    {
1435        crate::common::RegisterField::<0,0x7,1,0,u8,u8,I2C2HsMaddrReg_SPEC,crate::common::RW>::from_register(self,0)
1436    }
1437}
1438impl ::core::default::Default for I2C2HsMaddrReg {
1439    #[inline(always)]
1440    fn default() -> I2C2HsMaddrReg {
1441        <crate::RegValueT<I2C2HsMaddrReg_SPEC> as RegisterValue<_>>::new(1)
1442    }
1443}
1444
1445#[doc(hidden)]
1446#[derive(Copy, Clone, Eq, PartialEq)]
1447pub struct I2C2HsSclHcntReg_SPEC;
1448impl crate::sealed::RegSpec for I2C2HsSclHcntReg_SPEC {
1449    type DataType = u32;
1450}
1451
1452#[doc = "High Speed I2C Clock SCL High Count Register"]
1453pub type I2C2HsSclHcntReg = crate::RegValueT<I2C2HsSclHcntReg_SPEC>;
1454
1455impl I2C2HsSclHcntReg {
1456    #[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."]
1457    #[inline(always)]
1458    pub fn ic_hs_scl_hcnt(
1459        self,
1460    ) -> crate::common::RegisterField<
1461        0,
1462        0xffff,
1463        1,
1464        0,
1465        u16,
1466        u16,
1467        I2C2HsSclHcntReg_SPEC,
1468        crate::common::RW,
1469    > {
1470        crate::common::RegisterField::<
1471            0,
1472            0xffff,
1473            1,
1474            0,
1475            u16,
1476            u16,
1477            I2C2HsSclHcntReg_SPEC,
1478            crate::common::RW,
1479        >::from_register(self, 0)
1480    }
1481}
1482impl ::core::default::Default for I2C2HsSclHcntReg {
1483    #[inline(always)]
1484    fn default() -> I2C2HsSclHcntReg {
1485        <crate::RegValueT<I2C2HsSclHcntReg_SPEC> as RegisterValue<_>>::new(6)
1486    }
1487}
1488
1489#[doc(hidden)]
1490#[derive(Copy, Clone, Eq, PartialEq)]
1491pub struct I2C2HsSclLcntReg_SPEC;
1492impl crate::sealed::RegSpec for I2C2HsSclLcntReg_SPEC {
1493    type DataType = u32;
1494}
1495
1496#[doc = "High Speed I2C Clock SCL Low Count Register"]
1497pub type I2C2HsSclLcntReg = crate::RegValueT<I2C2HsSclLcntReg_SPEC>;
1498
1499impl I2C2HsSclLcntReg {
1500    #[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."]
1501    #[inline(always)]
1502    pub fn ic_hs_scl_lcnt(
1503        self,
1504    ) -> crate::common::RegisterField<
1505        0,
1506        0xffff,
1507        1,
1508        0,
1509        u16,
1510        u16,
1511        I2C2HsSclLcntReg_SPEC,
1512        crate::common::RW,
1513    > {
1514        crate::common::RegisterField::<
1515            0,
1516            0xffff,
1517            1,
1518            0,
1519            u16,
1520            u16,
1521            I2C2HsSclLcntReg_SPEC,
1522            crate::common::RW,
1523        >::from_register(self, 0)
1524    }
1525}
1526impl ::core::default::Default for I2C2HsSclLcntReg {
1527    #[inline(always)]
1528    fn default() -> I2C2HsSclLcntReg {
1529        <crate::RegValueT<I2C2HsSclLcntReg_SPEC> as RegisterValue<_>>::new(16)
1530    }
1531}
1532
1533#[doc(hidden)]
1534#[derive(Copy, Clone, Eq, PartialEq)]
1535pub struct I2C2IcFsSpklenReg_SPEC;
1536impl crate::sealed::RegSpec for I2C2IcFsSpklenReg_SPEC {
1537    type DataType = u32;
1538}
1539
1540#[doc = "I2C SS and FS spike suppression limit Size"]
1541pub type I2C2IcFsSpklenReg = crate::RegValueT<I2C2IcFsSpklenReg_SPEC>;
1542
1543impl I2C2IcFsSpklenReg {
1544    #[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."]
1545    #[inline(always)]
1546    pub fn i2c_fs_spklen(
1547        self,
1548    ) -> crate::common::RegisterField<
1549        0,
1550        0xff,
1551        1,
1552        0,
1553        u8,
1554        u8,
1555        I2C2IcFsSpklenReg_SPEC,
1556        crate::common::RW,
1557    > {
1558        crate::common::RegisterField::<
1559            0,
1560            0xff,
1561            1,
1562            0,
1563            u8,
1564            u8,
1565            I2C2IcFsSpklenReg_SPEC,
1566            crate::common::RW,
1567        >::from_register(self, 0)
1568    }
1569}
1570impl ::core::default::Default for I2C2IcFsSpklenReg {
1571    #[inline(always)]
1572    fn default() -> I2C2IcFsSpklenReg {
1573        <crate::RegValueT<I2C2IcFsSpklenReg_SPEC> as RegisterValue<_>>::new(1)
1574    }
1575}
1576
1577#[doc(hidden)]
1578#[derive(Copy, Clone, Eq, PartialEq)]
1579pub struct I2C2IcHsSpklenReg_SPEC;
1580impl crate::sealed::RegSpec for I2C2IcHsSpklenReg_SPEC {
1581    type DataType = u32;
1582}
1583
1584#[doc = "I2C HS spike suppression limit Size"]
1585pub type I2C2IcHsSpklenReg = crate::RegValueT<I2C2IcHsSpklenReg_SPEC>;
1586
1587impl I2C2IcHsSpklenReg {
1588    #[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."]
1589    #[inline(always)]
1590    pub fn i2c_hs_spklen(
1591        self,
1592    ) -> crate::common::RegisterField<
1593        0,
1594        0xff,
1595        1,
1596        0,
1597        u8,
1598        u8,
1599        I2C2IcHsSpklenReg_SPEC,
1600        crate::common::RW,
1601    > {
1602        crate::common::RegisterField::<
1603            0,
1604            0xff,
1605            1,
1606            0,
1607            u8,
1608            u8,
1609            I2C2IcHsSpklenReg_SPEC,
1610            crate::common::RW,
1611        >::from_register(self, 0)
1612    }
1613}
1614impl ::core::default::Default for I2C2IcHsSpklenReg {
1615    #[inline(always)]
1616    fn default() -> I2C2IcHsSpklenReg {
1617        <crate::RegValueT<I2C2IcHsSpklenReg_SPEC> as RegisterValue<_>>::new(1)
1618    }
1619}
1620
1621#[doc(hidden)]
1622#[derive(Copy, Clone, Eq, PartialEq)]
1623pub struct I2C2IntrMaskReg_SPEC;
1624impl crate::sealed::RegSpec for I2C2IntrMaskReg_SPEC {
1625    type DataType = u32;
1626}
1627
1628#[doc = "I2C Interrupt Mask Register"]
1629pub type I2C2IntrMaskReg = crate::RegValueT<I2C2IntrMaskReg_SPEC>;
1630
1631impl I2C2IntrMaskReg {
1632    #[doc = "M_SCL_STUCK_AT_LOW Register field Reserved bits"]
1633    #[inline(always)]
1634    pub fn m_scl_stuck_at_low(
1635        self,
1636    ) -> crate::common::RegisterFieldBool<14, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::R> {
1637        crate::common::RegisterFieldBool::<14,1,0,I2C2IntrMaskReg_SPEC,crate::common::R>::from_register(self,0)
1638    }
1639
1640    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1641    #[inline(always)]
1642    pub fn m_master_on_hold(
1643        self,
1644    ) -> crate::common::RegisterFieldBool<13, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1645        crate::common::RegisterFieldBool::<13,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1646    }
1647
1648    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1649    #[inline(always)]
1650    pub fn m_restart_det(
1651        self,
1652    ) -> crate::common::RegisterFieldBool<12, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1653        crate::common::RegisterFieldBool::<12,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1654    }
1655
1656    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1657    #[inline(always)]
1658    pub fn m_gen_call(
1659        self,
1660    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1661        crate::common::RegisterFieldBool::<11,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1662    }
1663
1664    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1665    #[inline(always)]
1666    pub fn m_start_det(
1667        self,
1668    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1669        crate::common::RegisterFieldBool::<10,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1670    }
1671
1672    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1673    #[inline(always)]
1674    pub fn m_stop_det(
1675        self,
1676    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1677        crate::common::RegisterFieldBool::<9,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1678    }
1679
1680    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1681    #[inline(always)]
1682    pub fn m_activity(
1683        self,
1684    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1685        crate::common::RegisterFieldBool::<8,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1686    }
1687
1688    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1689    #[inline(always)]
1690    pub fn m_rx_done(
1691        self,
1692    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1693        crate::common::RegisterFieldBool::<7,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1694    }
1695
1696    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1697    #[inline(always)]
1698    pub fn m_tx_abrt(
1699        self,
1700    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1701        crate::common::RegisterFieldBool::<6,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1702    }
1703
1704    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1705    #[inline(always)]
1706    pub fn m_rd_req(
1707        self,
1708    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1709        crate::common::RegisterFieldBool::<5,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1710    }
1711
1712    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1713    #[inline(always)]
1714    pub fn m_tx_empty(
1715        self,
1716    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1717        crate::common::RegisterFieldBool::<4,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1718    }
1719
1720    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1721    #[inline(always)]
1722    pub fn m_tx_over(
1723        self,
1724    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1725        crate::common::RegisterFieldBool::<3,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1726    }
1727
1728    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1729    #[inline(always)]
1730    pub fn m_rx_full(
1731        self,
1732    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1733        crate::common::RegisterFieldBool::<2,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1734    }
1735
1736    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1737    #[inline(always)]
1738    pub fn m_rx_over(
1739        self,
1740    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1741        crate::common::RegisterFieldBool::<1,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1742    }
1743
1744    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1745    #[inline(always)]
1746    pub fn m_rx_under(
1747        self,
1748    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1749        crate::common::RegisterFieldBool::<0,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1750    }
1751}
1752impl ::core::default::Default for I2C2IntrMaskReg {
1753    #[inline(always)]
1754    fn default() -> I2C2IntrMaskReg {
1755        <crate::RegValueT<I2C2IntrMaskReg_SPEC> as RegisterValue<_>>::new(2303)
1756    }
1757}
1758
1759#[doc(hidden)]
1760#[derive(Copy, Clone, Eq, PartialEq)]
1761pub struct I2C2IntrStatReg_SPEC;
1762impl crate::sealed::RegSpec for I2C2IntrStatReg_SPEC {
1763    type DataType = u32;
1764}
1765
1766#[doc = "I2C Interrupt Status Register"]
1767pub type I2C2IntrStatReg = crate::RegValueT<I2C2IntrStatReg_SPEC>;
1768
1769impl I2C2IntrStatReg {
1770    #[doc = "1 = R_SCL_STUCK_AT_LOW interrupt is active\n0 = R_SCL_STUCK_AT_LOW interrupt is inactive"]
1771    #[inline(always)]
1772    pub fn r_scl_stuck_at_low(
1773        self,
1774    ) -> crate::common::RegisterFieldBool<14, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1775        crate::common::RegisterFieldBool::<14,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1776    }
1777
1778    #[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."]
1779    #[inline(always)]
1780    pub fn r_master_on_hold(
1781        self,
1782    ) -> crate::common::RegisterFieldBool<13, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1783        crate::common::RegisterFieldBool::<13,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1784    }
1785
1786    #[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."]
1787    #[inline(always)]
1788    pub fn r_restart_det(
1789        self,
1790    ) -> crate::common::RegisterFieldBool<12, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1791        crate::common::RegisterFieldBool::<12,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1792    }
1793
1794    #[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."]
1795    #[inline(always)]
1796    pub fn r_gen_call(
1797        self,
1798    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1799        crate::common::RegisterFieldBool::<11,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1800    }
1801
1802    #[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."]
1803    #[inline(always)]
1804    pub fn r_start_det(
1805        self,
1806    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1807        crate::common::RegisterFieldBool::<10,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1808    }
1809
1810    #[doc = "Indicates whether a STOP condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1811    #[inline(always)]
1812    pub fn r_stop_det(
1813        self,
1814    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1815        crate::common::RegisterFieldBool::<9,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1816    }
1817
1818    #[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."]
1819    #[inline(always)]
1820    pub fn r_activity(
1821        self,
1822    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1823        crate::common::RegisterFieldBool::<8,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1824    }
1825
1826    #[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."]
1827    #[inline(always)]
1828    pub fn r_rx_done(
1829        self,
1830    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1831        crate::common::RegisterFieldBool::<7,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1832    }
1833
1834    #[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."]
1835    #[inline(always)]
1836    pub fn r_tx_abrt(
1837        self,
1838    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1839        crate::common::RegisterFieldBool::<6,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1840    }
1841
1842    #[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"]
1843    #[inline(always)]
1844    pub fn r_rd_req(
1845        self,
1846    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1847        crate::common::RegisterFieldBool::<5,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1848    }
1849
1850    #[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."]
1851    #[inline(always)]
1852    pub fn r_tx_empty(
1853        self,
1854    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1855        crate::common::RegisterFieldBool::<4,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1856    }
1857
1858    #[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"]
1859    #[inline(always)]
1860    pub fn r_tx_over(
1861        self,
1862    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1863        crate::common::RegisterFieldBool::<3,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1864    }
1865
1866    #[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."]
1867    #[inline(always)]
1868    pub fn r_rx_full(
1869        self,
1870    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1871        crate::common::RegisterFieldBool::<2,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1872    }
1873
1874    #[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."]
1875    #[inline(always)]
1876    pub fn r_rx_over(
1877        self,
1878    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1879        crate::common::RegisterFieldBool::<1,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1880    }
1881
1882    #[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."]
1883    #[inline(always)]
1884    pub fn r_rx_under(
1885        self,
1886    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1887        crate::common::RegisterFieldBool::<0,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1888    }
1889}
1890impl ::core::default::Default for I2C2IntrStatReg {
1891    #[inline(always)]
1892    fn default() -> I2C2IntrStatReg {
1893        <crate::RegValueT<I2C2IntrStatReg_SPEC> as RegisterValue<_>>::new(0)
1894    }
1895}
1896
1897#[doc(hidden)]
1898#[derive(Copy, Clone, Eq, PartialEq)]
1899pub struct I2C2RawIntrStatReg_SPEC;
1900impl crate::sealed::RegSpec for I2C2RawIntrStatReg_SPEC {
1901    type DataType = u32;
1902}
1903
1904#[doc = "I2C Raw Interrupt Status Register"]
1905pub type I2C2RawIntrStatReg = crate::RegValueT<I2C2RawIntrStatReg_SPEC>;
1906
1907impl I2C2RawIntrStatReg {
1908    #[doc = "CL_STUCK_AT_LOW Register field Reserved bits"]
1909    #[inline(always)]
1910    pub fn scl_stuck_at_low(
1911        self,
1912    ) -> crate::common::RegisterFieldBool<14, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1913        crate::common::RegisterFieldBool::<14,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1914    }
1915
1916    #[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."]
1917    #[inline(always)]
1918    pub fn master_on_hold(
1919        self,
1920    ) -> crate::common::RegisterFieldBool<13, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1921        crate::common::RegisterFieldBool::<13,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1922    }
1923
1924    #[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."]
1925    #[inline(always)]
1926    pub fn restart_det(
1927        self,
1928    ) -> crate::common::RegisterFieldBool<12, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1929        crate::common::RegisterFieldBool::<12,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1930    }
1931
1932    #[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."]
1933    #[inline(always)]
1934    pub fn gen_call(
1935        self,
1936    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1937        crate::common::RegisterFieldBool::<11,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1938    }
1939
1940    #[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."]
1941    #[inline(always)]
1942    pub fn start_det(
1943        self,
1944    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1945        crate::common::RegisterFieldBool::<10,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1946    }
1947
1948    #[doc = "Indicates whether a STOP condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1949    #[inline(always)]
1950    pub fn stop_det(
1951        self,
1952    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1953        crate::common::RegisterFieldBool::<9,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1954    }
1955
1956    #[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."]
1957    #[inline(always)]
1958    pub fn activity(
1959        self,
1960    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1961        crate::common::RegisterFieldBool::<8,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1962    }
1963
1964    #[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."]
1965    #[inline(always)]
1966    pub fn rx_done(
1967        self,
1968    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1969        crate::common::RegisterFieldBool::<7,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1970    }
1971
1972    #[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."]
1973    #[inline(always)]
1974    pub fn tx_abrt(
1975        self,
1976    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1977        crate::common::RegisterFieldBool::<6,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1978    }
1979
1980    #[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"]
1981    #[inline(always)]
1982    pub fn rd_req(
1983        self,
1984    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1985        crate::common::RegisterFieldBool::<5,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1986    }
1987
1988    #[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."]
1989    #[inline(always)]
1990    pub fn tx_empty(
1991        self,
1992    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1993        crate::common::RegisterFieldBool::<4,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1994    }
1995
1996    #[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"]
1997    #[inline(always)]
1998    pub fn tx_over(
1999        self,
2000    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
2001        crate::common::RegisterFieldBool::<3,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
2002    }
2003
2004    #[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."]
2005    #[inline(always)]
2006    pub fn rx_full(
2007        self,
2008    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
2009        crate::common::RegisterFieldBool::<2,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
2010    }
2011
2012    #[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."]
2013    #[inline(always)]
2014    pub fn rx_over(
2015        self,
2016    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
2017        crate::common::RegisterFieldBool::<1,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
2018    }
2019
2020    #[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."]
2021    #[inline(always)]
2022    pub fn rx_under(
2023        self,
2024    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
2025        crate::common::RegisterFieldBool::<0,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
2026    }
2027}
2028impl ::core::default::Default for I2C2RawIntrStatReg {
2029    #[inline(always)]
2030    fn default() -> I2C2RawIntrStatReg {
2031        <crate::RegValueT<I2C2RawIntrStatReg_SPEC> as RegisterValue<_>>::new(0)
2032    }
2033}
2034
2035#[doc(hidden)]
2036#[derive(Copy, Clone, Eq, PartialEq)]
2037pub struct I2C2RxflrReg_SPEC;
2038impl crate::sealed::RegSpec for I2C2RxflrReg_SPEC {
2039    type DataType = u32;
2040}
2041
2042#[doc = "I2C Receive FIFO Level Register"]
2043pub type I2C2RxflrReg = crate::RegValueT<I2C2RxflrReg_SPEC>;
2044
2045impl I2C2RxflrReg {
2046    #[doc = "Receive FIFO Level. Contains the number of valid data entries in the receive FIFO. Size is constrained by the RXFLR value"]
2047    #[inline(always)]
2048    pub fn rxflr(
2049        self,
2050    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, I2C2RxflrReg_SPEC, crate::common::R>
2051    {
2052        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,I2C2RxflrReg_SPEC,crate::common::R>::from_register(self,0)
2053    }
2054}
2055impl ::core::default::Default for I2C2RxflrReg {
2056    #[inline(always)]
2057    fn default() -> I2C2RxflrReg {
2058        <crate::RegValueT<I2C2RxflrReg_SPEC> as RegisterValue<_>>::new(0)
2059    }
2060}
2061
2062#[doc(hidden)]
2063#[derive(Copy, Clone, Eq, PartialEq)]
2064pub struct I2C2RxTlReg_SPEC;
2065impl crate::sealed::RegSpec for I2C2RxTlReg_SPEC {
2066    type DataType = u32;
2067}
2068
2069#[doc = "I2C Receive FIFO Threshold Register"]
2070pub type I2C2RxTlReg = crate::RegValueT<I2C2RxTlReg_SPEC>;
2071
2072impl I2C2RxTlReg {
2073    #[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."]
2074    #[inline(always)]
2075    pub fn rx_tl(
2076        self,
2077    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2RxTlReg_SPEC, crate::common::RW>
2078    {
2079        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2RxTlReg_SPEC,crate::common::RW>::from_register(self,0)
2080    }
2081}
2082impl ::core::default::Default for I2C2RxTlReg {
2083    #[inline(always)]
2084    fn default() -> I2C2RxTlReg {
2085        <crate::RegValueT<I2C2RxTlReg_SPEC> as RegisterValue<_>>::new(0)
2086    }
2087}
2088
2089#[doc(hidden)]
2090#[derive(Copy, Clone, Eq, PartialEq)]
2091pub struct I2C2SarReg_SPEC;
2092impl crate::sealed::RegSpec for I2C2SarReg_SPEC {
2093    type DataType = u32;
2094}
2095
2096#[doc = "I2C Slave Address Register"]
2097pub type I2C2SarReg = crate::RegValueT<I2C2SarReg_SPEC>;
2098
2099impl I2C2SarReg {
2100    #[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."]
2101    #[inline(always)]
2102    pub fn ic_sar(
2103        self,
2104    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, I2C2SarReg_SPEC, crate::common::RW>
2105    {
2106        crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,I2C2SarReg_SPEC,crate::common::RW>::from_register(self,0)
2107    }
2108}
2109impl ::core::default::Default for I2C2SarReg {
2110    #[inline(always)]
2111    fn default() -> I2C2SarReg {
2112        <crate::RegValueT<I2C2SarReg_SPEC> as RegisterValue<_>>::new(85)
2113    }
2114}
2115
2116#[doc(hidden)]
2117#[derive(Copy, Clone, Eq, PartialEq)]
2118pub struct I2C2SdaHoldReg_SPEC;
2119impl crate::sealed::RegSpec for I2C2SdaHoldReg_SPEC {
2120    type DataType = u32;
2121}
2122
2123#[doc = "I2C SDA Hold Time Length Register"]
2124pub type I2C2SdaHoldReg = crate::RegValueT<I2C2SdaHoldReg_SPEC>;
2125
2126impl I2C2SdaHoldReg {
2127    #[doc = "Sets the required SDA hold time in units of ic_clk period, when receiver."]
2128    #[inline(always)]
2129    pub fn i2c_sda_rx_hold(
2130        self,
2131    ) -> crate::common::RegisterField<16, 0xff, 1, 0, u8, u8, I2C2SdaHoldReg_SPEC, crate::common::RW>
2132    {
2133        crate::common::RegisterField::<16,0xff,1,0,u8,u8,I2C2SdaHoldReg_SPEC,crate::common::RW>::from_register(self,0)
2134    }
2135
2136    #[doc = "Sets the required SDA hold time in units of ic_clk period, when transmitter."]
2137    #[inline(always)]
2138    pub fn i2c_sda_tx_hold(
2139        self,
2140    ) -> crate::common::RegisterField<
2141        0,
2142        0xffff,
2143        1,
2144        0,
2145        u16,
2146        u16,
2147        I2C2SdaHoldReg_SPEC,
2148        crate::common::RW,
2149    > {
2150        crate::common::RegisterField::<
2151            0,
2152            0xffff,
2153            1,
2154            0,
2155            u16,
2156            u16,
2157            I2C2SdaHoldReg_SPEC,
2158            crate::common::RW,
2159        >::from_register(self, 0)
2160    }
2161}
2162impl ::core::default::Default for I2C2SdaHoldReg {
2163    #[inline(always)]
2164    fn default() -> I2C2SdaHoldReg {
2165        <crate::RegValueT<I2C2SdaHoldReg_SPEC> as RegisterValue<_>>::new(1)
2166    }
2167}
2168
2169#[doc(hidden)]
2170#[derive(Copy, Clone, Eq, PartialEq)]
2171pub struct I2C2SdaSetupReg_SPEC;
2172impl crate::sealed::RegSpec for I2C2SdaSetupReg_SPEC {
2173    type DataType = u32;
2174}
2175
2176#[doc = "I2C SDA Setup Register"]
2177pub type I2C2SdaSetupReg = crate::RegValueT<I2C2SdaSetupReg_SPEC>;
2178
2179impl I2C2SdaSetupReg {
2180    #[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."]
2181    #[inline(always)]
2182    pub fn sda_setup(
2183        self,
2184    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2C2SdaSetupReg_SPEC, crate::common::RW>
2185    {
2186        crate::common::RegisterField::<0,0xff,1,0,u8,u8,I2C2SdaSetupReg_SPEC,crate::common::RW>::from_register(self,0)
2187    }
2188}
2189impl ::core::default::Default for I2C2SdaSetupReg {
2190    #[inline(always)]
2191    fn default() -> I2C2SdaSetupReg {
2192        <crate::RegValueT<I2C2SdaSetupReg_SPEC> as RegisterValue<_>>::new(100)
2193    }
2194}
2195
2196#[doc(hidden)]
2197#[derive(Copy, Clone, Eq, PartialEq)]
2198pub struct I2C2SsSclHcntReg_SPEC;
2199impl crate::sealed::RegSpec for I2C2SsSclHcntReg_SPEC {
2200    type DataType = u32;
2201}
2202
2203#[doc = "Standard Speed I2C Clock SCL High Count Register"]
2204pub type I2C2SsSclHcntReg = crate::RegValueT<I2C2SsSclHcntReg_SPEC>;
2205
2206impl I2C2SsSclHcntReg {
2207    #[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."]
2208    #[inline(always)]
2209    pub fn ic_ss_scl_hcnt(
2210        self,
2211    ) -> crate::common::RegisterField<
2212        0,
2213        0xffff,
2214        1,
2215        0,
2216        u16,
2217        u16,
2218        I2C2SsSclHcntReg_SPEC,
2219        crate::common::RW,
2220    > {
2221        crate::common::RegisterField::<
2222            0,
2223            0xffff,
2224            1,
2225            0,
2226            u16,
2227            u16,
2228            I2C2SsSclHcntReg_SPEC,
2229            crate::common::RW,
2230        >::from_register(self, 0)
2231    }
2232}
2233impl ::core::default::Default for I2C2SsSclHcntReg {
2234    #[inline(always)]
2235    fn default() -> I2C2SsSclHcntReg {
2236        <crate::RegValueT<I2C2SsSclHcntReg_SPEC> as RegisterValue<_>>::new(145)
2237    }
2238}
2239
2240#[doc(hidden)]
2241#[derive(Copy, Clone, Eq, PartialEq)]
2242pub struct I2C2SsSclLcntReg_SPEC;
2243impl crate::sealed::RegSpec for I2C2SsSclLcntReg_SPEC {
2244    type DataType = u32;
2245}
2246
2247#[doc = "Standard Speed I2C Clock SCL Low Count Register"]
2248pub type I2C2SsSclLcntReg = crate::RegValueT<I2C2SsSclLcntReg_SPEC>;
2249
2250impl I2C2SsSclLcntReg {
2251    #[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."]
2252    #[inline(always)]
2253    pub fn ic_ss_scl_lcnt(
2254        self,
2255    ) -> crate::common::RegisterField<
2256        0,
2257        0xffff,
2258        1,
2259        0,
2260        u16,
2261        u16,
2262        I2C2SsSclLcntReg_SPEC,
2263        crate::common::RW,
2264    > {
2265        crate::common::RegisterField::<
2266            0,
2267            0xffff,
2268            1,
2269            0,
2270            u16,
2271            u16,
2272            I2C2SsSclLcntReg_SPEC,
2273            crate::common::RW,
2274        >::from_register(self, 0)
2275    }
2276}
2277impl ::core::default::Default for I2C2SsSclLcntReg {
2278    #[inline(always)]
2279    fn default() -> I2C2SsSclLcntReg {
2280        <crate::RegValueT<I2C2SsSclLcntReg_SPEC> as RegisterValue<_>>::new(171)
2281    }
2282}
2283
2284#[doc(hidden)]
2285#[derive(Copy, Clone, Eq, PartialEq)]
2286pub struct I2C2StatusReg_SPEC;
2287impl crate::sealed::RegSpec for I2C2StatusReg_SPEC {
2288    type DataType = u32;
2289}
2290
2291#[doc = "I2C Status Register"]
2292pub type I2C2StatusReg = crate::RegValueT<I2C2StatusReg_SPEC>;
2293
2294impl I2C2StatusReg {
2295    #[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"]
2296    #[inline(always)]
2297    pub fn lv_hold_rx_fifo_full(
2298        self,
2299    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2300        crate::common::RegisterFieldBool::<10,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2301    }
2302
2303    #[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"]
2304    #[inline(always)]
2305    pub fn slv_hold_tx_fifo_empty(
2306        self,
2307    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2308        crate::common::RegisterFieldBool::<9,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2309    }
2310
2311    #[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"]
2312    #[inline(always)]
2313    pub fn mst_hold_rx_fifo_full(
2314        self,
2315    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2316        crate::common::RegisterFieldBool::<8,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2317    }
2318
2319    #[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"]
2320    #[inline(always)]
2321    pub fn mst_hold_tx_fifo_empty(
2322        self,
2323    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2324        crate::common::RegisterFieldBool::<7,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2325    }
2326
2327    #[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"]
2328    #[inline(always)]
2329    pub fn slv_activity(
2330        self,
2331    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2332        crate::common::RegisterFieldBool::<6,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2333    }
2334
2335    #[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"]
2336    #[inline(always)]
2337    pub fn mst_activity(
2338        self,
2339    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2340        crate::common::RegisterFieldBool::<5,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2341    }
2342
2343    #[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"]
2344    #[inline(always)]
2345    pub fn rff(
2346        self,
2347    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2348        crate::common::RegisterFieldBool::<4,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2349    }
2350
2351    #[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"]
2352    #[inline(always)]
2353    pub fn rfne(
2354        self,
2355    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2356        crate::common::RegisterFieldBool::<3,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2357    }
2358
2359    #[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"]
2360    #[inline(always)]
2361    pub fn tfe(
2362        self,
2363    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2364        crate::common::RegisterFieldBool::<2,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2365    }
2366
2367    #[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"]
2368    #[inline(always)]
2369    pub fn tfnf(
2370        self,
2371    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2372        crate::common::RegisterFieldBool::<1,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2373    }
2374
2375    #[doc = "I2C Activity Status."]
2376    #[inline(always)]
2377    pub fn i2c_activity(
2378        self,
2379    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2380        crate::common::RegisterFieldBool::<0,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2381    }
2382}
2383impl ::core::default::Default for I2C2StatusReg {
2384    #[inline(always)]
2385    fn default() -> I2C2StatusReg {
2386        <crate::RegValueT<I2C2StatusReg_SPEC> as RegisterValue<_>>::new(6)
2387    }
2388}
2389
2390#[doc(hidden)]
2391#[derive(Copy, Clone, Eq, PartialEq)]
2392pub struct I2C2TarReg_SPEC;
2393impl crate::sealed::RegSpec for I2C2TarReg_SPEC {
2394    type DataType = u32;
2395}
2396
2397#[doc = "I2C Target Address Register"]
2398pub type I2C2TarReg = crate::RegValueT<I2C2TarReg_SPEC>;
2399
2400impl I2C2TarReg {
2401    #[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."]
2402    #[inline(always)]
2403    pub fn special(
2404        self,
2405    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2TarReg_SPEC, crate::common::RW> {
2406        crate::common::RegisterFieldBool::<11,1,0,I2C2TarReg_SPEC,crate::common::RW>::from_register(self,0)
2407    }
2408
2409    #[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."]
2410    #[inline(always)]
2411    pub fn gc_or_start(
2412        self,
2413    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2TarReg_SPEC, crate::common::RW> {
2414        crate::common::RegisterFieldBool::<10,1,0,I2C2TarReg_SPEC,crate::common::RW>::from_register(self,0)
2415    }
2416
2417    #[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."]
2418    #[inline(always)]
2419    pub fn ic_tar(
2420        self,
2421    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, I2C2TarReg_SPEC, crate::common::RW>
2422    {
2423        crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,I2C2TarReg_SPEC,crate::common::RW>::from_register(self,0)
2424    }
2425}
2426impl ::core::default::Default for I2C2TarReg {
2427    #[inline(always)]
2428    fn default() -> I2C2TarReg {
2429        <crate::RegValueT<I2C2TarReg_SPEC> as RegisterValue<_>>::new(85)
2430    }
2431}
2432
2433#[doc(hidden)]
2434#[derive(Copy, Clone, Eq, PartialEq)]
2435pub struct I2C2TxflrReg_SPEC;
2436impl crate::sealed::RegSpec for I2C2TxflrReg_SPEC {
2437    type DataType = u32;
2438}
2439
2440#[doc = "I2C Transmit FIFO Level Register"]
2441pub type I2C2TxflrReg = crate::RegValueT<I2C2TxflrReg_SPEC>;
2442
2443impl I2C2TxflrReg {
2444    #[doc = "Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO. Size is constrained by the TXFLR value"]
2445    #[inline(always)]
2446    pub fn txflr(
2447        self,
2448    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, I2C2TxflrReg_SPEC, crate::common::R>
2449    {
2450        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,I2C2TxflrReg_SPEC,crate::common::R>::from_register(self,0)
2451    }
2452}
2453impl ::core::default::Default for I2C2TxflrReg {
2454    #[inline(always)]
2455    fn default() -> I2C2TxflrReg {
2456        <crate::RegValueT<I2C2TxflrReg_SPEC> as RegisterValue<_>>::new(0)
2457    }
2458}
2459
2460#[doc(hidden)]
2461#[derive(Copy, Clone, Eq, PartialEq)]
2462pub struct I2C2TxAbrtSourceReg_SPEC;
2463impl crate::sealed::RegSpec for I2C2TxAbrtSourceReg_SPEC {
2464    type DataType = u32;
2465}
2466
2467#[doc = "I2C Transmit Abort Source Register"]
2468pub type I2C2TxAbrtSourceReg = crate::RegValueT<I2C2TxAbrtSourceReg_SPEC>;
2469
2470impl I2C2TxAbrtSourceReg {
2471    #[doc = "Master-Transmitter : This is a master-mode-only bit. Master has detected the transfer abort (IC_ENABLE\\[1\\])"]
2472    #[inline(always)]
2473    pub fn abrt_user_abrt(
2474        self,
2475    ) -> crate::common::RegisterFieldBool<16, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2476    {
2477        crate::common::RegisterFieldBool::<16,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2478    }
2479
2480    #[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"]
2481    #[inline(always)]
2482    pub fn abrt_slvrd_intx(
2483        self,
2484    ) -> crate::common::RegisterFieldBool<15, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2485    {
2486        crate::common::RegisterFieldBool::<15,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2487    }
2488
2489    #[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"]
2490    #[inline(always)]
2491    pub fn abrt_slv_arblost(
2492        self,
2493    ) -> crate::common::RegisterFieldBool<14, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2494    {
2495        crate::common::RegisterFieldBool::<14,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2496    }
2497
2498    #[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"]
2499    #[inline(always)]
2500    pub fn abrt_slvflush_txfifo(
2501        self,
2502    ) -> crate::common::RegisterFieldBool<13, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2503    {
2504        crate::common::RegisterFieldBool::<13,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2505    }
2506
2507    #[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"]
2508    #[inline(always)]
2509    pub fn arb_lost(
2510        self,
2511    ) -> crate::common::RegisterFieldBool<12, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2512    {
2513        crate::common::RegisterFieldBool::<12,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2514    }
2515
2516    #[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"]
2517    #[inline(always)]
2518    pub fn abrt_master_dis(
2519        self,
2520    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2521    {
2522        crate::common::RegisterFieldBool::<11,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2523    }
2524
2525    #[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"]
2526    #[inline(always)]
2527    pub fn abrt_10b_rd_norstrt(
2528        self,
2529    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2530    {
2531        crate::common::RegisterFieldBool::<10,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2532    }
2533
2534    #[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"]
2535    #[inline(always)]
2536    pub fn abrt_sbyte_norstrt(
2537        self,
2538    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2539        crate::common::RegisterFieldBool::<9,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2540    }
2541
2542    #[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"]
2543    #[inline(always)]
2544    pub fn abrt_hs_norstrt(
2545        self,
2546    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2547        crate::common::RegisterFieldBool::<8,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2548    }
2549
2550    #[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"]
2551    #[inline(always)]
2552    pub fn abrt_sbyte_ackdet(
2553        self,
2554    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2555        crate::common::RegisterFieldBool::<7,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2556    }
2557
2558    #[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"]
2559    #[inline(always)]
2560    pub fn abrt_hs_ackdet(
2561        self,
2562    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2563        crate::common::RegisterFieldBool::<6,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2564    }
2565
2566    #[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"]
2567    #[inline(always)]
2568    pub fn abrt_gcall_read(
2569        self,
2570    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2571        crate::common::RegisterFieldBool::<5,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2572    }
2573
2574    #[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"]
2575    #[inline(always)]
2576    pub fn abrt_gcall_noack(
2577        self,
2578    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2579        crate::common::RegisterFieldBool::<4,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2580    }
2581
2582    #[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"]
2583    #[inline(always)]
2584    pub fn abrt_txdata_noack(
2585        self,
2586    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2587        crate::common::RegisterFieldBool::<3,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2588    }
2589
2590    #[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"]
2591    #[inline(always)]
2592    pub fn abrt_10addr2_noack(
2593        self,
2594    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2595        crate::common::RegisterFieldBool::<2,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2596    }
2597
2598    #[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"]
2599    #[inline(always)]
2600    pub fn abrt_10addr1_noack(
2601        self,
2602    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2603        crate::common::RegisterFieldBool::<1,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2604    }
2605
2606    #[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"]
2607    #[inline(always)]
2608    pub fn abrt_7b_addr_noack(
2609        self,
2610    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2611        crate::common::RegisterFieldBool::<0,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2612    }
2613}
2614impl ::core::default::Default for I2C2TxAbrtSourceReg {
2615    #[inline(always)]
2616    fn default() -> I2C2TxAbrtSourceReg {
2617        <crate::RegValueT<I2C2TxAbrtSourceReg_SPEC> as RegisterValue<_>>::new(0)
2618    }
2619}
2620
2621#[doc(hidden)]
2622#[derive(Copy, Clone, Eq, PartialEq)]
2623pub struct I2C2TxTlReg_SPEC;
2624impl crate::sealed::RegSpec for I2C2TxTlReg_SPEC {
2625    type DataType = u32;
2626}
2627
2628#[doc = "I2C Transmit FIFO Threshold Register"]
2629pub type I2C2TxTlReg = crate::RegValueT<I2C2TxTlReg_SPEC>;
2630
2631impl I2C2TxTlReg {
2632    #[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.."]
2633    #[inline(always)]
2634    pub fn tx_tl(
2635        self,
2636    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2TxTlReg_SPEC, crate::common::RW>
2637    {
2638        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2TxTlReg_SPEC,crate::common::RW>::from_register(self,0)
2639    }
2640}
2641impl ::core::default::Default for I2C2TxTlReg {
2642    #[inline(always)]
2643    fn default() -> I2C2TxTlReg {
2644        <crate::RegValueT<I2C2TxTlReg_SPEC> as RegisterValue<_>>::new(0)
2645    }
2646}