da14682_pac/
i2c2.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.2, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:45:10 +0000
19
20#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"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 SS and FS spike suppression limit Size"]
362    #[inline(always)]
363    pub const fn i2c2_ic_fs_spklen_reg(
364        &self,
365    ) -> &'static crate::common::Reg<self::I2C2IcFsSpklenReg_SPEC, crate::common::RW> {
366        unsafe {
367            crate::common::Reg::<self::I2C2IcFsSpklenReg_SPEC, crate::common::RW>::from_ptr(
368                self._svd2pac_as_ptr().add(160usize),
369            )
370        }
371    }
372
373    #[doc = "I2C Interrupt Mask Register"]
374    #[inline(always)]
375    pub const fn i2c2_intr_mask_reg(
376        &self,
377    ) -> &'static crate::common::Reg<self::I2C2IntrMaskReg_SPEC, crate::common::RW> {
378        unsafe {
379            crate::common::Reg::<self::I2C2IntrMaskReg_SPEC, crate::common::RW>::from_ptr(
380                self._svd2pac_as_ptr().add(48usize),
381            )
382        }
383    }
384
385    #[doc = "I2C Interrupt Status Register"]
386    #[inline(always)]
387    pub const fn i2c2_intr_stat_reg(
388        &self,
389    ) -> &'static crate::common::Reg<self::I2C2IntrStatReg_SPEC, crate::common::RW> {
390        unsafe {
391            crate::common::Reg::<self::I2C2IntrStatReg_SPEC, crate::common::RW>::from_ptr(
392                self._svd2pac_as_ptr().add(44usize),
393            )
394        }
395    }
396
397    #[doc = "I2C Raw Interrupt Status Register"]
398    #[inline(always)]
399    pub const fn i2c2_raw_intr_stat_reg(
400        &self,
401    ) -> &'static crate::common::Reg<self::I2C2RawIntrStatReg_SPEC, crate::common::RW> {
402        unsafe {
403            crate::common::Reg::<self::I2C2RawIntrStatReg_SPEC, crate::common::RW>::from_ptr(
404                self._svd2pac_as_ptr().add(52usize),
405            )
406        }
407    }
408
409    #[doc = "I2C Receive FIFO Level Register"]
410    #[inline(always)]
411    pub const fn i2c2_rxflr_reg(
412        &self,
413    ) -> &'static crate::common::Reg<self::I2C2RxflrReg_SPEC, crate::common::RW> {
414        unsafe {
415            crate::common::Reg::<self::I2C2RxflrReg_SPEC, crate::common::RW>::from_ptr(
416                self._svd2pac_as_ptr().add(120usize),
417            )
418        }
419    }
420
421    #[doc = "I2C Receive FIFO Threshold Register"]
422    #[inline(always)]
423    pub const fn i2c2_rx_tl_reg(
424        &self,
425    ) -> &'static crate::common::Reg<self::I2C2RxTlReg_SPEC, crate::common::RW> {
426        unsafe {
427            crate::common::Reg::<self::I2C2RxTlReg_SPEC, crate::common::RW>::from_ptr(
428                self._svd2pac_as_ptr().add(56usize),
429            )
430        }
431    }
432
433    #[doc = "I2C Slave Address Register"]
434    #[inline(always)]
435    pub const fn i2c2_sar_reg(
436        &self,
437    ) -> &'static crate::common::Reg<self::I2C2SarReg_SPEC, crate::common::RW> {
438        unsafe {
439            crate::common::Reg::<self::I2C2SarReg_SPEC, crate::common::RW>::from_ptr(
440                self._svd2pac_as_ptr().add(8usize),
441            )
442        }
443    }
444
445    #[doc = "I2C SDA Hold Time Length Register"]
446    #[inline(always)]
447    pub const fn i2c2_sda_hold_reg(
448        &self,
449    ) -> &'static crate::common::Reg<self::I2C2SdaHoldReg_SPEC, crate::common::RW> {
450        unsafe {
451            crate::common::Reg::<self::I2C2SdaHoldReg_SPEC, crate::common::RW>::from_ptr(
452                self._svd2pac_as_ptr().add(124usize),
453            )
454        }
455    }
456
457    #[doc = "I2C SDA Setup Register"]
458    #[inline(always)]
459    pub const fn i2c2_sda_setup_reg(
460        &self,
461    ) -> &'static crate::common::Reg<self::I2C2SdaSetupReg_SPEC, crate::common::RW> {
462        unsafe {
463            crate::common::Reg::<self::I2C2SdaSetupReg_SPEC, crate::common::RW>::from_ptr(
464                self._svd2pac_as_ptr().add(148usize),
465            )
466        }
467    }
468
469    #[doc = "Standard Speed I2C Clock SCL High Count Register"]
470    #[inline(always)]
471    pub const fn i2c2_ss_scl_hcnt_reg(
472        &self,
473    ) -> &'static crate::common::Reg<self::I2C2SsSclHcntReg_SPEC, crate::common::RW> {
474        unsafe {
475            crate::common::Reg::<self::I2C2SsSclHcntReg_SPEC, crate::common::RW>::from_ptr(
476                self._svd2pac_as_ptr().add(20usize),
477            )
478        }
479    }
480
481    #[doc = "Standard Speed I2C Clock SCL Low Count Register"]
482    #[inline(always)]
483    pub const fn i2c2_ss_scl_lcnt_reg(
484        &self,
485    ) -> &'static crate::common::Reg<self::I2C2SsSclLcntReg_SPEC, crate::common::RW> {
486        unsafe {
487            crate::common::Reg::<self::I2C2SsSclLcntReg_SPEC, crate::common::RW>::from_ptr(
488                self._svd2pac_as_ptr().add(24usize),
489            )
490        }
491    }
492
493    #[doc = "I2C Status Register"]
494    #[inline(always)]
495    pub const fn i2c2_status_reg(
496        &self,
497    ) -> &'static crate::common::Reg<self::I2C2StatusReg_SPEC, crate::common::RW> {
498        unsafe {
499            crate::common::Reg::<self::I2C2StatusReg_SPEC, crate::common::RW>::from_ptr(
500                self._svd2pac_as_ptr().add(112usize),
501            )
502        }
503    }
504
505    #[doc = "I2C Target Address Register"]
506    #[inline(always)]
507    pub const fn i2c2_tar_reg(
508        &self,
509    ) -> &'static crate::common::Reg<self::I2C2TarReg_SPEC, crate::common::RW> {
510        unsafe {
511            crate::common::Reg::<self::I2C2TarReg_SPEC, crate::common::RW>::from_ptr(
512                self._svd2pac_as_ptr().add(4usize),
513            )
514        }
515    }
516
517    #[doc = "I2C Transmit FIFO Level Register"]
518    #[inline(always)]
519    pub const fn i2c2_txflr_reg(
520        &self,
521    ) -> &'static crate::common::Reg<self::I2C2TxflrReg_SPEC, crate::common::RW> {
522        unsafe {
523            crate::common::Reg::<self::I2C2TxflrReg_SPEC, crate::common::RW>::from_ptr(
524                self._svd2pac_as_ptr().add(116usize),
525            )
526        }
527    }
528
529    #[doc = "I2C Transmit Abort Source Register"]
530    #[inline(always)]
531    pub const fn i2c2_tx_abrt_source_reg(
532        &self,
533    ) -> &'static crate::common::Reg<self::I2C2TxAbrtSourceReg_SPEC, crate::common::RW> {
534        unsafe {
535            crate::common::Reg::<self::I2C2TxAbrtSourceReg_SPEC, crate::common::RW>::from_ptr(
536                self._svd2pac_as_ptr().add(128usize),
537            )
538        }
539    }
540
541    #[doc = "I2C Transmit FIFO Threshold Register"]
542    #[inline(always)]
543    pub const fn i2c2_tx_tl_reg(
544        &self,
545    ) -> &'static crate::common::Reg<self::I2C2TxTlReg_SPEC, crate::common::RW> {
546        unsafe {
547            crate::common::Reg::<self::I2C2TxTlReg_SPEC, crate::common::RW>::from_ptr(
548                self._svd2pac_as_ptr().add(60usize),
549            )
550        }
551    }
552}
553#[doc(hidden)]
554#[derive(Copy, Clone, Eq, PartialEq)]
555pub struct I2C2AckGeneralCallReg_SPEC;
556impl crate::sealed::RegSpec for I2C2AckGeneralCallReg_SPEC {
557    type DataType = u16;
558}
559
560#[doc = "I2C ACK General Call Register"]
561pub type I2C2AckGeneralCallReg = crate::RegValueT<I2C2AckGeneralCallReg_SPEC>;
562
563impl I2C2AckGeneralCallReg {
564    #[doc = "ACK General Call. When set to 1, I2C Ctrl responds with a ACK (by asserting ic_data_oe) when it receives a General Call. When set to 0, the controller does not generate General Call interrupts."]
565    #[inline(always)]
566    pub fn ack_gen_call(
567        self,
568    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2AckGeneralCallReg_SPEC, crate::common::RW>
569    {
570        crate::common::RegisterFieldBool::<0,1,0,I2C2AckGeneralCallReg_SPEC,crate::common::RW>::from_register(self,0)
571    }
572}
573impl ::core::default::Default for I2C2AckGeneralCallReg {
574    #[inline(always)]
575    fn default() -> I2C2AckGeneralCallReg {
576        <crate::RegValueT<I2C2AckGeneralCallReg_SPEC> as RegisterValue<_>>::new(0)
577    }
578}
579
580#[doc(hidden)]
581#[derive(Copy, Clone, Eq, PartialEq)]
582pub struct I2C2ClrActivityReg_SPEC;
583impl crate::sealed::RegSpec for I2C2ClrActivityReg_SPEC {
584    type DataType = u16;
585}
586
587#[doc = "Clear ACTIVITY Interrupt Register"]
588pub type I2C2ClrActivityReg = crate::RegValueT<I2C2ClrActivityReg_SPEC>;
589
590impl I2C2ClrActivityReg {
591    #[doc = "Reading this register clears the ACTIVITY interrupt if the I2C is not active anymore. If the I2C module is still active on the bus, the ACTIVITY interrupt bit continues to be set. It is automatically cleared by hardware if the module is disabled and if there is no further activity on the bus. The value read from this register to get status of the ACTIVITY interrupt (bit 8) of the IC_RAW_INTR_STAT register"]
592    #[inline(always)]
593    pub fn clr_activity(
594        self,
595    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ClrActivityReg_SPEC, crate::common::R> {
596        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrActivityReg_SPEC,crate::common::R>::from_register(self,0)
597    }
598}
599impl ::core::default::Default for I2C2ClrActivityReg {
600    #[inline(always)]
601    fn default() -> I2C2ClrActivityReg {
602        <crate::RegValueT<I2C2ClrActivityReg_SPEC> as RegisterValue<_>>::new(0)
603    }
604}
605
606#[doc(hidden)]
607#[derive(Copy, Clone, Eq, PartialEq)]
608pub struct I2C2ClrGenCallReg_SPEC;
609impl crate::sealed::RegSpec for I2C2ClrGenCallReg_SPEC {
610    type DataType = u16;
611}
612
613#[doc = "Clear GEN_CALL Interrupt Register"]
614pub type I2C2ClrGenCallReg = crate::RegValueT<I2C2ClrGenCallReg_SPEC>;
615
616impl I2C2ClrGenCallReg {
617    #[doc = "Read this register to clear the GEN_CALL interrupt (bit 11) of\nI2C_RAW_INTR_STAT register."]
618    #[inline(always)]
619    pub fn clr_gen_call(
620        self,
621    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ClrGenCallReg_SPEC, crate::common::R> {
622        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrGenCallReg_SPEC,crate::common::R>::from_register(self,0)
623    }
624}
625impl ::core::default::Default for I2C2ClrGenCallReg {
626    #[inline(always)]
627    fn default() -> I2C2ClrGenCallReg {
628        <crate::RegValueT<I2C2ClrGenCallReg_SPEC> as RegisterValue<_>>::new(0)
629    }
630}
631
632#[doc(hidden)]
633#[derive(Copy, Clone, Eq, PartialEq)]
634pub struct I2C2ClrIntrReg_SPEC;
635impl crate::sealed::RegSpec for I2C2ClrIntrReg_SPEC {
636    type DataType = u16;
637}
638
639#[doc = "Clear Combined and Individual Interrupt Register"]
640pub type I2C2ClrIntrReg = crate::RegValueT<I2C2ClrIntrReg_SPEC>;
641
642impl I2C2ClrIntrReg {
643    #[doc = "Read this register to clear the combined interrupt, all individual interrupts, and the I2C_TX_ABRT_SOURCE register. This bit does not clear hardware clearable interrupts but software clearable interrupts. Refer to Bit 9 of the I2C_TX_ABRT_SOURCE register for an exception to clearing I2C_TX_ABRT_SOURCE"]
644    #[inline(always)]
645    pub fn clr_intr(
646        self,
647    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ClrIntrReg_SPEC, crate::common::R> {
648        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrIntrReg_SPEC,crate::common::R>::from_register(self,0)
649    }
650}
651impl ::core::default::Default for I2C2ClrIntrReg {
652    #[inline(always)]
653    fn default() -> I2C2ClrIntrReg {
654        <crate::RegValueT<I2C2ClrIntrReg_SPEC> as RegisterValue<_>>::new(0)
655    }
656}
657
658#[doc(hidden)]
659#[derive(Copy, Clone, Eq, PartialEq)]
660pub struct I2C2ClrRdReqReg_SPEC;
661impl crate::sealed::RegSpec for I2C2ClrRdReqReg_SPEC {
662    type DataType = u16;
663}
664
665#[doc = "Clear RD_REQ Interrupt Register"]
666pub type I2C2ClrRdReqReg = crate::RegValueT<I2C2ClrRdReqReg_SPEC>;
667
668impl I2C2ClrRdReqReg {
669    #[doc = "Read this register to clear the RD_REQ interrupt (bit 5) of the I2C_RAW_INTR_STAT register."]
670    #[inline(always)]
671    pub fn clr_rd_req(
672        self,
673    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ClrRdReqReg_SPEC, crate::common::R> {
674        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrRdReqReg_SPEC,crate::common::R>::from_register(self,0)
675    }
676}
677impl ::core::default::Default for I2C2ClrRdReqReg {
678    #[inline(always)]
679    fn default() -> I2C2ClrRdReqReg {
680        <crate::RegValueT<I2C2ClrRdReqReg_SPEC> as RegisterValue<_>>::new(0)
681    }
682}
683
684#[doc(hidden)]
685#[derive(Copy, Clone, Eq, PartialEq)]
686pub struct I2C2ClrRxDoneReg_SPEC;
687impl crate::sealed::RegSpec for I2C2ClrRxDoneReg_SPEC {
688    type DataType = u16;
689}
690
691#[doc = "Clear RX_DONE Interrupt Register"]
692pub type I2C2ClrRxDoneReg = crate::RegValueT<I2C2ClrRxDoneReg_SPEC>;
693
694impl I2C2ClrRxDoneReg {
695    #[doc = "Read this register to clear the RX_DONE interrupt (bit 7) of the\nI2C_RAW_INTR_STAT register."]
696    #[inline(always)]
697    pub fn clr_rx_done(
698        self,
699    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ClrRxDoneReg_SPEC, crate::common::R> {
700        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrRxDoneReg_SPEC,crate::common::R>::from_register(self,0)
701    }
702}
703impl ::core::default::Default for I2C2ClrRxDoneReg {
704    #[inline(always)]
705    fn default() -> I2C2ClrRxDoneReg {
706        <crate::RegValueT<I2C2ClrRxDoneReg_SPEC> as RegisterValue<_>>::new(0)
707    }
708}
709
710#[doc(hidden)]
711#[derive(Copy, Clone, Eq, PartialEq)]
712pub struct I2C2ClrRxOverReg_SPEC;
713impl crate::sealed::RegSpec for I2C2ClrRxOverReg_SPEC {
714    type DataType = u16;
715}
716
717#[doc = "Clear RX_OVER Interrupt Register"]
718pub type I2C2ClrRxOverReg = crate::RegValueT<I2C2ClrRxOverReg_SPEC>;
719
720impl I2C2ClrRxOverReg {
721    #[doc = "Read this register to clear the RX_OVER interrupt (bit 1) of the\nI2C_RAW_INTR_STAT register."]
722    #[inline(always)]
723    pub fn clr_rx_over(
724        self,
725    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ClrRxOverReg_SPEC, crate::common::R> {
726        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrRxOverReg_SPEC,crate::common::R>::from_register(self,0)
727    }
728}
729impl ::core::default::Default for I2C2ClrRxOverReg {
730    #[inline(always)]
731    fn default() -> I2C2ClrRxOverReg {
732        <crate::RegValueT<I2C2ClrRxOverReg_SPEC> as RegisterValue<_>>::new(0)
733    }
734}
735
736#[doc(hidden)]
737#[derive(Copy, Clone, Eq, PartialEq)]
738pub struct I2C2ClrRxUnderReg_SPEC;
739impl crate::sealed::RegSpec for I2C2ClrRxUnderReg_SPEC {
740    type DataType = u16;
741}
742
743#[doc = "Clear RX_UNDER Interrupt Register"]
744pub type I2C2ClrRxUnderReg = crate::RegValueT<I2C2ClrRxUnderReg_SPEC>;
745
746impl I2C2ClrRxUnderReg {
747    #[doc = "Read this register to clear the RX_UNDER interrupt (bit 0) of the\nI2C_RAW_INTR_STAT register."]
748    #[inline(always)]
749    pub fn clr_rx_under(
750        self,
751    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ClrRxUnderReg_SPEC, crate::common::R> {
752        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrRxUnderReg_SPEC,crate::common::R>::from_register(self,0)
753    }
754}
755impl ::core::default::Default for I2C2ClrRxUnderReg {
756    #[inline(always)]
757    fn default() -> I2C2ClrRxUnderReg {
758        <crate::RegValueT<I2C2ClrRxUnderReg_SPEC> as RegisterValue<_>>::new(0)
759    }
760}
761
762#[doc(hidden)]
763#[derive(Copy, Clone, Eq, PartialEq)]
764pub struct I2C2ClrStartDetReg_SPEC;
765impl crate::sealed::RegSpec for I2C2ClrStartDetReg_SPEC {
766    type DataType = u16;
767}
768
769#[doc = "Clear START_DET Interrupt Register"]
770pub type I2C2ClrStartDetReg = crate::RegValueT<I2C2ClrStartDetReg_SPEC>;
771
772impl I2C2ClrStartDetReg {
773    #[doc = "Read this register to clear the START_DET interrupt (bit 10) of the IC_RAW_INTR_STAT register."]
774    #[inline(always)]
775    pub fn clr_start_det(
776        self,
777    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ClrStartDetReg_SPEC, crate::common::R> {
778        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrStartDetReg_SPEC,crate::common::R>::from_register(self,0)
779    }
780}
781impl ::core::default::Default for I2C2ClrStartDetReg {
782    #[inline(always)]
783    fn default() -> I2C2ClrStartDetReg {
784        <crate::RegValueT<I2C2ClrStartDetReg_SPEC> as RegisterValue<_>>::new(0)
785    }
786}
787
788#[doc(hidden)]
789#[derive(Copy, Clone, Eq, PartialEq)]
790pub struct I2C2ClrStopDetReg_SPEC;
791impl crate::sealed::RegSpec for I2C2ClrStopDetReg_SPEC {
792    type DataType = u16;
793}
794
795#[doc = "Clear STOP_DET Interrupt Register"]
796pub type I2C2ClrStopDetReg = crate::RegValueT<I2C2ClrStopDetReg_SPEC>;
797
798impl I2C2ClrStopDetReg {
799    #[doc = "Reading this register clears the ACTIVITY interrupt if the I2C is not active anymore. If the I2C module is still active on the bus, the ACTIVITY interrupt bit continues to be set. It is automatically cleared by hardware if the module is disabled and if there is no further activity on the bus. The value read from this register to get status of the ACTIVITY interrupt (bit 8) of the IC_RAW_INTR_STAT register."]
800    #[inline(always)]
801    pub fn clr_activity(
802        self,
803    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ClrStopDetReg_SPEC, crate::common::R> {
804        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrStopDetReg_SPEC,crate::common::R>::from_register(self,0)
805    }
806}
807impl ::core::default::Default for I2C2ClrStopDetReg {
808    #[inline(always)]
809    fn default() -> I2C2ClrStopDetReg {
810        <crate::RegValueT<I2C2ClrStopDetReg_SPEC> as RegisterValue<_>>::new(0)
811    }
812}
813
814#[doc(hidden)]
815#[derive(Copy, Clone, Eq, PartialEq)]
816pub struct I2C2ClrTxAbrtReg_SPEC;
817impl crate::sealed::RegSpec for I2C2ClrTxAbrtReg_SPEC {
818    type DataType = u16;
819}
820
821#[doc = "Clear TX_ABRT Interrupt Register"]
822pub type I2C2ClrTxAbrtReg = crate::RegValueT<I2C2ClrTxAbrtReg_SPEC>;
823
824impl I2C2ClrTxAbrtReg {
825    #[doc = "Read this register to clear the TX_ABRT interrupt (bit 6) of the\nIC_RAW_INTR_STAT register, and the I2C_TX_ABRT_SOURCE register. This also releases the TX FIFO from the flushed/reset state, allowing more writes to the TX FIFO. Refer to Bit 9 of the I2C_TX_ABRT_SOURCE register for an exception to clearing IC_TX_ABRT_SOURCE."]
826    #[inline(always)]
827    pub fn clr_tx_abrt(
828        self,
829    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ClrTxAbrtReg_SPEC, crate::common::R> {
830        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrTxAbrtReg_SPEC,crate::common::R>::from_register(self,0)
831    }
832}
833impl ::core::default::Default for I2C2ClrTxAbrtReg {
834    #[inline(always)]
835    fn default() -> I2C2ClrTxAbrtReg {
836        <crate::RegValueT<I2C2ClrTxAbrtReg_SPEC> as RegisterValue<_>>::new(0)
837    }
838}
839
840#[doc(hidden)]
841#[derive(Copy, Clone, Eq, PartialEq)]
842pub struct I2C2ClrTxOverReg_SPEC;
843impl crate::sealed::RegSpec for I2C2ClrTxOverReg_SPEC {
844    type DataType = u16;
845}
846
847#[doc = "Clear TX_OVER Interrupt Register"]
848pub type I2C2ClrTxOverReg = crate::RegValueT<I2C2ClrTxOverReg_SPEC>;
849
850impl I2C2ClrTxOverReg {
851    #[doc = "Read this register to clear the TX_OVER interrupt (bit 3) of the I2C_RAW_INTR_STAT register."]
852    #[inline(always)]
853    pub fn clr_tx_over(
854        self,
855    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ClrTxOverReg_SPEC, crate::common::R> {
856        crate::common::RegisterFieldBool::<0,1,0,I2C2ClrTxOverReg_SPEC,crate::common::R>::from_register(self,0)
857    }
858}
859impl ::core::default::Default for I2C2ClrTxOverReg {
860    #[inline(always)]
861    fn default() -> I2C2ClrTxOverReg {
862        <crate::RegValueT<I2C2ClrTxOverReg_SPEC> as RegisterValue<_>>::new(0)
863    }
864}
865
866#[doc(hidden)]
867#[derive(Copy, Clone, Eq, PartialEq)]
868pub struct I2C2Comp2Version_SPEC;
869impl crate::sealed::RegSpec for I2C2Comp2Version_SPEC {
870    type DataType = u16;
871}
872
873#[doc = "I2C Component2 Version Register"]
874pub type I2C2Comp2Version = crate::RegValueT<I2C2Comp2Version_SPEC>;
875
876impl I2C2Comp2Version {
877    #[inline(always)]
878    pub fn ic_comp2_version(
879        self,
880    ) -> crate::common::RegisterField<
881        0,
882        0xffff,
883        1,
884        0,
885        u16,
886        u16,
887        I2C2Comp2Version_SPEC,
888        crate::common::R,
889    > {
890        crate::common::RegisterField::<
891            0,
892            0xffff,
893            1,
894            0,
895            u16,
896            u16,
897            I2C2Comp2Version_SPEC,
898            crate::common::R,
899        >::from_register(self, 0)
900    }
901}
902impl ::core::default::Default for I2C2Comp2Version {
903    #[inline(always)]
904    fn default() -> I2C2Comp2Version {
905        <crate::RegValueT<I2C2Comp2Version_SPEC> as RegisterValue<_>>::new(12594)
906    }
907}
908
909#[doc(hidden)]
910#[derive(Copy, Clone, Eq, PartialEq)]
911pub struct I2C2CompParam1Reg_SPEC;
912impl crate::sealed::RegSpec for I2C2CompParam1Reg_SPEC {
913    type DataType = u16;
914}
915
916#[doc = "Component Parameter Register"]
917pub type I2C2CompParam1Reg = crate::RegValueT<I2C2CompParam1Reg_SPEC>;
918
919impl I2C2CompParam1Reg {
920    #[inline(always)]
921    pub fn ic_comp_param1(
922        self,
923    ) -> crate::common::RegisterField<
924        0,
925        0xffff,
926        1,
927        0,
928        u16,
929        u16,
930        I2C2CompParam1Reg_SPEC,
931        crate::common::R,
932    > {
933        crate::common::RegisterField::<
934            0,
935            0xffff,
936            1,
937            0,
938            u16,
939            u16,
940            I2C2CompParam1Reg_SPEC,
941            crate::common::R,
942        >::from_register(self, 0)
943    }
944}
945impl ::core::default::Default for I2C2CompParam1Reg {
946    #[inline(always)]
947    fn default() -> I2C2CompParam1Reg {
948        <crate::RegValueT<I2C2CompParam1Reg_SPEC> as RegisterValue<_>>::new(0)
949    }
950}
951
952#[doc(hidden)]
953#[derive(Copy, Clone, Eq, PartialEq)]
954pub struct I2C2CompParam2Reg_SPEC;
955impl crate::sealed::RegSpec for I2C2CompParam2Reg_SPEC {
956    type DataType = u16;
957}
958
959#[doc = "Component Parameter Register 2"]
960pub type I2C2CompParam2Reg = crate::RegValueT<I2C2CompParam2Reg_SPEC>;
961
962impl I2C2CompParam2Reg {
963    #[inline(always)]
964    pub fn ic_comp_param2(
965        self,
966    ) -> crate::common::RegisterField<
967        0,
968        0xffff,
969        1,
970        0,
971        u16,
972        u16,
973        I2C2CompParam2Reg_SPEC,
974        crate::common::R,
975    > {
976        crate::common::RegisterField::<
977            0,
978            0xffff,
979            1,
980            0,
981            u16,
982            u16,
983            I2C2CompParam2Reg_SPEC,
984            crate::common::R,
985        >::from_register(self, 0)
986    }
987}
988impl ::core::default::Default for I2C2CompParam2Reg {
989    #[inline(always)]
990    fn default() -> I2C2CompParam2Reg {
991        <crate::RegValueT<I2C2CompParam2Reg_SPEC> as RegisterValue<_>>::new(0)
992    }
993}
994
995#[doc(hidden)]
996#[derive(Copy, Clone, Eq, PartialEq)]
997pub struct I2C2CompType2Reg_SPEC;
998impl crate::sealed::RegSpec for I2C2CompType2Reg_SPEC {
999    type DataType = u16;
1000}
1001
1002#[doc = "I2C Component2 Type Register"]
1003pub type I2C2CompType2Reg = crate::RegValueT<I2C2CompType2Reg_SPEC>;
1004
1005impl I2C2CompType2Reg {
1006    #[inline(always)]
1007    pub fn ic_comp2_type(
1008        self,
1009    ) -> crate::common::RegisterField<
1010        0,
1011        0xffff,
1012        1,
1013        0,
1014        u16,
1015        u16,
1016        I2C2CompType2Reg_SPEC,
1017        crate::common::R,
1018    > {
1019        crate::common::RegisterField::<
1020            0,
1021            0xffff,
1022            1,
1023            0,
1024            u16,
1025            u16,
1026            I2C2CompType2Reg_SPEC,
1027            crate::common::R,
1028        >::from_register(self, 0)
1029    }
1030}
1031impl ::core::default::Default for I2C2CompType2Reg {
1032    #[inline(always)]
1033    fn default() -> I2C2CompType2Reg {
1034        <crate::RegValueT<I2C2CompType2Reg_SPEC> as RegisterValue<_>>::new(17495)
1035    }
1036}
1037
1038#[doc(hidden)]
1039#[derive(Copy, Clone, Eq, PartialEq)]
1040pub struct I2C2CompTypeReg_SPEC;
1041impl crate::sealed::RegSpec for I2C2CompTypeReg_SPEC {
1042    type DataType = u16;
1043}
1044
1045#[doc = "I2C Component Type Register"]
1046pub type I2C2CompTypeReg = crate::RegValueT<I2C2CompTypeReg_SPEC>;
1047
1048impl I2C2CompTypeReg {
1049    #[inline(always)]
1050    pub fn ic_comp_type(
1051        self,
1052    ) -> crate::common::RegisterField<
1053        0,
1054        0xffff,
1055        1,
1056        0,
1057        u16,
1058        u16,
1059        I2C2CompTypeReg_SPEC,
1060        crate::common::R,
1061    > {
1062        crate::common::RegisterField::<
1063            0,
1064            0xffff,
1065            1,
1066            0,
1067            u16,
1068            u16,
1069            I2C2CompTypeReg_SPEC,
1070            crate::common::R,
1071        >::from_register(self, 0)
1072    }
1073}
1074impl ::core::default::Default for I2C2CompTypeReg {
1075    #[inline(always)]
1076    fn default() -> I2C2CompTypeReg {
1077        <crate::RegValueT<I2C2CompTypeReg_SPEC> as RegisterValue<_>>::new(320)
1078    }
1079}
1080
1081#[doc(hidden)]
1082#[derive(Copy, Clone, Eq, PartialEq)]
1083pub struct I2C2CompVersionReg_SPEC;
1084impl crate::sealed::RegSpec for I2C2CompVersionReg_SPEC {
1085    type DataType = u16;
1086}
1087
1088#[doc = "I2C Component Version Register"]
1089pub type I2C2CompVersionReg = crate::RegValueT<I2C2CompVersionReg_SPEC>;
1090
1091impl I2C2CompVersionReg {
1092    #[inline(always)]
1093    pub fn ic_comp_version(
1094        self,
1095    ) -> crate::common::RegisterField<
1096        0,
1097        0xffff,
1098        1,
1099        0,
1100        u16,
1101        u16,
1102        I2C2CompVersionReg_SPEC,
1103        crate::common::R,
1104    > {
1105        crate::common::RegisterField::<
1106            0,
1107            0xffff,
1108            1,
1109            0,
1110            u16,
1111            u16,
1112            I2C2CompVersionReg_SPEC,
1113            crate::common::R,
1114        >::from_register(self, 0)
1115    }
1116}
1117impl ::core::default::Default for I2C2CompVersionReg {
1118    #[inline(always)]
1119    fn default() -> I2C2CompVersionReg {
1120        <crate::RegValueT<I2C2CompVersionReg_SPEC> as RegisterValue<_>>::new(12330)
1121    }
1122}
1123
1124#[doc(hidden)]
1125#[derive(Copy, Clone, Eq, PartialEq)]
1126pub struct I2C2ConReg_SPEC;
1127impl crate::sealed::RegSpec for I2C2ConReg_SPEC {
1128    type DataType = u16;
1129}
1130
1131#[doc = "I2C Control Register"]
1132pub type I2C2ConReg = crate::RegValueT<I2C2ConReg_SPEC>;
1133
1134impl I2C2ConReg {
1135    #[doc = "Slave enabled or disabled after reset is applied, which means software does not have to configure the slave.\n0=slave is enabled\n1=slave is disabled\nSoftware should ensure that if this bit is written with \'0\', then bit 0 should also be written with a \'0\'."]
1136    #[inline(always)]
1137    pub fn i2c_slave_disable(
1138        self,
1139    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2ConReg_SPEC, crate::common::RW> {
1140        crate::common::RegisterFieldBool::<6,1,0,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1141    }
1142
1143    #[doc = "Determines whether RESTART conditions may be sent when acting as a master\n0= disable\n1=enable"]
1144    #[inline(always)]
1145    pub fn i2c_restart_en(
1146        self,
1147    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2ConReg_SPEC, crate::common::RW> {
1148        crate::common::RegisterFieldBool::<5,1,0,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1149    }
1150
1151    #[doc = "Controls whether the controller starts its transfers in 7- or 10-bit addressing mode when acting as a master.\n0= 7-bit addressing\n1= 10-bit addressing"]
1152    #[inline(always)]
1153    pub fn i2c_10bitaddr_master(
1154        self,
1155    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2ConReg_SPEC, crate::common::RW> {
1156        crate::common::RegisterFieldBool::<4,1,0,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1157    }
1158
1159    #[doc = "When acting as a slave, this bit controls whether the controller responds to 7- or 10-bit addresses.\n0= 7-bit addressing\n1= 10-bit addressing"]
1160    #[inline(always)]
1161    pub fn i2c_10bitaddr_slave(
1162        self,
1163    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2ConReg_SPEC, crate::common::RW> {
1164        crate::common::RegisterFieldBool::<3,1,0,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1165    }
1166
1167    #[doc = "These bits control at which speed the controller operates.\n1= standard mode (100 kbit/s)\n2= fast mode (400 kbit/s)"]
1168    #[inline(always)]
1169    pub fn i2c_speed(
1170        self,
1171    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, I2C2ConReg_SPEC, crate::common::RW>
1172    {
1173        crate::common::RegisterField::<1,0x3,1,0,u8,u8,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1174    }
1175
1176    #[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\'."]
1177    #[inline(always)]
1178    pub fn i2c_master_mode(
1179        self,
1180    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2ConReg_SPEC, crate::common::RW> {
1181        crate::common::RegisterFieldBool::<0,1,0,I2C2ConReg_SPEC,crate::common::RW>::from_register(self,0)
1182    }
1183}
1184impl ::core::default::Default for I2C2ConReg {
1185    #[inline(always)]
1186    fn default() -> I2C2ConReg {
1187        <crate::RegValueT<I2C2ConReg_SPEC> as RegisterValue<_>>::new(125)
1188    }
1189}
1190
1191#[doc(hidden)]
1192#[derive(Copy, Clone, Eq, PartialEq)]
1193pub struct I2C2DataCmdReg_SPEC;
1194impl crate::sealed::RegSpec for I2C2DataCmdReg_SPEC {
1195    type DataType = u16;
1196}
1197
1198#[doc = "I2C Rx/Tx Data Buffer and Command Register"]
1199pub type I2C2DataCmdReg = crate::RegValueT<I2C2DataCmdReg_SPEC>;
1200
1201impl I2C2DataCmdReg {
1202    #[doc = "This bit controls whether a RESTART is issued before the byte is sent or received. When 1, If IC_RESTART_EN is 1, a RESTART is issued before the data is sent/received (according to the value of CMD), regardless of whether or not the transfer direction is changing from the previous command; if IC_RESTART_EN is 0, a STOP followed by a START is issued instead. When 0 If IC_RESTART_EN is 1, a RESTART is issued only if the transfer direction is changing from the previous command; if IC_RESTART_EN is 0, a STOP followed by a START is issued instead. Reset value: 0x0"]
1203    #[inline(always)]
1204    pub fn restart(
1205        self,
1206    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2DataCmdReg_SPEC, crate::common::W> {
1207        crate::common::RegisterFieldBool::<10,1,0,I2C2DataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1208    }
1209
1210    #[doc = "This bit controls whether a STOP is issued after the byte is sent or received. When 1 STOP is issued after this byte, regardless of whether or not the Tx FIFO is empty. If the Tx FIFO is not empty, the master immediately tries to start a new transfer by issuing a START and arbitrating for the bus. When 0 STOP is not issued after this byte, regardless of whether or not the Tx FIFO is empty. If the Tx FIFO is not empty, the master continues the current transfer by sending/receiving data bytes according to the value of the CMD bit. If the Tx FIFO is empty, the master holds the SCL line low and stalls the bus until a new command is available in the Tx FIFO. Reset value: 0x0"]
1211    #[inline(always)]
1212    pub fn stop(
1213        self,
1214    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2DataCmdReg_SPEC, crate::common::W> {
1215        crate::common::RegisterFieldBool::<9,1,0,I2C2DataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1216    }
1217
1218    #[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"]
1219    #[inline(always)]
1220    pub fn cmd(
1221        self,
1222    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2DataCmdReg_SPEC, crate::common::W> {
1223        crate::common::RegisterFieldBool::<8,1,0,I2C2DataCmdReg_SPEC,crate::common::W>::from_register(self,0)
1224    }
1225
1226    #[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."]
1227    #[inline(always)]
1228    pub fn dat(
1229        self,
1230    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2C2DataCmdReg_SPEC, crate::common::RW>
1231    {
1232        crate::common::RegisterField::<0,0xff,1,0,u8,u8,I2C2DataCmdReg_SPEC,crate::common::RW>::from_register(self,0)
1233    }
1234}
1235impl ::core::default::Default for I2C2DataCmdReg {
1236    #[inline(always)]
1237    fn default() -> I2C2DataCmdReg {
1238        <crate::RegValueT<I2C2DataCmdReg_SPEC> as RegisterValue<_>>::new(0)
1239    }
1240}
1241
1242#[doc(hidden)]
1243#[derive(Copy, Clone, Eq, PartialEq)]
1244pub struct I2C2DmaCrReg_SPEC;
1245impl crate::sealed::RegSpec for I2C2DmaCrReg_SPEC {
1246    type DataType = u16;
1247}
1248
1249#[doc = "DMA Control Register"]
1250pub type I2C2DmaCrReg = crate::RegValueT<I2C2DmaCrReg_SPEC>;
1251
1252impl I2C2DmaCrReg {
1253    #[doc = "Transmit DMA Enable. This bit enables/disables the transmit FIFO DMA channel. 0 = Transmit DMA disabled 1 = Transmit DMA enabled"]
1254    #[inline(always)]
1255    pub fn tdmae(
1256        self,
1257    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2DmaCrReg_SPEC, crate::common::RW> {
1258        crate::common::RegisterFieldBool::<1,1,0,I2C2DmaCrReg_SPEC,crate::common::RW>::from_register(self,0)
1259    }
1260
1261    #[doc = "Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel. 0 = Receive DMA disabled 1 = Receive DMA enabled"]
1262    #[inline(always)]
1263    pub fn rdmae(
1264        self,
1265    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2DmaCrReg_SPEC, crate::common::RW> {
1266        crate::common::RegisterFieldBool::<0,1,0,I2C2DmaCrReg_SPEC,crate::common::RW>::from_register(self,0)
1267    }
1268}
1269impl ::core::default::Default for I2C2DmaCrReg {
1270    #[inline(always)]
1271    fn default() -> I2C2DmaCrReg {
1272        <crate::RegValueT<I2C2DmaCrReg_SPEC> as RegisterValue<_>>::new(0)
1273    }
1274}
1275
1276#[doc(hidden)]
1277#[derive(Copy, Clone, Eq, PartialEq)]
1278pub struct I2C2DmaRdlrReg_SPEC;
1279impl crate::sealed::RegSpec for I2C2DmaRdlrReg_SPEC {
1280    type DataType = u16;
1281}
1282
1283#[doc = "I2C Receive Data Level Register"]
1284pub type I2C2DmaRdlrReg = crate::RegValueT<I2C2DmaRdlrReg_SPEC>;
1285
1286impl I2C2DmaRdlrReg {
1287    #[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."]
1288    #[inline(always)]
1289    pub fn dmardl(
1290        self,
1291    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2DmaRdlrReg_SPEC, crate::common::RW>
1292    {
1293        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2DmaRdlrReg_SPEC,crate::common::RW>::from_register(self,0)
1294    }
1295}
1296impl ::core::default::Default for I2C2DmaRdlrReg {
1297    #[inline(always)]
1298    fn default() -> I2C2DmaRdlrReg {
1299        <crate::RegValueT<I2C2DmaRdlrReg_SPEC> as RegisterValue<_>>::new(0)
1300    }
1301}
1302
1303#[doc(hidden)]
1304#[derive(Copy, Clone, Eq, PartialEq)]
1305pub struct I2C2DmaTdlrReg_SPEC;
1306impl crate::sealed::RegSpec for I2C2DmaTdlrReg_SPEC {
1307    type DataType = u16;
1308}
1309
1310#[doc = "DMA Transmit Data Level Register"]
1311pub type I2C2DmaTdlrReg = crate::RegValueT<I2C2DmaTdlrReg_SPEC>;
1312
1313impl I2C2DmaTdlrReg {
1314    #[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."]
1315    #[inline(always)]
1316    pub fn dmatdl(
1317        self,
1318    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2DmaTdlrReg_SPEC, crate::common::RW>
1319    {
1320        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2DmaTdlrReg_SPEC,crate::common::RW>::from_register(self,0)
1321    }
1322}
1323impl ::core::default::Default for I2C2DmaTdlrReg {
1324    #[inline(always)]
1325    fn default() -> I2C2DmaTdlrReg {
1326        <crate::RegValueT<I2C2DmaTdlrReg_SPEC> as RegisterValue<_>>::new(0)
1327    }
1328}
1329
1330#[doc(hidden)]
1331#[derive(Copy, Clone, Eq, PartialEq)]
1332pub struct I2C2EnableReg_SPEC;
1333impl crate::sealed::RegSpec for I2C2EnableReg_SPEC {
1334    type DataType = u16;
1335}
1336
1337#[doc = "I2C Enable Register"]
1338pub type I2C2EnableReg = crate::RegValueT<I2C2EnableReg_SPEC>;
1339
1340impl I2C2EnableReg {
1341    #[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."]
1342    #[inline(always)]
1343    pub fn i2c_abort(
1344        self,
1345    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2EnableReg_SPEC, crate::common::RW> {
1346        crate::common::RegisterFieldBool::<1,1,0,I2C2EnableReg_SPEC,crate::common::RW>::from_register(self,0)
1347    }
1348
1349    #[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"]
1350    #[inline(always)]
1351    pub fn ctrl_enable(
1352        self,
1353    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2EnableReg_SPEC, crate::common::RW> {
1354        crate::common::RegisterFieldBool::<0,1,0,I2C2EnableReg_SPEC,crate::common::RW>::from_register(self,0)
1355    }
1356}
1357impl ::core::default::Default for I2C2EnableReg {
1358    #[inline(always)]
1359    fn default() -> I2C2EnableReg {
1360        <crate::RegValueT<I2C2EnableReg_SPEC> as RegisterValue<_>>::new(0)
1361    }
1362}
1363
1364#[doc(hidden)]
1365#[derive(Copy, Clone, Eq, PartialEq)]
1366pub struct I2C2EnableStatusReg_SPEC;
1367impl crate::sealed::RegSpec for I2C2EnableStatusReg_SPEC {
1368    type DataType = u16;
1369}
1370
1371#[doc = "I2C Enable Status Register"]
1372pub type I2C2EnableStatusReg = crate::RegValueT<I2C2EnableStatusReg_SPEC>;
1373
1374impl I2C2EnableStatusReg {
1375    #[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."]
1376    #[inline(always)]
1377    pub fn slv_rx_data_lost(
1378        self,
1379    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2EnableStatusReg_SPEC, crate::common::R> {
1380        crate::common::RegisterFieldBool::<2,1,0,I2C2EnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1381    }
1382
1383    #[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."]
1384    #[inline(always)]
1385    pub fn slv_disabled_while_busy(
1386        self,
1387    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2EnableStatusReg_SPEC, crate::common::R> {
1388        crate::common::RegisterFieldBool::<1,1,0,I2C2EnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1389    }
1390
1391    #[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)."]
1392    #[inline(always)]
1393    pub fn ic_en(
1394        self,
1395    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2EnableStatusReg_SPEC, crate::common::R> {
1396        crate::common::RegisterFieldBool::<0,1,0,I2C2EnableStatusReg_SPEC,crate::common::R>::from_register(self,0)
1397    }
1398}
1399impl ::core::default::Default for I2C2EnableStatusReg {
1400    #[inline(always)]
1401    fn default() -> I2C2EnableStatusReg {
1402        <crate::RegValueT<I2C2EnableStatusReg_SPEC> as RegisterValue<_>>::new(0)
1403    }
1404}
1405
1406#[doc(hidden)]
1407#[derive(Copy, Clone, Eq, PartialEq)]
1408pub struct I2C2FsSclHcntReg_SPEC;
1409impl crate::sealed::RegSpec for I2C2FsSclHcntReg_SPEC {
1410    type DataType = u16;
1411}
1412
1413#[doc = "Fast Speed I2C Clock SCL High Count Register"]
1414pub type I2C2FsSclHcntReg = crate::RegValueT<I2C2FsSclHcntReg_SPEC>;
1415
1416impl I2C2FsSclHcntReg {
1417    #[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."]
1418    #[inline(always)]
1419    pub fn ic_fs_scl_hcnt(
1420        self,
1421    ) -> crate::common::RegisterField<
1422        0,
1423        0xffff,
1424        1,
1425        0,
1426        u16,
1427        u16,
1428        I2C2FsSclHcntReg_SPEC,
1429        crate::common::RW,
1430    > {
1431        crate::common::RegisterField::<
1432            0,
1433            0xffff,
1434            1,
1435            0,
1436            u16,
1437            u16,
1438            I2C2FsSclHcntReg_SPEC,
1439            crate::common::RW,
1440        >::from_register(self, 0)
1441    }
1442}
1443impl ::core::default::Default for I2C2FsSclHcntReg {
1444    #[inline(always)]
1445    fn default() -> I2C2FsSclHcntReg {
1446        <crate::RegValueT<I2C2FsSclHcntReg_SPEC> as RegisterValue<_>>::new(8)
1447    }
1448}
1449
1450#[doc(hidden)]
1451#[derive(Copy, Clone, Eq, PartialEq)]
1452pub struct I2C2FsSclLcntReg_SPEC;
1453impl crate::sealed::RegSpec for I2C2FsSclLcntReg_SPEC {
1454    type DataType = u16;
1455}
1456
1457#[doc = "Fast Speed I2C Clock SCL Low Count Register"]
1458pub type I2C2FsSclLcntReg = crate::RegValueT<I2C2FsSclLcntReg_SPEC>;
1459
1460impl I2C2FsSclLcntReg {
1461    #[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."]
1462    #[inline(always)]
1463    pub fn ic_fs_scl_lcnt(
1464        self,
1465    ) -> crate::common::RegisterField<
1466        0,
1467        0xffff,
1468        1,
1469        0,
1470        u16,
1471        u16,
1472        I2C2FsSclLcntReg_SPEC,
1473        crate::common::RW,
1474    > {
1475        crate::common::RegisterField::<
1476            0,
1477            0xffff,
1478            1,
1479            0,
1480            u16,
1481            u16,
1482            I2C2FsSclLcntReg_SPEC,
1483            crate::common::RW,
1484        >::from_register(self, 0)
1485    }
1486}
1487impl ::core::default::Default for I2C2FsSclLcntReg {
1488    #[inline(always)]
1489    fn default() -> I2C2FsSclLcntReg {
1490        <crate::RegValueT<I2C2FsSclLcntReg_SPEC> as RegisterValue<_>>::new(23)
1491    }
1492}
1493
1494#[doc(hidden)]
1495#[derive(Copy, Clone, Eq, PartialEq)]
1496pub struct I2C2IcFsSpklenReg_SPEC;
1497impl crate::sealed::RegSpec for I2C2IcFsSpklenReg_SPEC {
1498    type DataType = u16;
1499}
1500
1501#[doc = "I2C SS and FS spike suppression limit Size"]
1502pub type I2C2IcFsSpklenReg = crate::RegValueT<I2C2IcFsSpklenReg_SPEC>;
1503
1504impl I2C2IcFsSpklenReg {
1505    #[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."]
1506    #[inline(always)]
1507    pub fn ic_fs_spklen(
1508        self,
1509    ) -> crate::common::RegisterField<
1510        0,
1511        0xff,
1512        1,
1513        0,
1514        u8,
1515        u8,
1516        I2C2IcFsSpklenReg_SPEC,
1517        crate::common::RW,
1518    > {
1519        crate::common::RegisterField::<
1520            0,
1521            0xff,
1522            1,
1523            0,
1524            u8,
1525            u8,
1526            I2C2IcFsSpklenReg_SPEC,
1527            crate::common::RW,
1528        >::from_register(self, 0)
1529    }
1530}
1531impl ::core::default::Default for I2C2IcFsSpklenReg {
1532    #[inline(always)]
1533    fn default() -> I2C2IcFsSpklenReg {
1534        <crate::RegValueT<I2C2IcFsSpklenReg_SPEC> as RegisterValue<_>>::new(1)
1535    }
1536}
1537
1538#[doc(hidden)]
1539#[derive(Copy, Clone, Eq, PartialEq)]
1540pub struct I2C2IntrMaskReg_SPEC;
1541impl crate::sealed::RegSpec for I2C2IntrMaskReg_SPEC {
1542    type DataType = u16;
1543}
1544
1545#[doc = "I2C Interrupt Mask Register"]
1546pub type I2C2IntrMaskReg = crate::RegValueT<I2C2IntrMaskReg_SPEC>;
1547
1548impl I2C2IntrMaskReg {
1549    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1550    #[inline(always)]
1551    pub fn m_gen_call(
1552        self,
1553    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1554        crate::common::RegisterFieldBool::<11,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1555    }
1556
1557    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1558    #[inline(always)]
1559    pub fn m_start_det(
1560        self,
1561    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1562        crate::common::RegisterFieldBool::<10,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1563    }
1564
1565    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1566    #[inline(always)]
1567    pub fn m_stop_det(
1568        self,
1569    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1570        crate::common::RegisterFieldBool::<9,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1571    }
1572
1573    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1574    #[inline(always)]
1575    pub fn m_activity(
1576        self,
1577    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1578        crate::common::RegisterFieldBool::<8,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1579    }
1580
1581    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1582    #[inline(always)]
1583    pub fn m_rx_done(
1584        self,
1585    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1586        crate::common::RegisterFieldBool::<7,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1587    }
1588
1589    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1590    #[inline(always)]
1591    pub fn m_tx_abrt(
1592        self,
1593    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1594        crate::common::RegisterFieldBool::<6,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1595    }
1596
1597    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1598    #[inline(always)]
1599    pub fn m_rd_req(
1600        self,
1601    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1602        crate::common::RegisterFieldBool::<5,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1603    }
1604
1605    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1606    #[inline(always)]
1607    pub fn m_tx_empty(
1608        self,
1609    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1610        crate::common::RegisterFieldBool::<4,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1611    }
1612
1613    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1614    #[inline(always)]
1615    pub fn m_tx_over(
1616        self,
1617    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1618        crate::common::RegisterFieldBool::<3,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1619    }
1620
1621    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1622    #[inline(always)]
1623    pub fn m_rx_full(
1624        self,
1625    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1626        crate::common::RegisterFieldBool::<2,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1627    }
1628
1629    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1630    #[inline(always)]
1631    pub fn m_rx_over(
1632        self,
1633    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1634        crate::common::RegisterFieldBool::<1,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1635    }
1636
1637    #[doc = "These bits mask their corresponding interrupt status bits in the I2C_INTR_STAT register."]
1638    #[inline(always)]
1639    pub fn m_rx_under(
1640        self,
1641    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2IntrMaskReg_SPEC, crate::common::RW> {
1642        crate::common::RegisterFieldBool::<0,1,0,I2C2IntrMaskReg_SPEC,crate::common::RW>::from_register(self,0)
1643    }
1644}
1645impl ::core::default::Default for I2C2IntrMaskReg {
1646    #[inline(always)]
1647    fn default() -> I2C2IntrMaskReg {
1648        <crate::RegValueT<I2C2IntrMaskReg_SPEC> as RegisterValue<_>>::new(2303)
1649    }
1650}
1651
1652#[doc(hidden)]
1653#[derive(Copy, Clone, Eq, PartialEq)]
1654pub struct I2C2IntrStatReg_SPEC;
1655impl crate::sealed::RegSpec for I2C2IntrStatReg_SPEC {
1656    type DataType = u16;
1657}
1658
1659#[doc = "I2C Interrupt Status Register"]
1660pub type I2C2IntrStatReg = crate::RegValueT<I2C2IntrStatReg_SPEC>;
1661
1662impl I2C2IntrStatReg {
1663    #[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."]
1664    #[inline(always)]
1665    pub fn r_gen_call(
1666        self,
1667    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1668        crate::common::RegisterFieldBool::<11,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1669    }
1670
1671    #[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."]
1672    #[inline(always)]
1673    pub fn r_start_det(
1674        self,
1675    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1676        crate::common::RegisterFieldBool::<10,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1677    }
1678
1679    #[doc = "Indicates whether a STOP condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1680    #[inline(always)]
1681    pub fn r_stop_det(
1682        self,
1683    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1684        crate::common::RegisterFieldBool::<9,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1685    }
1686
1687    #[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."]
1688    #[inline(always)]
1689    pub fn r_activity(
1690        self,
1691    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1692        crate::common::RegisterFieldBool::<8,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1693    }
1694
1695    #[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."]
1696    #[inline(always)]
1697    pub fn r_rx_done(
1698        self,
1699    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1700        crate::common::RegisterFieldBool::<7,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1701    }
1702
1703    #[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."]
1704    #[inline(always)]
1705    pub fn r_tx_abrt(
1706        self,
1707    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1708        crate::common::RegisterFieldBool::<6,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1709    }
1710
1711    #[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"]
1712    #[inline(always)]
1713    pub fn r_rd_req(
1714        self,
1715    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1716        crate::common::RegisterFieldBool::<5,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1717    }
1718
1719    #[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."]
1720    #[inline(always)]
1721    pub fn r_tx_empty(
1722        self,
1723    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1724        crate::common::RegisterFieldBool::<4,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1725    }
1726
1727    #[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"]
1728    #[inline(always)]
1729    pub fn r_tx_over(
1730        self,
1731    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1732        crate::common::RegisterFieldBool::<3,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1733    }
1734
1735    #[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."]
1736    #[inline(always)]
1737    pub fn r_rx_full(
1738        self,
1739    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1740        crate::common::RegisterFieldBool::<2,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1741    }
1742
1743    #[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."]
1744    #[inline(always)]
1745    pub fn r_rx_over(
1746        self,
1747    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1748        crate::common::RegisterFieldBool::<1,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1749    }
1750
1751    #[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."]
1752    #[inline(always)]
1753    pub fn r_rx_under(
1754        self,
1755    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2IntrStatReg_SPEC, crate::common::R> {
1756        crate::common::RegisterFieldBool::<0,1,0,I2C2IntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1757    }
1758}
1759impl ::core::default::Default for I2C2IntrStatReg {
1760    #[inline(always)]
1761    fn default() -> I2C2IntrStatReg {
1762        <crate::RegValueT<I2C2IntrStatReg_SPEC> as RegisterValue<_>>::new(0)
1763    }
1764}
1765
1766#[doc(hidden)]
1767#[derive(Copy, Clone, Eq, PartialEq)]
1768pub struct I2C2RawIntrStatReg_SPEC;
1769impl crate::sealed::RegSpec for I2C2RawIntrStatReg_SPEC {
1770    type DataType = u16;
1771}
1772
1773#[doc = "I2C Raw Interrupt Status Register"]
1774pub type I2C2RawIntrStatReg = crate::RegValueT<I2C2RawIntrStatReg_SPEC>;
1775
1776impl I2C2RawIntrStatReg {
1777    #[doc = "Set only when a General Call address is received and it is acknowledged. It stays set until it is cleared either by disabling controller or when the CPU reads bit 0 of the I2C_CLR_GEN_CALL register. I2C Ctrl stores the received data in the Rx buffer."]
1778    #[inline(always)]
1779    pub fn gen_call(
1780        self,
1781    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1782        crate::common::RegisterFieldBool::<11,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1783    }
1784
1785    #[doc = "Indicates whether a START or RESTART condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1786    #[inline(always)]
1787    pub fn start_det(
1788        self,
1789    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1790        crate::common::RegisterFieldBool::<10,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1791    }
1792
1793    #[doc = "Indicates whether a STOP condition has occurred on the I2C interface regardless of whether controller is operating in slave or master mode."]
1794    #[inline(always)]
1795    pub fn stop_det(
1796        self,
1797    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1798        crate::common::RegisterFieldBool::<9,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1799    }
1800
1801    #[doc = "This bit captures I2C Ctrl activity and stays set until it is cleared. There are four ways to clear it:\n=> Disabling the I2C Ctrl\n=> Reading the IC_CLR_ACTIVITY register\n=> Reading the IC_CLR_INTR register\n=> System reset\nOnce this bit is set, it stays set unless one of the four methods is used to clear it. Even if the controller module is idle, this bit remains set until cleared, indicating that there was activity on the bus."]
1802    #[inline(always)]
1803    pub fn activity(
1804        self,
1805    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1806        crate::common::RegisterFieldBool::<8,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1807    }
1808
1809    #[doc = "When the controller is acting as a slave-transmitter, this bit is set to 1 if the master does not acknowledge a transmitted byte. This occurs on the last byte of the transmission, indicating that the transmission is done."]
1810    #[inline(always)]
1811    pub fn rx_done(
1812        self,
1813    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1814        crate::common::RegisterFieldBool::<7,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1815    }
1816
1817    #[doc = "This bit indicates if the controller, as an I2C transmitter, is unable to complete the intended actions on the contents of the transmit FIFO. This situation can occur both as an I2C master or an I2C slave, and is referred to as a \"transmit abort\".\nWhen this bit is set to 1, the I2C_TX_ABRT_SOURCE register indicates the reason why the transmit abort takes places.\nNOTE: The controller flushes/resets/empties the TX FIFO whenever this bit is set. The TX FIFO remains in this flushed state until the register I2C_CLR_TX_ABRT is read. Once this read is performed, the TX FIFO is then ready to accept more data bytes from the APB interface."]
1818    #[inline(always)]
1819    pub fn tx_abrt(
1820        self,
1821    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1822        crate::common::RegisterFieldBool::<6,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1823    }
1824
1825    #[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"]
1826    #[inline(always)]
1827    pub fn rd_req(
1828        self,
1829    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1830        crate::common::RegisterFieldBool::<5,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1831    }
1832
1833    #[doc = "This bit is set to 1 when the transmit buffer is at or below the threshold value set in the I2C_TX_TL register. It is automatically cleared by hardware when the buffer level goes above the threshold. When the IC_ENABLE bit 0 is 0, the TX FIFO is flushed and held in reset. There the TX FIFO looks like it has no data within it, so this bit is set to 1, provided there is activity in the master or slave state machines. When there is no longer activity, then with ic_en=0, this bit is set to 0."]
1834    #[inline(always)]
1835    pub fn tx_empty(
1836        self,
1837    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1838        crate::common::RegisterFieldBool::<4,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1839    }
1840
1841    #[doc = "Set during transmit if the transmit buffer is filled to 32 and the processor attempts to issue another I2C command by writing to the IC_DATA_CMD register. When the module is disabled, this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared"]
1842    #[inline(always)]
1843    pub fn tx_over(
1844        self,
1845    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1846        crate::common::RegisterFieldBool::<3,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1847    }
1848
1849    #[doc = "Set when the receive buffer reaches or goes above the RX_TL threshold in the I2C_RX_TL register. It is automatically cleared by hardware when buffer level goes below the threshold. If the module is disabled (I2C_ENABLE\\[0\\]=0), the RX FIFO is flushed and held in reset; therefore the RX FIFO is not full. So this bit is cleared once the I2C_ENABLE bit 0 is programmed with a 0, regardless of the activity that continues."]
1850    #[inline(always)]
1851    pub fn rx_full(
1852        self,
1853    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1854        crate::common::RegisterFieldBool::<2,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1855    }
1856
1857    #[doc = "Set if the receive buffer is completely filled to 32 and an additional byte is received from an external I2C device. The controller acknowledges this, but any data bytes received after the FIFO is full are lost. If the module is disabled (I2C_ENABLE\\[0\\]=0), this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared."]
1858    #[inline(always)]
1859    pub fn rx_over(
1860        self,
1861    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1862        crate::common::RegisterFieldBool::<1,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1863    }
1864
1865    #[doc = "Set if the processor attempts to read the receive buffer when it is empty by reading from the IC_DATA_CMD register. If the module is disabled (I2C_ENABLE\\[0\\]=0), this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared."]
1866    #[inline(always)]
1867    pub fn rx_under(
1868        self,
1869    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2RawIntrStatReg_SPEC, crate::common::R> {
1870        crate::common::RegisterFieldBool::<0,1,0,I2C2RawIntrStatReg_SPEC,crate::common::R>::from_register(self,0)
1871    }
1872}
1873impl ::core::default::Default for I2C2RawIntrStatReg {
1874    #[inline(always)]
1875    fn default() -> I2C2RawIntrStatReg {
1876        <crate::RegValueT<I2C2RawIntrStatReg_SPEC> as RegisterValue<_>>::new(0)
1877    }
1878}
1879
1880#[doc(hidden)]
1881#[derive(Copy, Clone, Eq, PartialEq)]
1882pub struct I2C2RxflrReg_SPEC;
1883impl crate::sealed::RegSpec for I2C2RxflrReg_SPEC {
1884    type DataType = u16;
1885}
1886
1887#[doc = "I2C Receive FIFO Level Register"]
1888pub type I2C2RxflrReg = crate::RegValueT<I2C2RxflrReg_SPEC>;
1889
1890impl I2C2RxflrReg {
1891    #[doc = "Receive FIFO Level. Contains the number of valid data entries in the receive FIFO. Size is constrained by the RXFLR value"]
1892    #[inline(always)]
1893    pub fn rxflr(
1894        self,
1895    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, I2C2RxflrReg_SPEC, crate::common::R>
1896    {
1897        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,I2C2RxflrReg_SPEC,crate::common::R>::from_register(self,0)
1898    }
1899}
1900impl ::core::default::Default for I2C2RxflrReg {
1901    #[inline(always)]
1902    fn default() -> I2C2RxflrReg {
1903        <crate::RegValueT<I2C2RxflrReg_SPEC> as RegisterValue<_>>::new(0)
1904    }
1905}
1906
1907#[doc(hidden)]
1908#[derive(Copy, Clone, Eq, PartialEq)]
1909pub struct I2C2RxTlReg_SPEC;
1910impl crate::sealed::RegSpec for I2C2RxTlReg_SPEC {
1911    type DataType = u16;
1912}
1913
1914#[doc = "I2C Receive FIFO Threshold Register"]
1915pub type I2C2RxTlReg = crate::RegValueT<I2C2RxTlReg_SPEC>;
1916
1917impl I2C2RxTlReg {
1918    #[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."]
1919    #[inline(always)]
1920    pub fn rx_tl(
1921        self,
1922    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2RxTlReg_SPEC, crate::common::RW>
1923    {
1924        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2RxTlReg_SPEC,crate::common::RW>::from_register(self,0)
1925    }
1926}
1927impl ::core::default::Default for I2C2RxTlReg {
1928    #[inline(always)]
1929    fn default() -> I2C2RxTlReg {
1930        <crate::RegValueT<I2C2RxTlReg_SPEC> as RegisterValue<_>>::new(0)
1931    }
1932}
1933
1934#[doc(hidden)]
1935#[derive(Copy, Clone, Eq, PartialEq)]
1936pub struct I2C2SarReg_SPEC;
1937impl crate::sealed::RegSpec for I2C2SarReg_SPEC {
1938    type DataType = u16;
1939}
1940
1941#[doc = "I2C Slave Address Register"]
1942pub type I2C2SarReg = crate::RegValueT<I2C2SarReg_SPEC>;
1943
1944impl I2C2SarReg {
1945    #[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."]
1946    #[inline(always)]
1947    pub fn ic_sar(
1948        self,
1949    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, I2C2SarReg_SPEC, crate::common::RW>
1950    {
1951        crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,I2C2SarReg_SPEC,crate::common::RW>::from_register(self,0)
1952    }
1953}
1954impl ::core::default::Default for I2C2SarReg {
1955    #[inline(always)]
1956    fn default() -> I2C2SarReg {
1957        <crate::RegValueT<I2C2SarReg_SPEC> as RegisterValue<_>>::new(85)
1958    }
1959}
1960
1961#[doc(hidden)]
1962#[derive(Copy, Clone, Eq, PartialEq)]
1963pub struct I2C2SdaHoldReg_SPEC;
1964impl crate::sealed::RegSpec for I2C2SdaHoldReg_SPEC {
1965    type DataType = u16;
1966}
1967
1968#[doc = "I2C SDA Hold Time Length Register"]
1969pub type I2C2SdaHoldReg = crate::RegValueT<I2C2SdaHoldReg_SPEC>;
1970
1971impl I2C2SdaHoldReg {
1972    #[doc = "SDA Hold time"]
1973    #[inline(always)]
1974    pub fn ic_sda_hold(
1975        self,
1976    ) -> crate::common::RegisterField<
1977        0,
1978        0xffff,
1979        1,
1980        0,
1981        u16,
1982        u16,
1983        I2C2SdaHoldReg_SPEC,
1984        crate::common::RW,
1985    > {
1986        crate::common::RegisterField::<
1987            0,
1988            0xffff,
1989            1,
1990            0,
1991            u16,
1992            u16,
1993            I2C2SdaHoldReg_SPEC,
1994            crate::common::RW,
1995        >::from_register(self, 0)
1996    }
1997}
1998impl ::core::default::Default for I2C2SdaHoldReg {
1999    #[inline(always)]
2000    fn default() -> I2C2SdaHoldReg {
2001        <crate::RegValueT<I2C2SdaHoldReg_SPEC> as RegisterValue<_>>::new(1)
2002    }
2003}
2004
2005#[doc(hidden)]
2006#[derive(Copy, Clone, Eq, PartialEq)]
2007pub struct I2C2SdaSetupReg_SPEC;
2008impl crate::sealed::RegSpec for I2C2SdaSetupReg_SPEC {
2009    type DataType = u16;
2010}
2011
2012#[doc = "I2C SDA Setup Register"]
2013pub type I2C2SdaSetupReg = crate::RegValueT<I2C2SdaSetupReg_SPEC>;
2014
2015impl I2C2SdaSetupReg {
2016    #[doc = "SDA Setup.\nThis register controls the amount of time delay (number of I2C clock periods) between the rising edge of SCL and SDA changing by holding SCL low when I2C block services a read request while operating as a slave-transmitter. This register must be programmed with a value equal to or greater than 2. It is recommended that if the required delay is 1000ns, then for an I2C frequency of 10 MHz, IC_SDA_SETUP should be programmed to a value of 11.Writes to this register succeed only when IC_ENABLE\\[0\\] = 0."]
2017    #[inline(always)]
2018    pub fn sda_setup(
2019        self,
2020    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, I2C2SdaSetupReg_SPEC, crate::common::RW>
2021    {
2022        crate::common::RegisterField::<0,0xff,1,0,u8,u8,I2C2SdaSetupReg_SPEC,crate::common::RW>::from_register(self,0)
2023    }
2024}
2025impl ::core::default::Default for I2C2SdaSetupReg {
2026    #[inline(always)]
2027    fn default() -> I2C2SdaSetupReg {
2028        <crate::RegValueT<I2C2SdaSetupReg_SPEC> as RegisterValue<_>>::new(100)
2029    }
2030}
2031
2032#[doc(hidden)]
2033#[derive(Copy, Clone, Eq, PartialEq)]
2034pub struct I2C2SsSclHcntReg_SPEC;
2035impl crate::sealed::RegSpec for I2C2SsSclHcntReg_SPEC {
2036    type DataType = u16;
2037}
2038
2039#[doc = "Standard Speed I2C Clock SCL High Count Register"]
2040pub type I2C2SsSclHcntReg = crate::RegValueT<I2C2SsSclHcntReg_SPEC>;
2041
2042impl I2C2SsSclHcntReg {
2043    #[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."]
2044    #[inline(always)]
2045    pub fn ic_ss_scl_hcnt(
2046        self,
2047    ) -> crate::common::RegisterField<
2048        0,
2049        0xffff,
2050        1,
2051        0,
2052        u16,
2053        u16,
2054        I2C2SsSclHcntReg_SPEC,
2055        crate::common::RW,
2056    > {
2057        crate::common::RegisterField::<
2058            0,
2059            0xffff,
2060            1,
2061            0,
2062            u16,
2063            u16,
2064            I2C2SsSclHcntReg_SPEC,
2065            crate::common::RW,
2066        >::from_register(self, 0)
2067    }
2068}
2069impl ::core::default::Default for I2C2SsSclHcntReg {
2070    #[inline(always)]
2071    fn default() -> I2C2SsSclHcntReg {
2072        <crate::RegValueT<I2C2SsSclHcntReg_SPEC> as RegisterValue<_>>::new(72)
2073    }
2074}
2075
2076#[doc(hidden)]
2077#[derive(Copy, Clone, Eq, PartialEq)]
2078pub struct I2C2SsSclLcntReg_SPEC;
2079impl crate::sealed::RegSpec for I2C2SsSclLcntReg_SPEC {
2080    type DataType = u16;
2081}
2082
2083#[doc = "Standard Speed I2C Clock SCL Low Count Register"]
2084pub type I2C2SsSclLcntReg = crate::RegValueT<I2C2SsSclLcntReg_SPEC>;
2085
2086impl I2C2SsSclLcntReg {
2087    #[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."]
2088    #[inline(always)]
2089    pub fn ic_ss_scl_lcnt(
2090        self,
2091    ) -> crate::common::RegisterField<
2092        0,
2093        0xffff,
2094        1,
2095        0,
2096        u16,
2097        u16,
2098        I2C2SsSclLcntReg_SPEC,
2099        crate::common::RW,
2100    > {
2101        crate::common::RegisterField::<
2102            0,
2103            0xffff,
2104            1,
2105            0,
2106            u16,
2107            u16,
2108            I2C2SsSclLcntReg_SPEC,
2109            crate::common::RW,
2110        >::from_register(self, 0)
2111    }
2112}
2113impl ::core::default::Default for I2C2SsSclLcntReg {
2114    #[inline(always)]
2115    fn default() -> I2C2SsSclLcntReg {
2116        <crate::RegValueT<I2C2SsSclLcntReg_SPEC> as RegisterValue<_>>::new(79)
2117    }
2118}
2119
2120#[doc(hidden)]
2121#[derive(Copy, Clone, Eq, PartialEq)]
2122pub struct I2C2StatusReg_SPEC;
2123impl crate::sealed::RegSpec for I2C2StatusReg_SPEC {
2124    type DataType = u16;
2125}
2126
2127#[doc = "I2C Status Register"]
2128pub type I2C2StatusReg = crate::RegValueT<I2C2StatusReg_SPEC>;
2129
2130impl I2C2StatusReg {
2131    #[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"]
2132    #[inline(always)]
2133    pub fn slv_activity(
2134        self,
2135    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2136        crate::common::RegisterFieldBool::<6,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2137    }
2138
2139    #[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"]
2140    #[inline(always)]
2141    pub fn mst_activity(
2142        self,
2143    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2144        crate::common::RegisterFieldBool::<5,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2145    }
2146
2147    #[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"]
2148    #[inline(always)]
2149    pub fn rff(
2150        self,
2151    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2152        crate::common::RegisterFieldBool::<4,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2153    }
2154
2155    #[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"]
2156    #[inline(always)]
2157    pub fn rfne(
2158        self,
2159    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2160        crate::common::RegisterFieldBool::<3,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2161    }
2162
2163    #[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"]
2164    #[inline(always)]
2165    pub fn tfe(
2166        self,
2167    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2168        crate::common::RegisterFieldBool::<2,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2169    }
2170
2171    #[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"]
2172    #[inline(always)]
2173    pub fn tfnf(
2174        self,
2175    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2176        crate::common::RegisterFieldBool::<1,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2177    }
2178
2179    #[doc = "I2C Activity Status."]
2180    #[inline(always)]
2181    pub fn i2c_activity(
2182        self,
2183    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2StatusReg_SPEC, crate::common::R> {
2184        crate::common::RegisterFieldBool::<0,1,0,I2C2StatusReg_SPEC,crate::common::R>::from_register(self,0)
2185    }
2186}
2187impl ::core::default::Default for I2C2StatusReg {
2188    #[inline(always)]
2189    fn default() -> I2C2StatusReg {
2190        <crate::RegValueT<I2C2StatusReg_SPEC> as RegisterValue<_>>::new(6)
2191    }
2192}
2193
2194#[doc(hidden)]
2195#[derive(Copy, Clone, Eq, PartialEq)]
2196pub struct I2C2TarReg_SPEC;
2197impl crate::sealed::RegSpec for I2C2TarReg_SPEC {
2198    type DataType = u16;
2199}
2200
2201#[doc = "I2C Target Address Register"]
2202pub type I2C2TarReg = crate::RegValueT<I2C2TarReg_SPEC>;
2203
2204impl I2C2TarReg {
2205    #[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"]
2206    #[inline(always)]
2207    pub fn special(
2208        self,
2209    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2TarReg_SPEC, crate::common::RW> {
2210        crate::common::RegisterFieldBool::<11,1,0,I2C2TarReg_SPEC,crate::common::RW>::from_register(self,0)
2211    }
2212
2213    #[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"]
2214    #[inline(always)]
2215    pub fn gc_or_start(
2216        self,
2217    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2TarReg_SPEC, crate::common::RW> {
2218        crate::common::RegisterFieldBool::<10,1,0,I2C2TarReg_SPEC,crate::common::RW>::from_register(self,0)
2219    }
2220
2221    #[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"]
2222    #[inline(always)]
2223    pub fn ic_tar(
2224        self,
2225    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, I2C2TarReg_SPEC, crate::common::RW>
2226    {
2227        crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,I2C2TarReg_SPEC,crate::common::RW>::from_register(self,0)
2228    }
2229}
2230impl ::core::default::Default for I2C2TarReg {
2231    #[inline(always)]
2232    fn default() -> I2C2TarReg {
2233        <crate::RegValueT<I2C2TarReg_SPEC> as RegisterValue<_>>::new(85)
2234    }
2235}
2236
2237#[doc(hidden)]
2238#[derive(Copy, Clone, Eq, PartialEq)]
2239pub struct I2C2TxflrReg_SPEC;
2240impl crate::sealed::RegSpec for I2C2TxflrReg_SPEC {
2241    type DataType = u16;
2242}
2243
2244#[doc = "I2C Transmit FIFO Level Register"]
2245pub type I2C2TxflrReg = crate::RegValueT<I2C2TxflrReg_SPEC>;
2246
2247impl I2C2TxflrReg {
2248    #[doc = "Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO. Size is constrained by the TXFLR value"]
2249    #[inline(always)]
2250    pub fn txflr(
2251        self,
2252    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, I2C2TxflrReg_SPEC, crate::common::R>
2253    {
2254        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,I2C2TxflrReg_SPEC,crate::common::R>::from_register(self,0)
2255    }
2256}
2257impl ::core::default::Default for I2C2TxflrReg {
2258    #[inline(always)]
2259    fn default() -> I2C2TxflrReg {
2260        <crate::RegValueT<I2C2TxflrReg_SPEC> as RegisterValue<_>>::new(0)
2261    }
2262}
2263
2264#[doc(hidden)]
2265#[derive(Copy, Clone, Eq, PartialEq)]
2266pub struct I2C2TxAbrtSourceReg_SPEC;
2267impl crate::sealed::RegSpec for I2C2TxAbrtSourceReg_SPEC {
2268    type DataType = u16;
2269}
2270
2271#[doc = "I2C Transmit Abort Source Register"]
2272pub type I2C2TxAbrtSourceReg = crate::RegValueT<I2C2TxAbrtSourceReg_SPEC>;
2273
2274impl I2C2TxAbrtSourceReg {
2275    #[doc = "1: When the processor side responds to a slave mode request for data to be transmitted to a remote master and user writes a 1 in CMD (bit 8) of 2 IC_DATA_CMD register"]
2276    #[inline(always)]
2277    pub fn abrt_slvrd_intx(
2278        self,
2279    ) -> crate::common::RegisterFieldBool<15, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2280    {
2281        crate::common::RegisterFieldBool::<15,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2282    }
2283
2284    #[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."]
2285    #[inline(always)]
2286    pub fn abrt_slv_arblost(
2287        self,
2288    ) -> crate::common::RegisterFieldBool<14, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2289    {
2290        crate::common::RegisterFieldBool::<14,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2291    }
2292
2293    #[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."]
2294    #[inline(always)]
2295    pub fn abrt_slvflush_txfifo(
2296        self,
2297    ) -> crate::common::RegisterFieldBool<13, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2298    {
2299        crate::common::RegisterFieldBool::<13,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2300    }
2301
2302    #[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."]
2303    #[inline(always)]
2304    pub fn arb_lost(
2305        self,
2306    ) -> crate::common::RegisterFieldBool<12, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2307    {
2308        crate::common::RegisterFieldBool::<12,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2309    }
2310
2311    #[doc = "1: User tries to initiate a Master operation with the Master mode disabled."]
2312    #[inline(always)]
2313    pub fn abrt_master_dis(
2314        self,
2315    ) -> crate::common::RegisterFieldBool<11, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2316    {
2317        crate::common::RegisterFieldBool::<11,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2318    }
2319
2320    #[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."]
2321    #[inline(always)]
2322    pub fn abrt_10b_rd_norstrt(
2323        self,
2324    ) -> crate::common::RegisterFieldBool<10, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R>
2325    {
2326        crate::common::RegisterFieldBool::<10,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2327    }
2328
2329    #[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."]
2330    #[inline(always)]
2331    pub fn abrt_sbyte_norstrt(
2332        self,
2333    ) -> crate::common::RegisterFieldBool<9, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2334        crate::common::RegisterFieldBool::<9,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2335    }
2336
2337    #[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"]
2338    #[inline(always)]
2339    pub fn abrt_hs_norstrt(
2340        self,
2341    ) -> crate::common::RegisterFieldBool<8, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2342        crate::common::RegisterFieldBool::<8,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2343    }
2344
2345    #[doc = "1: Master has sent a START Byte and the START Byte was acknowledged (wrong behavior)."]
2346    #[inline(always)]
2347    pub fn abrt_sbyte_ackdet(
2348        self,
2349    ) -> crate::common::RegisterFieldBool<7, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2350        crate::common::RegisterFieldBool::<7,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2351    }
2352
2353    #[doc = "1: Master is in High Speed mode and the High Speed Master code was acknowledged (wrong behavior)."]
2354    #[inline(always)]
2355    pub fn abrt_hs_ackdet(
2356        self,
2357    ) -> crate::common::RegisterFieldBool<6, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2358        crate::common::RegisterFieldBool::<6,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2359    }
2360
2361    #[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)."]
2362    #[inline(always)]
2363    pub fn abrt_gcall_read(
2364        self,
2365    ) -> crate::common::RegisterFieldBool<5, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2366        crate::common::RegisterFieldBool::<5,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2367    }
2368
2369    #[doc = "1: the controller in master mode sent a General Call and no slave on the bus acknowledged the General Call."]
2370    #[inline(always)]
2371    pub fn abrt_gcall_noack(
2372        self,
2373    ) -> crate::common::RegisterFieldBool<4, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2374        crate::common::RegisterFieldBool::<4,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2375    }
2376
2377    #[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)."]
2378    #[inline(always)]
2379    pub fn abrt_txdata_noack(
2380        self,
2381    ) -> crate::common::RegisterFieldBool<3, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2382        crate::common::RegisterFieldBool::<3,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2383    }
2384
2385    #[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."]
2386    #[inline(always)]
2387    pub fn abrt_10addr2_noack(
2388        self,
2389    ) -> crate::common::RegisterFieldBool<2, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2390        crate::common::RegisterFieldBool::<2,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2391    }
2392
2393    #[doc = "1: Master is in 10-bit address mode and the first 10-bit address byte was not acknowledged by any slave."]
2394    #[inline(always)]
2395    pub fn abrt_10addr1_noack(
2396        self,
2397    ) -> crate::common::RegisterFieldBool<1, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2398        crate::common::RegisterFieldBool::<1,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2399    }
2400
2401    #[doc = "1: Master is in 7-bit addressing mode and the address sent was not acknowledged by any slave."]
2402    #[inline(always)]
2403    pub fn abrt_7b_addr_noack(
2404        self,
2405    ) -> crate::common::RegisterFieldBool<0, 1, 0, I2C2TxAbrtSourceReg_SPEC, crate::common::R> {
2406        crate::common::RegisterFieldBool::<0,1,0,I2C2TxAbrtSourceReg_SPEC,crate::common::R>::from_register(self,0)
2407    }
2408}
2409impl ::core::default::Default for I2C2TxAbrtSourceReg {
2410    #[inline(always)]
2411    fn default() -> I2C2TxAbrtSourceReg {
2412        <crate::RegValueT<I2C2TxAbrtSourceReg_SPEC> as RegisterValue<_>>::new(0)
2413    }
2414}
2415
2416#[doc(hidden)]
2417#[derive(Copy, Clone, Eq, PartialEq)]
2418pub struct I2C2TxTlReg_SPEC;
2419impl crate::sealed::RegSpec for I2C2TxTlReg_SPEC {
2420    type DataType = u16;
2421}
2422
2423#[doc = "I2C Transmit FIFO Threshold Register"]
2424pub type I2C2TxTlReg = crate::RegValueT<I2C2TxTlReg_SPEC>;
2425
2426impl I2C2TxTlReg {
2427    #[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.."]
2428    #[inline(always)]
2429    pub fn tx_tl(
2430        self,
2431    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, I2C2TxTlReg_SPEC, crate::common::RW>
2432    {
2433        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,I2C2TxTlReg_SPEC,crate::common::RW>::from_register(self,0)
2434    }
2435}
2436impl ::core::default::Default for I2C2TxTlReg {
2437    #[inline(always)]
2438    fn default() -> I2C2TxTlReg {
2439        <crate::RegValueT<I2C2TxTlReg_SPEC> as RegisterValue<_>>::new(0)
2440    }
2441}