efm32gg_pac/efm32gg230/i2c1/
ifs.rs1#[doc = "Register `IFS` writer"]
2pub struct W(crate::W<IFS_SPEC>);
3impl core::ops::Deref for W {
4 type Target = crate::W<IFS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl core::ops::DerefMut for W {
11 #[inline(always)]
12 fn deref_mut(&mut self) -> &mut Self::Target {
13 &mut self.0
14 }
15}
16impl From<crate::W<IFS_SPEC>> for W {
17 #[inline(always)]
18 fn from(writer: crate::W<IFS_SPEC>) -> Self {
19 W(writer)
20 }
21}
22#[doc = "Field `START` writer - Set START Interrupt Flag"]
23pub type START_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
24#[doc = "Field `RSTART` writer - Set Repeated START Interrupt Flag"]
25pub type RSTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
26#[doc = "Field `ADDR` writer - Set Address Interrupt Flag"]
27pub type ADDR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
28#[doc = "Field `TXC` writer - Set Transfer Completed Interrupt Flag"]
29pub type TXC_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
30#[doc = "Field `ACK` writer - Set Acknowledge Received Interrupt Flag"]
31pub type ACK_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
32#[doc = "Field `NACK` writer - Set Not Acknowledge Received Interrupt Flag"]
33pub type NACK_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
34#[doc = "Field `MSTOP` writer - Set MSTOP Interrupt Flag"]
35pub type MSTOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
36#[doc = "Field `ARBLOST` writer - Set Arbitration Lost Interrupt Flag"]
37pub type ARBLOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
38#[doc = "Field `BUSERR` writer - Set Bus Error Interrupt Flag"]
39pub type BUSERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
40#[doc = "Field `BUSHOLD` writer - Set Bus Held Interrupt Flag"]
41pub type BUSHOLD_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
42#[doc = "Field `TXOF` writer - Set Transmit Buffer Overflow Interrupt Flag"]
43pub type TXOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
44#[doc = "Field `RXUF` writer - Set Receive Buffer Underflow Interrupt Flag"]
45pub type RXUF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
46#[doc = "Field `BITO` writer - Set Bus Idle Timeout Interrupt Flag"]
47pub type BITO_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
48#[doc = "Field `CLTO` writer - Set Clock Low Interrupt Flag"]
49pub type CLTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
50#[doc = "Field `SSTOP` writer - Set SSTOP Interrupt Flag"]
51pub type SSTOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFS_SPEC, bool, O>;
52impl W {
53 #[doc = "Bit 0 - Set START Interrupt Flag"]
54 #[inline(always)]
55 #[must_use]
56 pub fn start(&mut self) -> START_W<0> {
57 START_W::new(self)
58 }
59 #[doc = "Bit 1 - Set Repeated START Interrupt Flag"]
60 #[inline(always)]
61 #[must_use]
62 pub fn rstart(&mut self) -> RSTART_W<1> {
63 RSTART_W::new(self)
64 }
65 #[doc = "Bit 2 - Set Address Interrupt Flag"]
66 #[inline(always)]
67 #[must_use]
68 pub fn addr(&mut self) -> ADDR_W<2> {
69 ADDR_W::new(self)
70 }
71 #[doc = "Bit 3 - Set Transfer Completed Interrupt Flag"]
72 #[inline(always)]
73 #[must_use]
74 pub fn txc(&mut self) -> TXC_W<3> {
75 TXC_W::new(self)
76 }
77 #[doc = "Bit 6 - Set Acknowledge Received Interrupt Flag"]
78 #[inline(always)]
79 #[must_use]
80 pub fn ack(&mut self) -> ACK_W<6> {
81 ACK_W::new(self)
82 }
83 #[doc = "Bit 7 - Set Not Acknowledge Received Interrupt Flag"]
84 #[inline(always)]
85 #[must_use]
86 pub fn nack(&mut self) -> NACK_W<7> {
87 NACK_W::new(self)
88 }
89 #[doc = "Bit 8 - Set MSTOP Interrupt Flag"]
90 #[inline(always)]
91 #[must_use]
92 pub fn mstop(&mut self) -> MSTOP_W<8> {
93 MSTOP_W::new(self)
94 }
95 #[doc = "Bit 9 - Set Arbitration Lost Interrupt Flag"]
96 #[inline(always)]
97 #[must_use]
98 pub fn arblost(&mut self) -> ARBLOST_W<9> {
99 ARBLOST_W::new(self)
100 }
101 #[doc = "Bit 10 - Set Bus Error Interrupt Flag"]
102 #[inline(always)]
103 #[must_use]
104 pub fn buserr(&mut self) -> BUSERR_W<10> {
105 BUSERR_W::new(self)
106 }
107 #[doc = "Bit 11 - Set Bus Held Interrupt Flag"]
108 #[inline(always)]
109 #[must_use]
110 pub fn bushold(&mut self) -> BUSHOLD_W<11> {
111 BUSHOLD_W::new(self)
112 }
113 #[doc = "Bit 12 - Set Transmit Buffer Overflow Interrupt Flag"]
114 #[inline(always)]
115 #[must_use]
116 pub fn txof(&mut self) -> TXOF_W<12> {
117 TXOF_W::new(self)
118 }
119 #[doc = "Bit 13 - Set Receive Buffer Underflow Interrupt Flag"]
120 #[inline(always)]
121 #[must_use]
122 pub fn rxuf(&mut self) -> RXUF_W<13> {
123 RXUF_W::new(self)
124 }
125 #[doc = "Bit 14 - Set Bus Idle Timeout Interrupt Flag"]
126 #[inline(always)]
127 #[must_use]
128 pub fn bito(&mut self) -> BITO_W<14> {
129 BITO_W::new(self)
130 }
131 #[doc = "Bit 15 - Set Clock Low Interrupt Flag"]
132 #[inline(always)]
133 #[must_use]
134 pub fn clto(&mut self) -> CLTO_W<15> {
135 CLTO_W::new(self)
136 }
137 #[doc = "Bit 16 - Set SSTOP Interrupt Flag"]
138 #[inline(always)]
139 #[must_use]
140 pub fn sstop(&mut self) -> SSTOP_W<16> {
141 SSTOP_W::new(self)
142 }
143 #[doc = "Writes raw bits to the register."]
144 #[inline(always)]
145 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
146 self.0.bits(bits);
147 self
148 }
149}
150#[doc = "Interrupt Flag Set Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ifs](index.html) module"]
151pub struct IFS_SPEC;
152impl crate::RegisterSpec for IFS_SPEC {
153 type Ux = u32;
154}
155#[doc = "`write(|w| ..)` method takes [ifs::W](W) writer structure"]
156impl crate::Writable for IFS_SPEC {
157 type Writer = W;
158 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
159 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
160}
161#[doc = "`reset()` method sets IFS to value 0"]
162impl crate::Resettable for IFS_SPEC {
163 const RESET_VALUE: Self::Ux = 0;
164}