xmc4300/sdmmc/
force_event_acmd_err_status.rs1#[doc = "Register `FORCE_EVENT_ACMD_ERR_STATUS` writer"]
2pub type W = crate::W<FORCE_EVENT_ACMD_ERR_STATUS_SPEC>;
3#[doc = "Force Event for Auto CMD12 NOT Executed\n\nValue on reset: 0"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum FE_ACMD_NOT_EXEC_A {
6 #[doc = "0: No interrupt"]
7 VALUE1 = 0,
8 #[doc = "1: Interrupt is generated"]
9 VALUE2 = 1,
10}
11impl From<FE_ACMD_NOT_EXEC_A> for bool {
12 #[inline(always)]
13 fn from(variant: FE_ACMD_NOT_EXEC_A) -> Self {
14 variant as u8 != 0
15 }
16}
17#[doc = "Field `FE_ACMD_NOT_EXEC` writer - Force Event for Auto CMD12 NOT Executed"]
18pub type FE_ACMD_NOT_EXEC_W<'a, REG> = crate::BitWriter<'a, REG, FE_ACMD_NOT_EXEC_A>;
19impl<'a, REG> FE_ACMD_NOT_EXEC_W<'a, REG>
20where
21 REG: crate::Writable + crate::RegisterSpec,
22{
23 #[doc = "No interrupt"]
24 #[inline(always)]
25 pub fn value1(self) -> &'a mut crate::W<REG> {
26 self.variant(FE_ACMD_NOT_EXEC_A::VALUE1)
27 }
28 #[doc = "Interrupt is generated"]
29 #[inline(always)]
30 pub fn value2(self) -> &'a mut crate::W<REG> {
31 self.variant(FE_ACMD_NOT_EXEC_A::VALUE2)
32 }
33}
34#[doc = "Force Event for Auto CMD timeout Error\n\nValue on reset: 0"]
35#[derive(Clone, Copy, Debug, PartialEq, Eq)]
36pub enum FE_ACMD_TIMEOUT_ERR_A {
37 #[doc = "0: No interrupt"]
38 VALUE1 = 0,
39 #[doc = "1: Interrupt is generated"]
40 VALUE2 = 1,
41}
42impl From<FE_ACMD_TIMEOUT_ERR_A> for bool {
43 #[inline(always)]
44 fn from(variant: FE_ACMD_TIMEOUT_ERR_A) -> Self {
45 variant as u8 != 0
46 }
47}
48#[doc = "Field `FE_ACMD_TIMEOUT_ERR` writer - Force Event for Auto CMD timeout Error"]
49pub type FE_ACMD_TIMEOUT_ERR_W<'a, REG> = crate::BitWriter<'a, REG, FE_ACMD_TIMEOUT_ERR_A>;
50impl<'a, REG> FE_ACMD_TIMEOUT_ERR_W<'a, REG>
51where
52 REG: crate::Writable + crate::RegisterSpec,
53{
54 #[doc = "No interrupt"]
55 #[inline(always)]
56 pub fn value1(self) -> &'a mut crate::W<REG> {
57 self.variant(FE_ACMD_TIMEOUT_ERR_A::VALUE1)
58 }
59 #[doc = "Interrupt is generated"]
60 #[inline(always)]
61 pub fn value2(self) -> &'a mut crate::W<REG> {
62 self.variant(FE_ACMD_TIMEOUT_ERR_A::VALUE2)
63 }
64}
65#[doc = "Force Event for Auto CMD CRC Error\n\nValue on reset: 0"]
66#[derive(Clone, Copy, Debug, PartialEq, Eq)]
67pub enum FE_ACMD_CRC_ERR_A {
68 #[doc = "0: No interrupt"]
69 VALUE1 = 0,
70 #[doc = "1: Interrupt is generated"]
71 VALUE2 = 1,
72}
73impl From<FE_ACMD_CRC_ERR_A> for bool {
74 #[inline(always)]
75 fn from(variant: FE_ACMD_CRC_ERR_A) -> Self {
76 variant as u8 != 0
77 }
78}
79#[doc = "Field `FE_ACMD_CRC_ERR` writer - Force Event for Auto CMD CRC Error"]
80pub type FE_ACMD_CRC_ERR_W<'a, REG> = crate::BitWriter<'a, REG, FE_ACMD_CRC_ERR_A>;
81impl<'a, REG> FE_ACMD_CRC_ERR_W<'a, REG>
82where
83 REG: crate::Writable + crate::RegisterSpec,
84{
85 #[doc = "No interrupt"]
86 #[inline(always)]
87 pub fn value1(self) -> &'a mut crate::W<REG> {
88 self.variant(FE_ACMD_CRC_ERR_A::VALUE1)
89 }
90 #[doc = "Interrupt is generated"]
91 #[inline(always)]
92 pub fn value2(self) -> &'a mut crate::W<REG> {
93 self.variant(FE_ACMD_CRC_ERR_A::VALUE2)
94 }
95}
96#[doc = "Force Event for Auto CMD End bit Error\n\nValue on reset: 0"]
97#[derive(Clone, Copy, Debug, PartialEq, Eq)]
98pub enum FE_ACMD_END_BIT_ERR_A {
99 #[doc = "0: No interrupt"]
100 VALUE1 = 0,
101 #[doc = "1: Interrupt is generated"]
102 VALUE2 = 1,
103}
104impl From<FE_ACMD_END_BIT_ERR_A> for bool {
105 #[inline(always)]
106 fn from(variant: FE_ACMD_END_BIT_ERR_A) -> Self {
107 variant as u8 != 0
108 }
109}
110#[doc = "Field `FE_ACMD_END_BIT_ERR` writer - Force Event for Auto CMD End bit Error"]
111pub type FE_ACMD_END_BIT_ERR_W<'a, REG> = crate::BitWriter<'a, REG, FE_ACMD_END_BIT_ERR_A>;
112impl<'a, REG> FE_ACMD_END_BIT_ERR_W<'a, REG>
113where
114 REG: crate::Writable + crate::RegisterSpec,
115{
116 #[doc = "No interrupt"]
117 #[inline(always)]
118 pub fn value1(self) -> &'a mut crate::W<REG> {
119 self.variant(FE_ACMD_END_BIT_ERR_A::VALUE1)
120 }
121 #[doc = "Interrupt is generated"]
122 #[inline(always)]
123 pub fn value2(self) -> &'a mut crate::W<REG> {
124 self.variant(FE_ACMD_END_BIT_ERR_A::VALUE2)
125 }
126}
127#[doc = "Force Event for Auto CMD Index Error\n\nValue on reset: 0"]
128#[derive(Clone, Copy, Debug, PartialEq, Eq)]
129pub enum FE_ACMD_IND_ERR_A {
130 #[doc = "0: No interrupt"]
131 VALUE1 = 0,
132 #[doc = "1: Interrupt is generated"]
133 VALUE2 = 1,
134}
135impl From<FE_ACMD_IND_ERR_A> for bool {
136 #[inline(always)]
137 fn from(variant: FE_ACMD_IND_ERR_A) -> Self {
138 variant as u8 != 0
139 }
140}
141#[doc = "Field `FE_ACMD_IND_ERR` writer - Force Event for Auto CMD Index Error"]
142pub type FE_ACMD_IND_ERR_W<'a, REG> = crate::BitWriter<'a, REG, FE_ACMD_IND_ERR_A>;
143impl<'a, REG> FE_ACMD_IND_ERR_W<'a, REG>
144where
145 REG: crate::Writable + crate::RegisterSpec,
146{
147 #[doc = "No interrupt"]
148 #[inline(always)]
149 pub fn value1(self) -> &'a mut crate::W<REG> {
150 self.variant(FE_ACMD_IND_ERR_A::VALUE1)
151 }
152 #[doc = "Interrupt is generated"]
153 #[inline(always)]
154 pub fn value2(self) -> &'a mut crate::W<REG> {
155 self.variant(FE_ACMD_IND_ERR_A::VALUE2)
156 }
157}
158#[doc = "Force Event for CMD not issued by Auto CMD12 Error\n\nValue on reset: 0"]
159#[derive(Clone, Copy, Debug, PartialEq, Eq)]
160pub enum FE_CMD_NOT_ISSUED_ACMD12_ERR_A {
161 #[doc = "0: No interrupt"]
162 VALUE1 = 0,
163 #[doc = "1: Interrupt is generated"]
164 VALUE2 = 1,
165}
166impl From<FE_CMD_NOT_ISSUED_ACMD12_ERR_A> for bool {
167 #[inline(always)]
168 fn from(variant: FE_CMD_NOT_ISSUED_ACMD12_ERR_A) -> Self {
169 variant as u8 != 0
170 }
171}
172#[doc = "Field `FE_CMD_NOT_ISSUED_ACMD12_ERR` writer - Force Event for CMD not issued by Auto CMD12 Error"]
173pub type FE_CMD_NOT_ISSUED_ACMD12_ERR_W<'a, REG> = crate::BitWriter<'a, REG, FE_CMD_NOT_ISSUED_ACMD12_ERR_A>;
174impl<'a, REG> FE_CMD_NOT_ISSUED_ACMD12_ERR_W<'a, REG>
175where
176 REG: crate::Writable + crate::RegisterSpec,
177{
178 #[doc = "No interrupt"]
179 #[inline(always)]
180 pub fn value1(self) -> &'a mut crate::W<REG> {
181 self.variant(FE_CMD_NOT_ISSUED_ACMD12_ERR_A::VALUE1)
182 }
183 #[doc = "Interrupt is generated"]
184 #[inline(always)]
185 pub fn value2(self) -> &'a mut crate::W<REG> {
186 self.variant(FE_CMD_NOT_ISSUED_ACMD12_ERR_A::VALUE2)
187 }
188}
189impl W {
190 #[doc = "Bit 0 - Force Event for Auto CMD12 NOT Executed"]
191 #[inline(always)]
192 pub fn fe_acmd_not_exec(&mut self) -> FE_ACMD_NOT_EXEC_W<FORCE_EVENT_ACMD_ERR_STATUS_SPEC> {
193 FE_ACMD_NOT_EXEC_W::new(self, 0)
194 }
195 #[doc = "Bit 1 - Force Event for Auto CMD timeout Error"]
196 #[inline(always)]
197 pub fn fe_acmd_timeout_err(&mut self) -> FE_ACMD_TIMEOUT_ERR_W<FORCE_EVENT_ACMD_ERR_STATUS_SPEC> {
198 FE_ACMD_TIMEOUT_ERR_W::new(self, 1)
199 }
200 #[doc = "Bit 2 - Force Event for Auto CMD CRC Error"]
201 #[inline(always)]
202 pub fn fe_acmd_crc_err(&mut self) -> FE_ACMD_CRC_ERR_W<FORCE_EVENT_ACMD_ERR_STATUS_SPEC> {
203 FE_ACMD_CRC_ERR_W::new(self, 2)
204 }
205 #[doc = "Bit 3 - Force Event for Auto CMD End bit Error"]
206 #[inline(always)]
207 pub fn fe_acmd_end_bit_err(&mut self) -> FE_ACMD_END_BIT_ERR_W<FORCE_EVENT_ACMD_ERR_STATUS_SPEC> {
208 FE_ACMD_END_BIT_ERR_W::new(self, 3)
209 }
210 #[doc = "Bit 4 - Force Event for Auto CMD Index Error"]
211 #[inline(always)]
212 pub fn fe_acmd_ind_err(&mut self) -> FE_ACMD_IND_ERR_W<FORCE_EVENT_ACMD_ERR_STATUS_SPEC> {
213 FE_ACMD_IND_ERR_W::new(self, 4)
214 }
215 #[doc = "Bit 7 - Force Event for CMD not issued by Auto CMD12 Error"]
216 #[inline(always)]
217 pub fn fe_cmd_not_issued_acmd12_err(&mut self) -> FE_CMD_NOT_ISSUED_ACMD12_ERR_W<FORCE_EVENT_ACMD_ERR_STATUS_SPEC> {
218 FE_CMD_NOT_ISSUED_ACMD12_ERR_W::new(self, 7)
219 }
220}
221#[doc = "Force Event Register for Auto CMD Error Status\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`force_event_acmd_err_status::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
222pub struct FORCE_EVENT_ACMD_ERR_STATUS_SPEC;
223impl crate::RegisterSpec for FORCE_EVENT_ACMD_ERR_STATUS_SPEC {
224 type Ux = u16;
225}
226#[doc = "`write(|w| ..)` method takes [`force_event_acmd_err_status::W`](W) writer structure"]
227impl crate::Writable for FORCE_EVENT_ACMD_ERR_STATUS_SPEC {
228 type Safety = crate::Unsafe;
229 const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
230 const ONE_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
231}
232#[doc = "`reset()` method sets FORCE_EVENT_ACMD_ERR_STATUS to value 0"]
233impl crate::Resettable for FORCE_EVENT_ACMD_ERR_STATUS_SPEC {
234 const RESET_VALUE: u16 = 0;
235}