Skip to main content

da14680_pac/
i2c.rs

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