Skip to main content

da14680_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:44:57 +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 = "I2C Component2 Version Register"]
182    #[inline(always)]
183    pub const fn i2c2_comp2_version(
184        &self,
185    ) -> &'static crate::common::Reg<self::I2C2Comp2Version_SPEC, crate::common::RW> {
186        unsafe {
187            crate::common::Reg::<self::I2C2Comp2Version_SPEC, crate::common::RW>::from_ptr(
188                self._svd2pac_as_ptr().add(250usize),
189            )
190        }
191    }
192
193    #[doc = "Component Parameter Register"]
194    #[inline(always)]
195    pub const fn i2c2_comp_param1_reg(
196        &self,
197    ) -> &'static crate::common::Reg<self::I2C2CompParam1Reg_SPEC, crate::common::RW> {
198        unsafe {
199            crate::common::Reg::<self::I2C2CompParam1Reg_SPEC, crate::common::RW>::from_ptr(
200                self._svd2pac_as_ptr().add(244usize),
201            )
202        }
203    }
204
205    #[doc = "Component Parameter Register 2"]
206    #[inline(always)]
207    pub const fn i2c2_comp_param2_reg(
208        &self,
209    ) -> &'static crate::common::Reg<self::I2C2CompParam2Reg_SPEC, crate::common::RW> {
210        unsafe {
211            crate::common::Reg::<self::I2C2CompParam2Reg_SPEC, crate::common::RW>::from_ptr(
212                self._svd2pac_as_ptr().add(246usize),
213            )
214        }
215    }
216
217    #[doc = "I2C Component2 Type Register"]
218    #[inline(always)]
219    pub const fn i2c2_comp_type2_reg(
220        &self,
221    ) -> &'static crate::common::Reg<self::I2C2CompType2Reg_SPEC, crate::common::RW> {
222        unsafe {
223            crate::common::Reg::<self::I2C2CompType2Reg_SPEC, crate::common::RW>::from_ptr(
224                self._svd2pac_as_ptr().add(254usize),
225            )
226        }
227    }
228
229    #[doc = "I2C Component Type Register"]
230    #[inline(always)]
231    pub const fn i2c2_comp_type_reg(
232        &self,
233    ) -> &'static crate::common::Reg<self::I2C2CompTypeReg_SPEC, crate::common::RW> {
234        unsafe {
235            crate::common::Reg::<self::I2C2CompTypeReg_SPEC, crate::common::RW>::from_ptr(
236                self._svd2pac_as_ptr().add(252usize),
237            )
238        }
239    }
240
241    #[doc = "I2C Component Version Register"]
242    #[inline(always)]
243    pub const fn i2c2_comp_version_reg(
244        &self,
245    ) -> &'static crate::common::Reg<self::I2C2CompVersionReg_SPEC, crate::common::RW> {
246        unsafe {
247            crate::common::Reg::<self::I2C2CompVersionReg_SPEC, crate::common::RW>::from_ptr(
248                self._svd2pac_as_ptr().add(248usize),
249            )
250        }
251    }
252
253    #[doc = "I2C Control Register"]
254    #[inline(always)]
255    pub const fn i2c2_con_reg(
256        &self,
257    ) -> &'static crate::common::Reg<self::I2C2ConReg_SPEC, crate::common::RW> {
258        unsafe {
259            crate::common::Reg::<self::I2C2ConReg_SPEC, crate::common::RW>::from_ptr(
260                self._svd2pac_as_ptr().add(0usize),
261            )
262        }
263    }
264
265    #[doc = "I2C Rx/Tx Data Buffer and Command Register"]
266    #[inline(always)]
267    pub const fn i2c2_data_cmd_reg(
268        &self,
269    ) -> &'static crate::common::Reg<self::I2C2DataCmdReg_SPEC, crate::common::RW> {
270        unsafe {
271            crate::common::Reg::<self::I2C2DataCmdReg_SPEC, crate::common::RW>::from_ptr(
272                self._svd2pac_as_ptr().add(16usize),
273            )
274        }
275    }
276
277    #[doc = "DMA Control Register"]
278    #[inline(always)]
279    pub const fn i2c2_dma_cr_reg(
280        &self,
281    ) -> &'static crate::common::Reg<self::I2C2DmaCrReg_SPEC, crate::common::RW> {
282        unsafe {
283            crate::common::Reg::<self::I2C2DmaCrReg_SPEC, crate::common::RW>::from_ptr(
284                self._svd2pac_as_ptr().add(136usize),
285            )
286        }
287    }
288
289    #[doc = "I2C Receive Data Level Register"]
290    #[inline(always)]
291    pub const fn i2c2_dma_rdlr_reg(
292        &self,
293    ) -> &'static crate::common::Reg<self::I2C2DmaRdlrReg_SPEC, crate::common::RW> {
294        unsafe {
295            crate::common::Reg::<self::I2C2DmaRdlrReg_SPEC, crate::common::RW>::from_ptr(
296                self._svd2pac_as_ptr().add(144usize),
297            )
298        }
299    }
300
301    #[doc = "DMA Transmit Data Level Register"]
302    #[inline(always)]
303    pub const fn i2c2_dma_tdlr_reg(
304        &self,
305    ) -> &'static crate::common::Reg<self::I2C2DmaTdlrReg_SPEC, crate::common::RW> {
306        unsafe {
307            crate::common::Reg::<self::I2C2DmaTdlrReg_SPEC, crate::common::RW>::from_ptr(
308                self._svd2pac_as_ptr().add(140usize),
309            )
310        }
311    }
312
313    #[doc = "I2C Enable Register"]
314    #[inline(always)]
315    pub const fn i2c2_enable_reg(
316        &self,
317    ) -> &'static crate::common::Reg<self::I2C2EnableReg_SPEC, crate::common::RW> {
318        unsafe {
319            crate::common::Reg::<self::I2C2EnableReg_SPEC, crate::common::RW>::from_ptr(
320                self._svd2pac_as_ptr().add(108usize),
321            )
322        }
323    }
324
325    #[doc = "I2C Enable Status Register"]
326    #[inline(always)]
327    pub const fn i2c2_enable_status_reg(
328        &self,
329    ) -> &'static crate::common::Reg<self::I2C2EnableStatusReg_SPEC, crate::common::RW> {
330        unsafe {
331            crate::common::Reg::<self::I2C2EnableStatusReg_SPEC, crate::common::RW>::from_ptr(
332                self._svd2pac_as_ptr().add(156usize),
333            )
334        }
335    }
336
337    #[doc = "Fast Speed I2C Clock SCL High Count Register"]
338    #[inline(always)]
339    pub const fn i2c2_fs_scl_hcnt_reg(
340        &self,
341    ) -> &'static crate::common::Reg<self::I2C2FsSclHcntReg_SPEC, crate::common::RW> {
342        unsafe {
343            crate::common::Reg::<self::I2C2FsSclHcntReg_SPEC, crate::common::RW>::from_ptr(
344                self._svd2pac_as_ptr().add(28usize),
345            )
346        }
347    }
348
349    #[doc = "Fast Speed I2C Clock SCL Low Count Register"]
350    #[inline(always)]
351    pub const fn i2c2_fs_scl_lcnt_reg(
352        &self,
353    ) -> &'static crate::common::Reg<self::I2C2FsSclLcntReg_SPEC, crate::common::RW> {
354        unsafe {
355            crate::common::Reg::<self::I2C2FsSclLcntReg_SPEC, crate::common::RW>::from_ptr(
356                self._svd2pac_as_ptr().add(32usize),
357            )
358        }
359    }
360
361    #[doc = "I2C High Speed Master Mode Code Address Register"]
362    #[inline(always)]
363    pub const fn i2c2_hs_maddr_reg(
364        &self,
365    ) -> &'static crate::common::Reg<self::I2C2HsMaddrReg_SPEC, crate::common::RW> {
366        unsafe {
367            crate::common::Reg::<self::I2C2HsMaddrReg_SPEC, crate::common::RW>::from_ptr(
368                self._svd2pac_as_ptr().add(12usize),
369            )
370        }
371    }
372
373    #[doc = "I2C SS and FS spike suppression limit Size"]
374    #[inline(always)]
375    pub const fn i2c2_ic_fs_spklen_reg(
376        &self,
377    ) -> &'static crate::common::Reg<self::I2C2IcFsSpklenReg_SPEC, crate::common::RW> {
378        unsafe {
379            crate::common::Reg::<self::I2C2IcFsSpklenReg_SPEC, crate::common::RW>::from_ptr(
380                self._svd2pac_as_ptr().add(160usize),
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 = u16;
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."]
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 = u16;
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 = u16;
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 = u16;
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 = u16;
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 = u16;
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 = u16;
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 = u16;
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 = u16;
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 = u16;
805}
806
807#[doc = "Clear STOP_DET Interrupt Register"]
808pub type I2C2ClrStopDetReg = crate::RegValueT<I2C2ClrStopDetReg_SPEC>;
809
810impl I2C2ClrStopDetReg {
811    #[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."]
812    #[inline(always)]
813    pub fn clr_activity(
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 = u16;
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 = u16;
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 I2C2Comp2Version_SPEC;
881impl crate::sealed::RegSpec for I2C2Comp2Version_SPEC {
882    type DataType = u16;
883}
884
885#[doc = "I2C Component2 Version Register"]
886pub type I2C2Comp2Version = crate::RegValueT<I2C2Comp2Version_SPEC>;
887
888impl I2C2Comp2Version {
889    #[inline(always)]
890    pub fn ic_comp2_version(
891        self,
892    ) -> crate::common::RegisterField<
893        0,
894        0xffff,
895        1,
896        0,
897        u16,
898        u16,
899        I2C2Comp2Version_SPEC,
900        crate::common::R,
901    > {
902        crate::common::RegisterField::<
903            0,
904            0xffff,
905            1,
906            0,
907            u16,
908            u16,
909            I2C2Comp2Version_SPEC,
910            crate::common::R,
911        >::from_register(self, 0)
912    }
913}
914impl ::core::default::Default for I2C2Comp2Version {
915    #[inline(always)]
916    fn default() -> I2C2Comp2Version {
917        <crate::RegValueT<I2C2Comp2Version_SPEC> as RegisterValue<_>>::new(12594)
918    }
919}
920
921#[doc(hidden)]
922#[derive(Copy, Clone, Eq, PartialEq)]
923pub struct I2C2CompParam1Reg_SPEC;
924impl crate::sealed::RegSpec for I2C2CompParam1Reg_SPEC {
925    type DataType = u16;
926}
927
928#[doc = "Component Parameter Register"]
929pub type I2C2CompParam1Reg = crate::RegValueT<I2C2CompParam1Reg_SPEC>;
930
931impl I2C2CompParam1Reg {
932    #[inline(always)]
933    pub fn ic_comp_param1(
934        self,
935    ) -> crate::common::RegisterField<
936        0,
937        0xffff,
938        1,
939        0,
940        u16,
941        u16,
942        I2C2CompParam1Reg_SPEC,
943        crate::common::R,
944    > {
945        crate::common::RegisterField::<
946            0,
947            0xffff,
948            1,
949            0,
950            u16,
951            u16,
952            I2C2CompParam1Reg_SPEC,
953            crate::common::R,
954        >::from_register(self, 0)
955    }
956}
957impl ::core::default::Default for I2C2CompParam1Reg {
958    #[inline(always)]
959    fn default() -> I2C2CompParam1Reg {
960        <crate::RegValueT<I2C2CompParam1Reg_SPEC> as RegisterValue<_>>::new(0)
961    }
962}
963
964#[doc(hidden)]
965#[derive(Copy, Clone, Eq, PartialEq)]
966pub struct I2C2CompParam2Reg_SPEC;
967impl crate::sealed::RegSpec for I2C2CompParam2Reg_SPEC {
968    type DataType = u16;
969}
970
971#[doc = "Component Parameter Register 2"]
972pub type I2C2CompParam2Reg = crate::RegValueT<I2C2CompParam2Reg_SPEC>;
973
974impl I2C2CompParam2Reg {
975    #[inline(always)]
976    pub fn ic_comp_param2(
977        self,
978    ) -> crate::common::RegisterField<
979        0,
980        0xffff,
981        1,
982        0,
983        u16,
984        u16,
985        I2C2CompParam2Reg_SPEC,
986        crate::common::R,
987    > {
988        crate::common::RegisterField::<
989            0,
990            0xffff,
991            1,
992            0,
993            u16,
994            u16,
995            I2C2CompParam2Reg_SPEC,
996            crate::common::R,
997        >::from_register(self, 0)
998    }
999}
1000impl ::core::default::Default for I2C2CompParam2Reg {
1001    #[inline(always)]
1002    fn default() -> I2C2CompParam2Reg {
1003        <crate::RegValueT<I2C2CompParam2Reg_SPEC> as RegisterValue<_>>::new(0)
1004    }
1005}
1006
1007#[doc(hidden)]
1008#[derive(Copy, Clone, Eq, PartialEq)]
1009pub struct I2C2CompType2Reg_SPEC;
1010impl crate::sealed::RegSpec for I2C2CompType2Reg_SPEC {
1011    type DataType = u16;
1012}
1013
1014#[doc = "I2C Component2 Type Register"]
1015pub type I2C2CompType2Reg = crate::RegValueT<I2C2CompType2Reg_SPEC>;
1016
1017impl I2C2CompType2Reg {
1018    #[inline(always)]
1019    pub fn ic_comp2_type(
1020        self,
1021    ) -> crate::common::RegisterField<
1022        0,
1023        0xffff,
1024        1,
1025        0,
1026        u16,
1027        u16,
1028        I2C2CompType2Reg_SPEC,
1029        crate::common::R,
1030    > {
1031        crate::common::RegisterField::<
1032            0,
1033            0xffff,
1034            1,
1035            0,
1036            u16,
1037            u16,
1038            I2C2CompType2Reg_SPEC,
1039            crate::common::R,
1040        >::from_register(self, 0)
1041    }
1042}
1043impl ::core::default::Default for I2C2CompType2Reg {
1044    #[inline(always)]
1045    fn default() -> I2C2CompType2Reg {
1046        <crate::RegValueT<I2C2CompType2Reg_SPEC> as RegisterValue<_>>::new(17495)
1047    }
1048}
1049
1050#[doc(hidden)]
1051#[derive(Copy, Clone, Eq, PartialEq)]
1052pub struct I2C2CompTypeReg_SPEC;
1053impl crate::sealed::RegSpec for I2C2CompTypeReg_SPEC {
1054    type DataType = u16;
1055}
1056
1057#[doc = "I2C Component Type Register"]
1058pub type I2C2CompTypeReg = crate::RegValueT<I2C2CompTypeReg_SPEC>;
1059
1060impl I2C2CompTypeReg {
1061    #[inline(always)]
1062    pub fn ic_comp_type(
1063        self,
1064    ) -> crate::common::RegisterField<
1065        0,
1066        0xffff,
1067        1,
1068        0,
1069        u16,
1070        u16,
1071        I2C2CompTypeReg_SPEC,
1072        crate::common::R,
1073    > {
1074        crate::common::RegisterField::<
1075            0,
1076            0xffff,
1077            1,
1078            0,
1079            u16,
1080            u16,
1081            I2C2CompTypeReg_SPEC,
1082            crate::common::R,
1083        >::from_register(self, 0)
1084    }
1085}
1086impl ::core::default::Default for I2C2CompTypeReg {
1087    #[inline(always)]
1088    fn default() -> I2C2CompTypeReg {
1089        <crate::RegValueT<I2C2CompTypeReg_SPEC> as RegisterValue<_>>::new(320)
1090    }
1091}
1092
1093#[doc(hidden)]
1094#[derive(Copy, Clone, Eq, PartialEq)]
1095pub struct I2C2CompVersionReg_SPEC;
1096impl crate::sealed::RegSpec for I2C2CompVersionReg_SPEC {
1097    type DataType = u16;
1098}
1099
1100#[doc = "I2C Component Version Register"]
1101pub type I2C2CompVersionReg = crate::RegValueT<I2C2CompVersionReg_SPEC>;
1102
1103impl I2C2CompVersionReg {
1104    #[inline(always)]
1105    pub fn ic_comp_version(
1106        self,
1107    ) -> crate::common::RegisterField<
1108        0,
1109        0xffff,
1110        1,
1111        0,
1112        u16,
1113        u16,
1114        I2C2CompVersionReg_SPEC,
1115        crate::common::R,
1116    > {
1117        crate::common::RegisterField::<
1118            0,
1119            0xffff,
1120            1,
1121            0,
1122            u16,
1123            u16,
1124            I2C2CompVersionReg_SPEC,
1125            crate::common::R,
1126        >::from_register(self, 0)
1127    }
1128}
1129impl ::core::default::Default for I2C2CompVersionReg {
1130    #[inline(always)]
1131    fn default() -> I2C2CompVersionReg {
1132        <crate::RegValueT<I2C2CompVersionReg_SPEC> as RegisterValue<_>>::new(12330)
1133    }
1134}
1135
1136#[doc(hidden)]
1137#[derive(Copy, Clone, Eq, PartialEq)]
1138pub struct I2C2ConReg_SPEC;
1139impl crate::sealed::RegSpec for I2C2ConReg_SPEC {
1140    type DataType = u16;
1141}
1142
1143#[doc = "I2C Control Register"]
1144pub type I2C2ConReg = crate::RegValueT<I2C2ConReg_SPEC>;
1145
1146impl I2C2ConReg {
1147    #[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\'."]
1148    #[inline(always)]
1149    pub fn i2c_slave_disable(
1150        self,
1151    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2ConReg_SPEC, crate::common::RW> {
1152        crate::common::RegisterFieldBool::<6,1,0,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1153    }
1154
1155    #[doc = "Determines whether RESTART conditions may be sent when acting as a master\n0= disable\n1=enable"]
1156    #[inline(always)]
1157    pub fn i2c_restart_en(
1158        self,
1159    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2ConReg_SPEC, crate::common::RW> {
1160        crate::common::RegisterFieldBool::<5,1,0,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1161    }
1162
1163    #[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"]
1164    #[inline(always)]
1165    pub fn i2c_10bitaddr_master(
1166        self,
1167    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2ConReg_SPEC, crate::common::RW> {
1168        crate::common::RegisterFieldBool::<4,1,0,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1169    }
1170
1171    #[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"]
1172    #[inline(always)]
1173    pub fn i2c_10bitaddr_slave(
1174        self,
1175    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2ConReg_SPEC, crate::common::RW> {
1176        crate::common::RegisterFieldBool::<3,1,0,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1177    }
1178
1179    #[doc = "These bits control at which speed the controller operates.\n1= standard mode (100 kbit/s)\n2= fast mode (400 kbit/s)"]
1180    #[inline(always)]
1181    pub fn i2c_speed(
1182        self,
1183    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, I2C2ConReg_SPEC, crate::common::RW>
1184    {
1185        crate::common::RegisterField::<1,0x3,1,0,u8,u8,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1186    }
1187
1188    #[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\'."]
1189    #[inline(always)]
1190    pub fn i2c_master_mode(
1191        self,
1192    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ConReg_SPEC, crate::common::RW> {
1193        crate::common::RegisterFieldBool::<0,1,0,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1194    }
1195}
1196impl ::core::default::Default for I2C2ConReg {
1197    #[inline(always)]
1198    fn default() -> I2C2ConReg {
1199        <crate::RegValueT<I2C2ConReg_SPEC> as RegisterValue<_>>::new(125)
1200    }
1201}
1202
1203#[doc(hidden)]
1204#[derive(Copy, Clone, Eq, PartialEq)]
1205pub struct I2C2DataCmdReg_SPEC;
1206impl crate::sealed::RegSpec for I2C2DataCmdReg_SPEC {
1207    type DataType = u16;
1208}
1209
1210#[doc = "I2C Rx/Tx Data Buffer and Command Register"]
1211pub type I2C2DataCmdReg = crate::RegValueT<I2C2DataCmdReg_SPEC>;
1212
1213impl I2C2DataCmdReg {
1214    #[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"]
1215    #[inline(always)]
1216    pub fn cmd(
1217        self,
1218    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2DataCmdReg_SPEC, crate::common::RW> {
1219        crate::common::RegisterFieldBool::<8,1,0,I2C2DataCmdReg_SPEC,crate::common::RW>::from_register(self,0)
1220    }
1221
1222    #[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."]
1223    #[inline(always)]
1224    pub fn dat(
1225        self,
1226    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2C2DataCmdReg_SPEC, crate::common::RW>
1227    {
1228        crate::common::RegisterField::<0,0xff,1,0,u8,u8,I2C2DataCmdReg_SPEC,crate::common::RW>::from_register(self,0)
1229    }
1230}
1231impl ::core::default::Default for I2C2DataCmdReg {
1232    #[inline(always)]
1233    fn default() -> I2C2DataCmdReg {
1234        <crate::RegValueT<I2C2DataCmdReg_SPEC> as RegisterValue<_>>::new(0)
1235    }
1236}
1237
1238#[doc(hidden)]
1239#[derive(Copy, Clone, Eq, PartialEq)]
1240pub struct I2C2DmaCrReg_SPEC;
1241impl crate::sealed::RegSpec for I2C2DmaCrReg_SPEC {
1242    type DataType = u16;
1243}
1244
1245#[doc = "DMA Control Register"]
1246pub type I2C2DmaCrReg = crate::RegValueT<I2C2DmaCrReg_SPEC>;
1247
1248impl I2C2DmaCrReg {
1249    #[doc = "Transmit DMA Enable. //This bit enables/disables the transmit FIFO DMA channel. 0 = Transmit DMA disabled 1 = Transmit DMA enabled"]
1250    #[inline(always)]
1251    pub fn tdmae(
1252        self,
1253    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2DmaCrReg_SPEC, crate::common::RW> {
1254        crate::common::RegisterFieldBool::<1,1,0,I2C2DmaCrReg_SPEC,crate::common::RW>::from_register(self,0)
1255    }
1256
1257    #[doc = "Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel. 0 = Receive DMA disabled 1 = Receive DMA enabled"]
1258    #[inline(always)]
1259    pub fn rdmae(
1260        self,
1261    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2DmaCrReg_SPEC, crate::common::RW> {
1262        crate::common::RegisterFieldBool::<0,1,0,I2C2DmaCrReg_SPEC,crate::common::RW>::from_register(self,0)
1263    }
1264}
1265impl ::core::default::Default for I2C2DmaCrReg {
1266    #[inline(always)]
1267    fn default() -> I2C2DmaCrReg {
1268        <crate::RegValueT<I2C2DmaCrReg_SPEC> as RegisterValue<_>>::new(0)
1269    }
1270}
1271
1272#[doc(hidden)]
1273#[derive(Copy, Clone, Eq, PartialEq)]
1274pub struct I2C2DmaRdlrReg_SPEC;
1275impl crate::sealed::RegSpec for I2C2DmaRdlrReg_SPEC {
1276    type DataType = u16;
1277}
1278
1279#[doc = "I2C Receive Data Level Register"]
1280pub type I2C2DmaRdlrReg = crate::RegValueT<I2C2DmaRdlrReg_SPEC>;
1281
1282impl I2C2DmaRdlrReg {
1283    #[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."]
1284    #[inline(always)]
1285    pub fn dmardl(
1286        self,
1287    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2DmaRdlrReg_SPEC, crate::common::RW>
1288    {
1289        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2DmaRdlrReg_SPEC,crate::common::RW>::from_register(self,0)
1290    }
1291}
1292impl ::core::default::Default for I2C2DmaRdlrReg {
1293    #[inline(always)]
1294    fn default() -> I2C2DmaRdlrReg {
1295        <crate::RegValueT<I2C2DmaRdlrReg_SPEC> as RegisterValue<_>>::new(0)
1296    }
1297}
1298
1299#[doc(hidden)]
1300#[derive(Copy, Clone, Eq, PartialEq)]
1301pub struct I2C2DmaTdlrReg_SPEC;
1302impl crate::sealed::RegSpec for I2C2DmaTdlrReg_SPEC {
1303    type DataType = u16;
1304}
1305
1306#[doc = "DMA Transmit Data Level Register"]
1307pub type I2C2DmaTdlrReg = crate::RegValueT<I2C2DmaTdlrReg_SPEC>;
1308
1309impl I2C2DmaTdlrReg {
1310    #[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."]
1311    #[inline(always)]
1312    pub fn dmatdl(
1313        self,
1314    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2DmaTdlrReg_SPEC, crate::common::RW>
1315    {
1316        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2DmaTdlrReg_SPEC,crate::common::RW>::from_register(self,0)
1317    }
1318}
1319impl ::core::default::Default for I2C2DmaTdlrReg {
1320    #[inline(always)]
1321    fn default() -> I2C2DmaTdlrReg {
1322        <crate::RegValueT<I2C2DmaTdlrReg_SPEC> as RegisterValue<_>>::new(0)
1323    }
1324}
1325
1326#[doc(hidden)]
1327#[derive(Copy, Clone, Eq, PartialEq)]
1328pub struct I2C2EnableReg_SPEC;
1329impl crate::sealed::RegSpec for I2C2EnableReg_SPEC {
1330    type DataType = u16;
1331}
1332
1333#[doc = "I2C Enable Register"]
1334pub type I2C2EnableReg = crate::RegValueT<I2C2EnableReg_SPEC>;
1335
1336impl I2C2EnableReg {
1337    #[doc = "0= ABORT not initiated or ABORT done\n1= ABORT operation in progress\nThe software can abort the I2C transfer in master mode by setting this bit. The software can set this bit only when ENABLE is already set; otherwise, the controller ignores any write to ABORT bit. The software cannot clear the ABORT bit once set. In response to\nan ABORT, the controller issues a STOP and flushes the Tx FIFO after completing the current transfer, then sets the TX_ABORT interrupt after the abort operation. The ABORT bit is cleared automatically after the abort operation."]
1338    #[inline(always)]
1339    pub fn i2c_abort(
1340        self,
1341    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2EnableReg_SPEC, crate::common::RW> {
1342        crate::common::RegisterFieldBool::<1,1,0,I2C2EnableReg_SPEC,crate::common::RW>::from_register(self,0)
1343    }
1344
1345    #[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"]
1346    #[inline(always)]
1347    pub fn ctrl_enable(
1348        self,
1349    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2EnableReg_SPEC, crate::common::RW> {
1350        crate::common::RegisterFieldBool::<0,1,0,I2C2EnableReg_SPEC,crate::common::RW>::from_register(self,0)
1351    }
1352}
1353impl ::core::default::Default for I2C2EnableReg {
1354    #[inline(always)]
1355    fn default() -> I2C2EnableReg {
1356        <crate::RegValueT<I2C2EnableReg_SPEC> as RegisterValue<_>>::new(0)
1357    }
1358}
1359
1360#[doc(hidden)]
1361#[derive(Copy, Clone, Eq, PartialEq)]
1362pub struct I2C2EnableStatusReg_SPEC;
1363impl crate::sealed::RegSpec for I2C2EnableStatusReg_SPEC {
1364    type DataType = u16;
1365}
1366
1367#[doc = "I2C Enable Status Register"]
1368pub type I2C2EnableStatusReg = crate::RegValueT<I2C2EnableStatusReg_SPEC>;
1369
1370impl I2C2EnableStatusReg {
1371    #[doc = "Slave Received Data Lost. This bit indicates if a Slave-Receiver\noperation has been aborted with at least one data byte received from an I2C transfer due to the setting of IC_ENABLE from 1 to 0. When read as 1, the controller is deemed to have been actively engaged in an aborted I2C transfer (with matching address) and the data phase of the I2C transfer has been entered, even though a data byte has been responded with a NACK. NOTE: If the remote I2C master terminates the transfer with a STOP condition before the controller has a chance to NACK a transfer, and IC_ENABLE has been set to 0, then this bit is also set to 1.\nWhen read as 0, the controller is deemed to have been disabled without being actively involved in the data phase of a Slave-Receiver transfer.\nNOTE: The CPU can safely read this bit when IC_EN (bit 0) is read as 0."]
1372    #[inline(always)]
1373    pub fn slv_rx_data_lost(
1374        self,
1375    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2EnableStatusReg_SPEC, crate::common::R> {
1376        crate::common::RegisterFieldBool::<2,1,0,I2C2EnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1377    }
1378
1379    #[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."]
1380    #[inline(always)]
1381    pub fn slv_disabled_while_busy(
1382        self,
1383    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2EnableStatusReg_SPEC, crate::common::R> {
1384        crate::common::RegisterFieldBool::<1,1,0,I2C2EnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1385    }
1386
1387    #[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)."]
1388    #[inline(always)]
1389    pub fn ic_en(
1390        self,
1391    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2EnableStatusReg_SPEC, crate::common::R> {
1392        crate::common::RegisterFieldBool::<0,1,0,I2C2EnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1393    }
1394}
1395impl ::core::default::Default for I2C2EnableStatusReg {
1396    #[inline(always)]
1397    fn default() -> I2C2EnableStatusReg {
1398        <crate::RegValueT<I2C2EnableStatusReg_SPEC> as RegisterValue<_>>::new(0)
1399    }
1400}
1401
1402#[doc(hidden)]
1403#[derive(Copy, Clone, Eq, PartialEq)]
1404pub struct I2C2FsSclHcntReg_SPEC;
1405impl crate::sealed::RegSpec for I2C2FsSclHcntReg_SPEC {
1406    type DataType = u16;
1407}
1408
1409#[doc = "Fast Speed I2C Clock SCL High Count Register"]
1410pub type I2C2FsSclHcntReg = crate::RegValueT<I2C2FsSclHcntReg_SPEC>;
1411
1412impl I2C2FsSclHcntReg {
1413    #[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."]
1414    #[inline(always)]
1415    pub fn ic_fs_scl_hcnt(
1416        self,
1417    ) -> crate::common::RegisterField<
1418        0,
1419        0xffff,
1420        1,
1421        0,
1422        u16,
1423        u16,
1424        I2C2FsSclHcntReg_SPEC,
1425        crate::common::RW,
1426    > {
1427        crate::common::RegisterField::<
1428            0,
1429            0xffff,
1430            1,
1431            0,
1432            u16,
1433            u16,
1434            I2C2FsSclHcntReg_SPEC,
1435            crate::common::RW,
1436        >::from_register(self, 0)
1437    }
1438}
1439impl ::core::default::Default for I2C2FsSclHcntReg {
1440    #[inline(always)]
1441    fn default() -> I2C2FsSclHcntReg {
1442        <crate::RegValueT<I2C2FsSclHcntReg_SPEC> as RegisterValue<_>>::new(8)
1443    }
1444}
1445
1446#[doc(hidden)]
1447#[derive(Copy, Clone, Eq, PartialEq)]
1448pub struct I2C2FsSclLcntReg_SPEC;
1449impl crate::sealed::RegSpec for I2C2FsSclLcntReg_SPEC {
1450    type DataType = u16;
1451}
1452
1453#[doc = "Fast Speed I2C Clock SCL Low Count Register"]
1454pub type I2C2FsSclLcntReg = crate::RegValueT<I2C2FsSclLcntReg_SPEC>;
1455
1456impl I2C2FsSclLcntReg {
1457    #[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."]
1458    #[inline(always)]
1459    pub fn ic_fs_scl_lcnt(
1460        self,
1461    ) -> crate::common::RegisterField<
1462        0,
1463        0xffff,
1464        1,
1465        0,
1466        u16,
1467        u16,
1468        I2C2FsSclLcntReg_SPEC,
1469        crate::common::RW,
1470    > {
1471        crate::common::RegisterField::<
1472            0,
1473            0xffff,
1474            1,
1475            0,
1476            u16,
1477            u16,
1478            I2C2FsSclLcntReg_SPEC,
1479            crate::common::RW,
1480        >::from_register(self, 0)
1481    }
1482}
1483impl ::core::default::Default for I2C2FsSclLcntReg {
1484    #[inline(always)]
1485    fn default() -> I2C2FsSclLcntReg {
1486        <crate::RegValueT<I2C2FsSclLcntReg_SPEC> as RegisterValue<_>>::new(23)
1487    }
1488}
1489
1490#[doc(hidden)]
1491#[derive(Copy, Clone, Eq, PartialEq)]
1492pub struct I2C2HsMaddrReg_SPEC;
1493impl crate::sealed::RegSpec for I2C2HsMaddrReg_SPEC {
1494    type DataType = u16;
1495}
1496
1497#[doc = "I2C High Speed Master Mode Code Address Register"]
1498pub type I2C2HsMaddrReg = crate::RegValueT<I2C2HsMaddrReg_SPEC>;
1499
1500impl I2C2HsMaddrReg {
1501    #[doc = "This bit field holds the value of the I2C HS mode master code."]
1502    #[inline(always)]
1503    pub fn iic_hs_mar(
1504        self,
1505    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, I2C2HsMaddrReg_SPEC, crate::common::RW>
1506    {
1507        crate::common::RegisterField::<0,0x7,1,0,u8,u8,I2C2HsMaddrReg_SPEC,crate::common::RW>::from_register(self,0)
1508    }
1509}
1510impl ::core::default::Default for I2C2HsMaddrReg {
1511    #[inline(always)]
1512    fn default() -> I2C2HsMaddrReg {
1513        <crate::RegValueT<I2C2HsMaddrReg_SPEC> as RegisterValue<_>>::new(1)
1514    }
1515}
1516
1517#[doc(hidden)]
1518#[derive(Copy, Clone, Eq, PartialEq)]
1519pub struct I2C2IcFsSpklenReg_SPEC;
1520impl crate::sealed::RegSpec for I2C2IcFsSpklenReg_SPEC {
1521    type DataType = u16;
1522}
1523
1524#[doc = "I2C SS and FS spike suppression limit Size"]
1525pub type I2C2IcFsSpklenReg = crate::RegValueT<I2C2IcFsSpklenReg_SPEC>;
1526
1527impl I2C2IcFsSpklenReg {
1528    #[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."]
1529    #[inline(always)]
1530    pub fn ic_fs_spklen(
1531        self,
1532    ) -> crate::common::RegisterField<
1533        0,
1534        0xff,
1535        1,
1536        0,
1537        u8,
1538        u8,
1539        I2C2IcFsSpklenReg_SPEC,
1540        crate::common::RW,
1541    > {
1542        crate::common::RegisterField::<
1543            0,
1544            0xff,
1545            1,
1546            0,
1547            u8,
1548            u8,
1549            I2C2IcFsSpklenReg_SPEC,
1550            crate::common::RW,
1551        >::from_register(self, 0)
1552    }
1553}
1554impl ::core::default::Default for I2C2IcFsSpklenReg {
1555    #[inline(always)]
1556    fn default() -> I2C2IcFsSpklenReg {
1557        <crate::RegValueT<I2C2IcFsSpklenReg_SPEC> as RegisterValue<_>>::new(1)
1558    }
1559}
1560
1561#[doc(hidden)]
1562#[derive(Copy, Clone, Eq, PartialEq)]
1563pub struct I2C2IntrMaskReg_SPEC;
1564impl crate::sealed::RegSpec for I2C2IntrMaskReg_SPEC {
1565    type DataType = u16;
1566}
1567
1568#[doc = "I2C Interrupt Mask Register"]
1569pub type I2C2IntrMaskReg = crate::RegValueT<I2C2IntrMaskReg_SPEC>;
1570
1571impl I2C2IntrMaskReg {
1572    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1573    #[inline(always)]
1574    pub fn m_gen_call(
1575        self,
1576    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1577        crate::common::RegisterFieldBool::<11,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1578    }
1579
1580    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1581    #[inline(always)]
1582    pub fn m_start_det(
1583        self,
1584    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1585        crate::common::RegisterFieldBool::<10,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1586    }
1587
1588    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1589    #[inline(always)]
1590    pub fn m_stop_det(
1591        self,
1592    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1593        crate::common::RegisterFieldBool::<9,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1594    }
1595
1596    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1597    #[inline(always)]
1598    pub fn m_activity(
1599        self,
1600    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1601        crate::common::RegisterFieldBool::<8,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1602    }
1603
1604    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1605    #[inline(always)]
1606    pub fn m_rx_done(
1607        self,
1608    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1609        crate::common::RegisterFieldBool::<7,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1610    }
1611
1612    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1613    #[inline(always)]
1614    pub fn m_tx_abrt(
1615        self,
1616    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1617        crate::common::RegisterFieldBool::<6,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1618    }
1619
1620    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1621    #[inline(always)]
1622    pub fn m_rd_req(
1623        self,
1624    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1625        crate::common::RegisterFieldBool::<5,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1626    }
1627
1628    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1629    #[inline(always)]
1630    pub fn m_tx_empty(
1631        self,
1632    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1633        crate::common::RegisterFieldBool::<4,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1634    }
1635
1636    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1637    #[inline(always)]
1638    pub fn m_tx_over(
1639        self,
1640    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1641        crate::common::RegisterFieldBool::<3,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1642    }
1643
1644    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1645    #[inline(always)]
1646    pub fn m_rx_full(
1647        self,
1648    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1649        crate::common::RegisterFieldBool::<2,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1650    }
1651
1652    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1653    #[inline(always)]
1654    pub fn m_rx_over(
1655        self,
1656    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1657        crate::common::RegisterFieldBool::<1,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1658    }
1659
1660    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1661    #[inline(always)]
1662    pub fn m_rx_under(
1663        self,
1664    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1665        crate::common::RegisterFieldBool::<0,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1666    }
1667}
1668impl ::core::default::Default for I2C2IntrMaskReg {
1669    #[inline(always)]
1670    fn default() -> I2C2IntrMaskReg {
1671        <crate::RegValueT<I2C2IntrMaskReg_SPEC> as RegisterValue<_>>::new(2303)
1672    }
1673}
1674
1675#[doc(hidden)]
1676#[derive(Copy, Clone, Eq, PartialEq)]
1677pub struct I2C2IntrStatReg_SPEC;
1678impl crate::sealed::RegSpec for I2C2IntrStatReg_SPEC {
1679    type DataType = u16;
1680}
1681
1682#[doc = "I2C Interrupt Status Register"]
1683pub type I2C2IntrStatReg = crate::RegValueT<I2C2IntrStatReg_SPEC>;
1684
1685impl I2C2IntrStatReg {
1686    #[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."]
1687    #[inline(always)]
1688    pub fn r_gen_call(
1689        self,
1690    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1691        crate::common::RegisterFieldBool::<11,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1692    }
1693
1694    #[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."]
1695    #[inline(always)]
1696    pub fn r_start_det(
1697        self,
1698    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1699        crate::common::RegisterFieldBool::<10,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1700    }
1701
1702    #[doc = "Indicates whether a STOP condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1703    #[inline(always)]
1704    pub fn r_stop_det(
1705        self,
1706    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1707        crate::common::RegisterFieldBool::<9,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1708    }
1709
1710    #[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."]
1711    #[inline(always)]
1712    pub fn r_activity(
1713        self,
1714    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1715        crate::common::RegisterFieldBool::<8,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1716    }
1717
1718    #[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."]
1719    #[inline(always)]
1720    pub fn r_rx_done(
1721        self,
1722    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1723        crate::common::RegisterFieldBool::<7,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1724    }
1725
1726    #[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."]
1727    #[inline(always)]
1728    pub fn r_tx_abrt(
1729        self,
1730    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1731        crate::common::RegisterFieldBool::<6,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1732    }
1733
1734    #[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"]
1735    #[inline(always)]
1736    pub fn r_rd_req(
1737        self,
1738    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1739        crate::common::RegisterFieldBool::<5,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1740    }
1741
1742    #[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."]
1743    #[inline(always)]
1744    pub fn r_tx_empty(
1745        self,
1746    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1747        crate::common::RegisterFieldBool::<4,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1748    }
1749
1750    #[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"]
1751    #[inline(always)]
1752    pub fn r_tx_over(
1753        self,
1754    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1755        crate::common::RegisterFieldBool::<3,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1756    }
1757
1758    #[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."]
1759    #[inline(always)]
1760    pub fn r_rx_full(
1761        self,
1762    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1763        crate::common::RegisterFieldBool::<2,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1764    }
1765
1766    #[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."]
1767    #[inline(always)]
1768    pub fn r_rx_over(
1769        self,
1770    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1771        crate::common::RegisterFieldBool::<1,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1772    }
1773
1774    #[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."]
1775    #[inline(always)]
1776    pub fn r_rx_under(
1777        self,
1778    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1779        crate::common::RegisterFieldBool::<0,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1780    }
1781}
1782impl ::core::default::Default for I2C2IntrStatReg {
1783    #[inline(always)]
1784    fn default() -> I2C2IntrStatReg {
1785        <crate::RegValueT<I2C2IntrStatReg_SPEC> as RegisterValue<_>>::new(0)
1786    }
1787}
1788
1789#[doc(hidden)]
1790#[derive(Copy, Clone, Eq, PartialEq)]
1791pub struct I2C2RawIntrStatReg_SPEC;
1792impl crate::sealed::RegSpec for I2C2RawIntrStatReg_SPEC {
1793    type DataType = u16;
1794}
1795
1796#[doc = "I2C Raw Interrupt Status Register"]
1797pub type I2C2RawIntrStatReg = crate::RegValueT<I2C2RawIntrStatReg_SPEC>;
1798
1799impl I2C2RawIntrStatReg {
1800    #[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."]
1801    #[inline(always)]
1802    pub fn gen_call(
1803        self,
1804    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1805        crate::common::RegisterFieldBool::<11,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1806    }
1807
1808    #[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."]
1809    #[inline(always)]
1810    pub fn start_det(
1811        self,
1812    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1813        crate::common::RegisterFieldBool::<10,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1814    }
1815
1816    #[doc = "Indicates whether a STOP condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1817    #[inline(always)]
1818    pub fn stop_det(
1819        self,
1820    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1821        crate::common::RegisterFieldBool::<9,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1822    }
1823
1824    #[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."]
1825    #[inline(always)]
1826    pub fn activity(
1827        self,
1828    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1829        crate::common::RegisterFieldBool::<8,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1830    }
1831
1832    #[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."]
1833    #[inline(always)]
1834    pub fn rx_done(
1835        self,
1836    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1837        crate::common::RegisterFieldBool::<7,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1838    }
1839
1840    #[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."]
1841    #[inline(always)]
1842    pub fn tx_abrt(
1843        self,
1844    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1845        crate::common::RegisterFieldBool::<6,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1846    }
1847
1848    #[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"]
1849    #[inline(always)]
1850    pub fn rd_req(
1851        self,
1852    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1853        crate::common::RegisterFieldBool::<5,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1854    }
1855
1856    #[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."]
1857    #[inline(always)]
1858    pub fn tx_empty(
1859        self,
1860    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1861        crate::common::RegisterFieldBool::<4,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1862    }
1863
1864    #[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"]
1865    #[inline(always)]
1866    pub fn tx_over(
1867        self,
1868    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1869        crate::common::RegisterFieldBool::<3,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1870    }
1871
1872    #[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."]
1873    #[inline(always)]
1874    pub fn rx_full(
1875        self,
1876    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1877        crate::common::RegisterFieldBool::<2,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1878    }
1879
1880    #[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."]
1881    #[inline(always)]
1882    pub fn rx_over(
1883        self,
1884    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1885        crate::common::RegisterFieldBool::<1,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1886    }
1887
1888    #[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."]
1889    #[inline(always)]
1890    pub fn rx_under(
1891        self,
1892    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1893        crate::common::RegisterFieldBool::<0,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1894    }
1895}
1896impl ::core::default::Default for I2C2RawIntrStatReg {
1897    #[inline(always)]
1898    fn default() -> I2C2RawIntrStatReg {
1899        <crate::RegValueT<I2C2RawIntrStatReg_SPEC> as RegisterValue<_>>::new(0)
1900    }
1901}
1902
1903#[doc(hidden)]
1904#[derive(Copy, Clone, Eq, PartialEq)]
1905pub struct I2C2RxflrReg_SPEC;
1906impl crate::sealed::RegSpec for I2C2RxflrReg_SPEC {
1907    type DataType = u16;
1908}
1909
1910#[doc = "I2C Receive FIFO Level Register"]
1911pub type I2C2RxflrReg = crate::RegValueT<I2C2RxflrReg_SPEC>;
1912
1913impl I2C2RxflrReg {
1914    #[doc = "Receive FIFO Level. Contains the number of valid data entries in the receive FIFO. Size is constrained by the RXFLR value"]
1915    #[inline(always)]
1916    pub fn rxflr(
1917        self,
1918    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, I2C2RxflrReg_SPEC, crate::common::R>
1919    {
1920        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,I2C2RxflrReg_SPEC,crate::common::R>::from_register(self,0)
1921    }
1922}
1923impl ::core::default::Default for I2C2RxflrReg {
1924    #[inline(always)]
1925    fn default() -> I2C2RxflrReg {
1926        <crate::RegValueT<I2C2RxflrReg_SPEC> as RegisterValue<_>>::new(0)
1927    }
1928}
1929
1930#[doc(hidden)]
1931#[derive(Copy, Clone, Eq, PartialEq)]
1932pub struct I2C2RxTlReg_SPEC;
1933impl crate::sealed::RegSpec for I2C2RxTlReg_SPEC {
1934    type DataType = u16;
1935}
1936
1937#[doc = "I2C Receive FIFO Threshold Register"]
1938pub type I2C2RxTlReg = crate::RegValueT<I2C2RxTlReg_SPEC>;
1939
1940impl I2C2RxTlReg {
1941    #[doc = "Receive FIFO Threshold Level Controls the level of entries (or above) that triggers the RX_FULL interrupt (bit 2 in I2C_RAW_INTR_STAT register). The valid range is 0-3,a value of 0 sets the threshold for 1 entry, and a value of 3 sets the threshold for 4 entries"]
1942    #[inline(always)]
1943    pub fn rx_tl(
1944        self,
1945    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2RxTlReg_SPEC, crate::common::RW>
1946    {
1947        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2RxTlReg_SPEC,crate::common::RW>::from_register(self,0)
1948    }
1949}
1950impl ::core::default::Default for I2C2RxTlReg {
1951    #[inline(always)]
1952    fn default() -> I2C2RxTlReg {
1953        <crate::RegValueT<I2C2RxTlReg_SPEC> as RegisterValue<_>>::new(0)
1954    }
1955}
1956
1957#[doc(hidden)]
1958#[derive(Copy, Clone, Eq, PartialEq)]
1959pub struct I2C2SarReg_SPEC;
1960impl crate::sealed::RegSpec for I2C2SarReg_SPEC {
1961    type DataType = u16;
1962}
1963
1964#[doc = "I2C Slave Address Register"]
1965pub type I2C2SarReg = crate::RegValueT<I2C2SarReg_SPEC>;
1966
1967impl I2C2SarReg {
1968    #[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."]
1969    #[inline(always)]
1970    pub fn ic_sar(
1971        self,
1972    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, I2C2SarReg_SPEC, crate::common::RW>
1973    {
1974        crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,I2C2SarReg_SPEC,crate::common::RW>::from_register(self,0)
1975    }
1976}
1977impl ::core::default::Default for I2C2SarReg {
1978    #[inline(always)]
1979    fn default() -> I2C2SarReg {
1980        <crate::RegValueT<I2C2SarReg_SPEC> as RegisterValue<_>>::new(85)
1981    }
1982}
1983
1984#[doc(hidden)]
1985#[derive(Copy, Clone, Eq, PartialEq)]
1986pub struct I2C2SdaHoldReg_SPEC;
1987impl crate::sealed::RegSpec for I2C2SdaHoldReg_SPEC {
1988    type DataType = u16;
1989}
1990
1991#[doc = "I2C SDA Hold Time Length Register"]
1992pub type I2C2SdaHoldReg = crate::RegValueT<I2C2SdaHoldReg_SPEC>;
1993
1994impl I2C2SdaHoldReg {
1995    #[doc = "SDA Hold time"]
1996    #[inline(always)]
1997    pub fn ic_sda_hold(
1998        self,
1999    ) -> crate::common::RegisterField<
2000        0,
2001        0xffff,
2002        1,
2003        0,
2004        u16,
2005        u16,
2006        I2C2SdaHoldReg_SPEC,
2007        crate::common::RW,
2008    > {
2009        crate::common::RegisterField::<
2010            0,
2011            0xffff,
2012            1,
2013            0,
2014            u16,
2015            u16,
2016            I2C2SdaHoldReg_SPEC,
2017            crate::common::RW,
2018        >::from_register(self, 0)
2019    }
2020}
2021impl ::core::default::Default for I2C2SdaHoldReg {
2022    #[inline(always)]
2023    fn default() -> I2C2SdaHoldReg {
2024        <crate::RegValueT<I2C2SdaHoldReg_SPEC> as RegisterValue<_>>::new(1)
2025    }
2026}
2027
2028#[doc(hidden)]
2029#[derive(Copy, Clone, Eq, PartialEq)]
2030pub struct I2C2SdaSetupReg_SPEC;
2031impl crate::sealed::RegSpec for I2C2SdaSetupReg_SPEC {
2032    type DataType = u16;
2033}
2034
2035#[doc = "I2C SDA Setup Register"]
2036pub type I2C2SdaSetupReg = crate::RegValueT<I2C2SdaSetupReg_SPEC>;
2037
2038impl I2C2SdaSetupReg {
2039    #[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."]
2040    #[inline(always)]
2041    pub fn sda_setup(
2042        self,
2043    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2C2SdaSetupReg_SPEC, crate::common::RW>
2044    {
2045        crate::common::RegisterField::<0,0xff,1,0,u8,u8,I2C2SdaSetupReg_SPEC,crate::common::RW>::from_register(self,0)
2046    }
2047}
2048impl ::core::default::Default for I2C2SdaSetupReg {
2049    #[inline(always)]
2050    fn default() -> I2C2SdaSetupReg {
2051        <crate::RegValueT<I2C2SdaSetupReg_SPEC> as RegisterValue<_>>::new(100)
2052    }
2053}
2054
2055#[doc(hidden)]
2056#[derive(Copy, Clone, Eq, PartialEq)]
2057pub struct I2C2SsSclHcntReg_SPEC;
2058impl crate::sealed::RegSpec for I2C2SsSclHcntReg_SPEC {
2059    type DataType = u16;
2060}
2061
2062#[doc = "Standard Speed I2C Clock SCL High Count Register"]
2063pub type I2C2SsSclHcntReg = crate::RegValueT<I2C2SsSclHcntReg_SPEC>;
2064
2065impl I2C2SsSclHcntReg {
2066    #[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."]
2067    #[inline(always)]
2068    pub fn ic_ss_scl_hcnt(
2069        self,
2070    ) -> crate::common::RegisterField<
2071        0,
2072        0xffff,
2073        1,
2074        0,
2075        u16,
2076        u16,
2077        I2C2SsSclHcntReg_SPEC,
2078        crate::common::RW,
2079    > {
2080        crate::common::RegisterField::<
2081            0,
2082            0xffff,
2083            1,
2084            0,
2085            u16,
2086            u16,
2087            I2C2SsSclHcntReg_SPEC,
2088            crate::common::RW,
2089        >::from_register(self, 0)
2090    }
2091}
2092impl ::core::default::Default for I2C2SsSclHcntReg {
2093    #[inline(always)]
2094    fn default() -> I2C2SsSclHcntReg {
2095        <crate::RegValueT<I2C2SsSclHcntReg_SPEC> as RegisterValue<_>>::new(72)
2096    }
2097}
2098
2099#[doc(hidden)]
2100#[derive(Copy, Clone, Eq, PartialEq)]
2101pub struct I2C2SsSclLcntReg_SPEC;
2102impl crate::sealed::RegSpec for I2C2SsSclLcntReg_SPEC {
2103    type DataType = u16;
2104}
2105
2106#[doc = "Standard Speed I2C Clock SCL Low Count Register"]
2107pub type I2C2SsSclLcntReg = crate::RegValueT<I2C2SsSclLcntReg_SPEC>;
2108
2109impl I2C2SsSclLcntReg {
2110    #[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."]
2111    #[inline(always)]
2112    pub fn ic_ss_scl_lcnt(
2113        self,
2114    ) -> crate::common::RegisterField<
2115        0,
2116        0xffff,
2117        1,
2118        0,
2119        u16,
2120        u16,
2121        I2C2SsSclLcntReg_SPEC,
2122        crate::common::RW,
2123    > {
2124        crate::common::RegisterField::<
2125            0,
2126            0xffff,
2127            1,
2128            0,
2129            u16,
2130            u16,
2131            I2C2SsSclLcntReg_SPEC,
2132            crate::common::RW,
2133        >::from_register(self, 0)
2134    }
2135}
2136impl ::core::default::Default for I2C2SsSclLcntReg {
2137    #[inline(always)]
2138    fn default() -> I2C2SsSclLcntReg {
2139        <crate::RegValueT<I2C2SsSclLcntReg_SPEC> as RegisterValue<_>>::new(79)
2140    }
2141}
2142
2143#[doc(hidden)]
2144#[derive(Copy, Clone, Eq, PartialEq)]
2145pub struct I2C2StatusReg_SPEC;
2146impl crate::sealed::RegSpec for I2C2StatusReg_SPEC {
2147    type DataType = u16;
2148}
2149
2150#[doc = "I2C Status Register"]
2151pub type I2C2StatusReg = crate::RegValueT<I2C2StatusReg_SPEC>;
2152
2153impl I2C2StatusReg {
2154    #[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"]
2155    #[inline(always)]
2156    pub fn slv_activity(
2157        self,
2158    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2159        crate::common::RegisterFieldBool::<6,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2160    }
2161
2162    #[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"]
2163    #[inline(always)]
2164    pub fn mst_activity(
2165        self,
2166    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2167        crate::common::RegisterFieldBool::<5,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2168    }
2169
2170    #[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"]
2171    #[inline(always)]
2172    pub fn rff(
2173        self,
2174    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2175        crate::common::RegisterFieldBool::<4,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2176    }
2177
2178    #[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"]
2179    #[inline(always)]
2180    pub fn rfne(
2181        self,
2182    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2183        crate::common::RegisterFieldBool::<3,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2184    }
2185
2186    #[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"]
2187    #[inline(always)]
2188    pub fn tfe(
2189        self,
2190    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2191        crate::common::RegisterFieldBool::<2,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2192    }
2193
2194    #[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"]
2195    #[inline(always)]
2196    pub fn tfnf(
2197        self,
2198    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2199        crate::common::RegisterFieldBool::<1,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2200    }
2201
2202    #[doc = "I2C Activity Status."]
2203    #[inline(always)]
2204    pub fn i2c_activity(
2205        self,
2206    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2207        crate::common::RegisterFieldBool::<0,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2208    }
2209}
2210impl ::core::default::Default for I2C2StatusReg {
2211    #[inline(always)]
2212    fn default() -> I2C2StatusReg {
2213        <crate::RegValueT<I2C2StatusReg_SPEC> as RegisterValue<_>>::new(6)
2214    }
2215}
2216
2217#[doc(hidden)]
2218#[derive(Copy, Clone, Eq, PartialEq)]
2219pub struct I2C2TarReg_SPEC;
2220impl crate::sealed::RegSpec for I2C2TarReg_SPEC {
2221    type DataType = u16;
2222}
2223
2224#[doc = "I2C Target Address Register"]
2225pub type I2C2TarReg = crate::RegValueT<I2C2TarReg_SPEC>;
2226
2227impl I2C2TarReg {
2228    #[doc = "This bit indicates whether software performs a General Call or\nSTART BYTE command.\n0: ignore bit 10 GC_OR_START and use IC_TAR normally\n1: perform special I2C command as specified in GC_OR_START\nbit"]
2229    #[inline(always)]
2230    pub fn special(
2231        self,
2232    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2TarReg_SPEC, crate::common::RW> {
2233        crate::common::RegisterFieldBool::<11,1,0,I2C2TarReg_SPEC,crate::common::RW>::from_register(self,0)
2234    }
2235
2236    #[doc = "If bit 11 (SPECIAL) is set to 1, then this bit indicates whether a General Call or START byte command is to be performed by the controller.\n0: General Call Address - after issuing a General Call, only writes may be performed. Attempting to issue a read command results in setting bit 6 (TX_ABRT) of the IC_RAW_INTR_STAT register. The controller remains in General Call mode until the SPECIAL bit value (bit 11) is cleared.\n1: START BYTE"]
2237    #[inline(always)]
2238    pub fn gc_or_start(
2239        self,
2240    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2TarReg_SPEC, crate::common::RW> {
2241        crate::common::RegisterFieldBool::<10,1,0,I2C2TarReg_SPEC,crate::common::RW>::from_register(self,0)
2242    }
2243
2244    #[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"]
2245    #[inline(always)]
2246    pub fn ic_tar(
2247        self,
2248    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, I2C2TarReg_SPEC, crate::common::RW>
2249    {
2250        crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,I2C2TarReg_SPEC,crate::common::RW>::from_register(self,0)
2251    }
2252}
2253impl ::core::default::Default for I2C2TarReg {
2254    #[inline(always)]
2255    fn default() -> I2C2TarReg {
2256        <crate::RegValueT<I2C2TarReg_SPEC> as RegisterValue<_>>::new(85)
2257    }
2258}
2259
2260#[doc(hidden)]
2261#[derive(Copy, Clone, Eq, PartialEq)]
2262pub struct I2C2TxflrReg_SPEC;
2263impl crate::sealed::RegSpec for I2C2TxflrReg_SPEC {
2264    type DataType = u16;
2265}
2266
2267#[doc = "I2C Transmit FIFO Level Register"]
2268pub type I2C2TxflrReg = crate::RegValueT<I2C2TxflrReg_SPEC>;
2269
2270impl I2C2TxflrReg {
2271    #[doc = "Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO. Size is constrained by the TXFLR value"]
2272    #[inline(always)]
2273    pub fn txflr(
2274        self,
2275    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, I2C2TxflrReg_SPEC, crate::common::R>
2276    {
2277        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,I2C2TxflrReg_SPEC,crate::common::R>::from_register(self,0)
2278    }
2279}
2280impl ::core::default::Default for I2C2TxflrReg {
2281    #[inline(always)]
2282    fn default() -> I2C2TxflrReg {
2283        <crate::RegValueT<I2C2TxflrReg_SPEC> as RegisterValue<_>>::new(0)
2284    }
2285}
2286
2287#[doc(hidden)]
2288#[derive(Copy, Clone, Eq, PartialEq)]
2289pub struct I2C2TxAbrtSourceReg_SPEC;
2290impl crate::sealed::RegSpec for I2C2TxAbrtSourceReg_SPEC {
2291    type DataType = u16;
2292}
2293
2294#[doc = "I2C Transmit Abort Source Register"]
2295pub type I2C2TxAbrtSourceReg = crate::RegValueT<I2C2TxAbrtSourceReg_SPEC>;
2296
2297impl I2C2TxAbrtSourceReg {
2298    #[doc = "1: When the processor side responds to a slave mode request for data to be transmitted to a remote master and user writes a 1 in CMD (bit 8) of 2IC_DATA_CMD register"]
2299    #[inline(always)]
2300    pub fn abrt_slvrd_intx(
2301        self,
2302    ) -> crate::common::RegisterFieldBool<15, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2303    {
2304        crate::common::RegisterFieldBool::<15,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2305    }
2306
2307    #[doc = "1: Slave lost the bus while transmitting data to a remote master.\nI2C_TX_ABRT_SOURCE\\[12\\] is set at the same time. Note: Even though the slave never \"owns\" the bus, something could go wrong on the bus. This is a fail safe check. For instance, during a data transmission at the low-to-high transition of SCL, if what is on the data bus is not what is supposed to be transmitted, then the controller no longer own the bus."]
2308    #[inline(always)]
2309    pub fn abrt_slv_arblost(
2310        self,
2311    ) -> crate::common::RegisterFieldBool<14, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2312    {
2313        crate::common::RegisterFieldBool::<14,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2314    }
2315
2316    #[doc = "1: Slave has received a read command and some data exists in the TX FIFO so the slave issues a TX_ABRT interrupt to flush old data in TX FIFO."]
2317    #[inline(always)]
2318    pub fn abrt_slvflush_txfifo(
2319        self,
2320    ) -> crate::common::RegisterFieldBool<13, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2321    {
2322        crate::common::RegisterFieldBool::<13,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2323    }
2324
2325    #[doc = "1: Master has lost arbitration, or if I2C_TX_ABRT_SOURCE\\[14\\] is also set, then the slave transmitter has lost arbitration. Note: I2C can be both master and slave at the same time."]
2326    #[inline(always)]
2327    pub fn arb_lost(
2328        self,
2329    ) -> crate::common::RegisterFieldBool<12, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2330    {
2331        crate::common::RegisterFieldBool::<12,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2332    }
2333
2334    #[doc = "1: User tries to initiate a Master operation with the Master mode disabled."]
2335    #[inline(always)]
2336    pub fn abrt_master_dis(
2337        self,
2338    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2339    {
2340        crate::common::RegisterFieldBool::<11,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2341    }
2342
2343    #[doc = "1: The restart is disabled (IC_RESTART_EN bit (I2C_CON\\[5\\]) = 0) and the master sends a read command in 10-bit addressing mode."]
2344    #[inline(always)]
2345    pub fn abrt_10b_rd_norstrt(
2346        self,
2347    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2348    {
2349        crate::common::RegisterFieldBool::<10,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2350    }
2351
2352    #[doc = "To clear Bit 9, the source of the ABRT_SBYTE_NORSTRT must be fixed first; restart must be enabled (I2C_CON\\[5\\]=1), the SPECIAL bit must be cleared (I2C_TAR\\[11\\]), or the GC_OR_START bit must be cleared (I2C_TAR\\[10\\]). Once the source of the ABRT_SBYTE_NORSTRT is fixed, then this bit can be cleared in the same manner as other bits in this register. If the source of the ABRT_SBYTE_NORSTRT is not fixed before attempting to clear this bit, bit 9 clears for one cycle and then gets re-asserted. 1: The restart is disabled (IC_RESTART_EN bit (I2C_CON\\[5\\]) = 0) and the user is trying to send a START Byte."]
2353    #[inline(always)]
2354    pub fn abrt_sbyte_norstrt(
2355        self,
2356    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2357        crate::common::RegisterFieldBool::<9,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2358    }
2359
2360    #[doc = "1: The restart is disabled (IC_RESTART_EN bit (I2C_CON\\[5\\]) = 0) and the user is trying to use the master to transfer data in High Speed mode"]
2361    #[inline(always)]
2362    pub fn abrt_hs_norstrt(
2363        self,
2364    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2365        crate::common::RegisterFieldBool::<8,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2366    }
2367
2368    #[doc = "1: Master has sent a START Byte and the START Byte was acknowledged (wrong behavior)."]
2369    #[inline(always)]
2370    pub fn abrt_sbyte_ackdet(
2371        self,
2372    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2373        crate::common::RegisterFieldBool::<7,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2374    }
2375
2376    #[doc = "1: Master is in High Speed mode and the High Speed Master code was acknowledged (wrong behavior)."]
2377    #[inline(always)]
2378    pub fn abrt_hs_ackdet(
2379        self,
2380    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2381        crate::common::RegisterFieldBool::<6,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2382    }
2383
2384    #[doc = "1: the controller in master mode sent a General Call but the user programmed the byte following the General Call to be a read from the bus (IC_DATA_CMD\\[9\\] is set to 1)."]
2385    #[inline(always)]
2386    pub fn abrt_gcall_read(
2387        self,
2388    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2389        crate::common::RegisterFieldBool::<5,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2390    }
2391
2392    #[doc = "1: the controller in master mode sent a General Call and no slave on the bus acknowledged the General Call."]
2393    #[inline(always)]
2394    pub fn abrt_gcall_noack(
2395        self,
2396    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2397        crate::common::RegisterFieldBool::<4,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2398    }
2399
2400    #[doc = "1: This is a master-mode only bit. Master has received an acknowledgement for the address, but when it sent data byte(s) following the address, it did not receive an acknowledge from the remote slave(s)."]
2401    #[inline(always)]
2402    pub fn abrt_txdata_noack(
2403        self,
2404    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2405        crate::common::RegisterFieldBool::<3,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2406    }
2407
2408    #[doc = "1: Master is in 10-bit address mode and the second address byte of the 10-bit address was not acknowledged by any slave."]
2409    #[inline(always)]
2410    pub fn abrt_10addr2_noack(
2411        self,
2412    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2413        crate::common::RegisterFieldBool::<2,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2414    }
2415
2416    #[doc = "1: Master is in 10-bit address mode and the first 10-bit address byte was not acknowledged by any slave."]
2417    #[inline(always)]
2418    pub fn abrt_10addr1_noack(
2419        self,
2420    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2421        crate::common::RegisterFieldBool::<1,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2422    }
2423
2424    #[doc = "1: Master is in 7-bit addressing mode and the address sent was not acknowledged by any slave."]
2425    #[inline(always)]
2426    pub fn abrt_7b_addr_noack(
2427        self,
2428    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2429        crate::common::RegisterFieldBool::<0,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2430    }
2431}
2432impl ::core::default::Default for I2C2TxAbrtSourceReg {
2433    #[inline(always)]
2434    fn default() -> I2C2TxAbrtSourceReg {
2435        <crate::RegValueT<I2C2TxAbrtSourceReg_SPEC> as RegisterValue<_>>::new(0)
2436    }
2437}
2438
2439#[doc(hidden)]
2440#[derive(Copy, Clone, Eq, PartialEq)]
2441pub struct I2C2TxTlReg_SPEC;
2442impl crate::sealed::RegSpec for I2C2TxTlReg_SPEC {
2443    type DataType = u16;
2444}
2445
2446#[doc = "I2C Transmit FIFO Threshold Register"]
2447pub type I2C2TxTlReg = crate::RegValueT<I2C2TxTlReg_SPEC>;
2448
2449impl I2C2TxTlReg {
2450    #[doc = "Transmit FIFO Threshold Level Controls the level of entries (or below) that trigger the TX_EMPTY interrupt (bit 4 in I2C_RAW_INTR_STAT register). The valid range is 0-3, a value of 0 sets the threshold for 0 entries, and a value of 3 sets the threshold for 4 entries.."]
2451    #[inline(always)]
2452    pub fn tx_tl(
2453        self,
2454    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2TxTlReg_SPEC, crate::common::RW>
2455    {
2456        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2TxTlReg_SPEC,crate::common::RW>::from_register(self,0)
2457    }
2458}
2459impl ::core::default::Default for I2C2TxTlReg {
2460    #[inline(always)]
2461    fn default() -> I2C2TxTlReg {
2462        <crate::RegValueT<I2C2TxTlReg_SPEC> as RegisterValue<_>>::new(0)
2463    }
2464}