esp32c6_lp/lp_i2c0/
int_clr.rs1#[doc = "Register `INT_CLR` writer"]
2pub type W = crate::W<INT_CLR_SPEC>;
3#[doc = "Field `RXFIFO_WM` writer - Set this bit to clear I2C_RXFIFO_WM_INT interrupt."]
4pub type RXFIFO_WM_W<'a, REG> = crate::BitWriter1C<'a, REG>;
5#[doc = "Field `TXFIFO_WM` writer - Set this bit to clear I2C_TXFIFO_WM_INT interrupt."]
6pub type TXFIFO_WM_W<'a, REG> = crate::BitWriter1C<'a, REG>;
7#[doc = "Field `RXFIFO_OVF` writer - Set this bit to clear I2C_RXFIFO_OVF_INT interrupt."]
8pub type RXFIFO_OVF_W<'a, REG> = crate::BitWriter1C<'a, REG>;
9#[doc = "Field `END_DETECT` writer - Set this bit to clear the I2C_END_DETECT_INT interrupt."]
10pub type END_DETECT_W<'a, REG> = crate::BitWriter1C<'a, REG>;
11#[doc = "Field `BYTE_TRANS_DONE` writer - Set this bit to clear the I2C_END_DETECT_INT interrupt."]
12pub type BYTE_TRANS_DONE_W<'a, REG> = crate::BitWriter1C<'a, REG>;
13#[doc = "Field `ARBITRATION_LOST` writer - Set this bit to clear the I2C_ARBITRATION_LOST_INT interrupt."]
14pub type ARBITRATION_LOST_W<'a, REG> = crate::BitWriter1C<'a, REG>;
15#[doc = "Field `MST_TXFIFO_UDF` writer - Set this bit to clear I2C_TRANS_COMPLETE_INT interrupt."]
16pub type MST_TXFIFO_UDF_W<'a, REG> = crate::BitWriter1C<'a, REG>;
17#[doc = "Field `TRANS_COMPLETE` writer - Set this bit to clear the I2C_TRANS_COMPLETE_INT interrupt."]
18pub type TRANS_COMPLETE_W<'a, REG> = crate::BitWriter1C<'a, REG>;
19#[doc = "Field `TIME_OUT` writer - Set this bit to clear the I2C_TIME_OUT_INT interrupt."]
20pub type TIME_OUT_W<'a, REG> = crate::BitWriter1C<'a, REG>;
21#[doc = "Field `TRANS_START` writer - Set this bit to clear the I2C_TRANS_START_INT interrupt."]
22pub type TRANS_START_W<'a, REG> = crate::BitWriter1C<'a, REG>;
23#[doc = "Field `NACK` writer - Set this bit to clear I2C_SLAVE_STRETCH_INT interrupt."]
24pub type NACK_W<'a, REG> = crate::BitWriter1C<'a, REG>;
25#[doc = "Field `TXFIFO_OVF` writer - Set this bit to clear I2C_TXFIFO_OVF_INT interrupt."]
26pub type TXFIFO_OVF_W<'a, REG> = crate::BitWriter1C<'a, REG>;
27#[doc = "Field `RXFIFO_UDF` writer - Set this bit to clear I2C_RXFIFO_UDF_INT interrupt."]
28pub type RXFIFO_UDF_W<'a, REG> = crate::BitWriter1C<'a, REG>;
29#[doc = "Field `SCL_ST_TO` writer - Set this bit to clear I2C_SCL_ST_TO_INT interrupt."]
30pub type SCL_ST_TO_W<'a, REG> = crate::BitWriter1C<'a, REG>;
31#[doc = "Field `SCL_MAIN_ST_TO` writer - Set this bit to clear I2C_SCL_MAIN_ST_TO_INT interrupt."]
32pub type SCL_MAIN_ST_TO_W<'a, REG> = crate::BitWriter1C<'a, REG>;
33#[doc = "Field `DET_START` writer - Set this bit to clear I2C_DET_START_INT interrupt."]
34pub type DET_START_W<'a, REG> = crate::BitWriter1C<'a, REG>;
35#[cfg(feature = "impl-register-debug")]
36impl core::fmt::Debug for crate::generic::Reg<INT_CLR_SPEC> {
37 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
38 write!(f, "(not readable)")
39 }
40}
41impl W {
42 #[doc = "Bit 0 - Set this bit to clear I2C_RXFIFO_WM_INT interrupt."]
43 #[inline(always)]
44 #[must_use]
45 pub fn rxfifo_wm(&mut self) -> RXFIFO_WM_W<INT_CLR_SPEC> {
46 RXFIFO_WM_W::new(self, 0)
47 }
48 #[doc = "Bit 1 - Set this bit to clear I2C_TXFIFO_WM_INT interrupt."]
49 #[inline(always)]
50 #[must_use]
51 pub fn txfifo_wm(&mut self) -> TXFIFO_WM_W<INT_CLR_SPEC> {
52 TXFIFO_WM_W::new(self, 1)
53 }
54 #[doc = "Bit 2 - Set this bit to clear I2C_RXFIFO_OVF_INT interrupt."]
55 #[inline(always)]
56 #[must_use]
57 pub fn rxfifo_ovf(&mut self) -> RXFIFO_OVF_W<INT_CLR_SPEC> {
58 RXFIFO_OVF_W::new(self, 2)
59 }
60 #[doc = "Bit 3 - Set this bit to clear the I2C_END_DETECT_INT interrupt."]
61 #[inline(always)]
62 #[must_use]
63 pub fn end_detect(&mut self) -> END_DETECT_W<INT_CLR_SPEC> {
64 END_DETECT_W::new(self, 3)
65 }
66 #[doc = "Bit 4 - Set this bit to clear the I2C_END_DETECT_INT interrupt."]
67 #[inline(always)]
68 #[must_use]
69 pub fn byte_trans_done(&mut self) -> BYTE_TRANS_DONE_W<INT_CLR_SPEC> {
70 BYTE_TRANS_DONE_W::new(self, 4)
71 }
72 #[doc = "Bit 5 - Set this bit to clear the I2C_ARBITRATION_LOST_INT interrupt."]
73 #[inline(always)]
74 #[must_use]
75 pub fn arbitration_lost(&mut self) -> ARBITRATION_LOST_W<INT_CLR_SPEC> {
76 ARBITRATION_LOST_W::new(self, 5)
77 }
78 #[doc = "Bit 6 - Set this bit to clear I2C_TRANS_COMPLETE_INT interrupt."]
79 #[inline(always)]
80 #[must_use]
81 pub fn mst_txfifo_udf(&mut self) -> MST_TXFIFO_UDF_W<INT_CLR_SPEC> {
82 MST_TXFIFO_UDF_W::new(self, 6)
83 }
84 #[doc = "Bit 7 - Set this bit to clear the I2C_TRANS_COMPLETE_INT interrupt."]
85 #[inline(always)]
86 #[must_use]
87 pub fn trans_complete(&mut self) -> TRANS_COMPLETE_W<INT_CLR_SPEC> {
88 TRANS_COMPLETE_W::new(self, 7)
89 }
90 #[doc = "Bit 8 - Set this bit to clear the I2C_TIME_OUT_INT interrupt."]
91 #[inline(always)]
92 #[must_use]
93 pub fn time_out(&mut self) -> TIME_OUT_W<INT_CLR_SPEC> {
94 TIME_OUT_W::new(self, 8)
95 }
96 #[doc = "Bit 9 - Set this bit to clear the I2C_TRANS_START_INT interrupt."]
97 #[inline(always)]
98 #[must_use]
99 pub fn trans_start(&mut self) -> TRANS_START_W<INT_CLR_SPEC> {
100 TRANS_START_W::new(self, 9)
101 }
102 #[doc = "Bit 10 - Set this bit to clear I2C_SLAVE_STRETCH_INT interrupt."]
103 #[inline(always)]
104 #[must_use]
105 pub fn nack(&mut self) -> NACK_W<INT_CLR_SPEC> {
106 NACK_W::new(self, 10)
107 }
108 #[doc = "Bit 11 - Set this bit to clear I2C_TXFIFO_OVF_INT interrupt."]
109 #[inline(always)]
110 #[must_use]
111 pub fn txfifo_ovf(&mut self) -> TXFIFO_OVF_W<INT_CLR_SPEC> {
112 TXFIFO_OVF_W::new(self, 11)
113 }
114 #[doc = "Bit 12 - Set this bit to clear I2C_RXFIFO_UDF_INT interrupt."]
115 #[inline(always)]
116 #[must_use]
117 pub fn rxfifo_udf(&mut self) -> RXFIFO_UDF_W<INT_CLR_SPEC> {
118 RXFIFO_UDF_W::new(self, 12)
119 }
120 #[doc = "Bit 13 - Set this bit to clear I2C_SCL_ST_TO_INT interrupt."]
121 #[inline(always)]
122 #[must_use]
123 pub fn scl_st_to(&mut self) -> SCL_ST_TO_W<INT_CLR_SPEC> {
124 SCL_ST_TO_W::new(self, 13)
125 }
126 #[doc = "Bit 14 - Set this bit to clear I2C_SCL_MAIN_ST_TO_INT interrupt."]
127 #[inline(always)]
128 #[must_use]
129 pub fn scl_main_st_to(&mut self) -> SCL_MAIN_ST_TO_W<INT_CLR_SPEC> {
130 SCL_MAIN_ST_TO_W::new(self, 14)
131 }
132 #[doc = "Bit 15 - Set this bit to clear I2C_DET_START_INT interrupt."]
133 #[inline(always)]
134 #[must_use]
135 pub fn det_start(&mut self) -> DET_START_W<INT_CLR_SPEC> {
136 DET_START_W::new(self, 15)
137 }
138}
139#[doc = "Interrupt clear bits\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_clr::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
140pub struct INT_CLR_SPEC;
141impl crate::RegisterSpec for INT_CLR_SPEC {
142 type Ux = u32;
143}
144#[doc = "`write(|w| ..)` method takes [`int_clr::W`](W) writer structure"]
145impl crate::Writable for INT_CLR_SPEC {
146 type Safety = crate::Unsafe;
147 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
148 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0xffff;
149}
150#[doc = "`reset()` method sets INT_CLR to value 0"]
151impl crate::Resettable for INT_CLR_SPEC {
152 const RESET_VALUE: u32 = 0;
153}