1#[doc = "Register `RST_N` reader"]
2pub type R = crate::R<RST_N_SPEC>;
3#[doc = "Register `RST_N` writer"]
4pub type W = crate::W<RST_N_SPEC>;
5#[doc = "Field `CARD_RESET` reader - Hardware reset. 1: Active mode; 0: Reset. These bits cause the cards to enter pre-idle state, which requires them to be re-initialized. SDHOST_RST_CARD_RESET\\[0\\] should be set to 1'b0 to reset card0, SDHOST_RST_CARD_RESET\\[1\\] should be set to 1'b0 to reset card1."]
6pub type CARD_RESET_R = crate::FieldReader;
7#[doc = "Field `CARD_RESET` writer - Hardware reset. 1: Active mode; 0: Reset. These bits cause the cards to enter pre-idle state, which requires them to be re-initialized. SDHOST_RST_CARD_RESET\\[0\\] should be set to 1'b0 to reset card0, SDHOST_RST_CARD_RESET\\[1\\] should be set to 1'b0 to reset card1."]
8pub type CARD_RESET_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
9impl R {
10 #[doc = "Bits 0:1 - Hardware reset. 1: Active mode; 0: Reset. These bits cause the cards to enter pre-idle state, which requires them to be re-initialized. SDHOST_RST_CARD_RESET\\[0\\] should be set to 1'b0 to reset card0, SDHOST_RST_CARD_RESET\\[1\\] should be set to 1'b0 to reset card1."]
11 #[inline(always)]
12 pub fn card_reset(&self) -> CARD_RESET_R {
13 CARD_RESET_R::new((self.bits & 3) as u8)
14 }
15}
16#[cfg(feature = "impl-register-debug")]
17impl core::fmt::Debug for R {
18 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19 f.debug_struct("RST_N")
20 .field("card_reset", &self.card_reset())
21 .finish()
22 }
23}
24impl W {
25 #[doc = "Bits 0:1 - Hardware reset. 1: Active mode; 0: Reset. These bits cause the cards to enter pre-idle state, which requires them to be re-initialized. SDHOST_RST_CARD_RESET\\[0\\] should be set to 1'b0 to reset card0, SDHOST_RST_CARD_RESET\\[1\\] should be set to 1'b0 to reset card1."]
26 #[inline(always)]
27 pub fn card_reset(&mut self) -> CARD_RESET_W<RST_N_SPEC> {
28 CARD_RESET_W::new(self, 0)
29 }
30}
31#[doc = "Card reset register\n\nYou can [`read`](crate::Reg::read) this register and get [`rst_n::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rst_n::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
32pub struct RST_N_SPEC;
33impl crate::RegisterSpec for RST_N_SPEC {
34 type Ux = u32;
35}
36#[doc = "`read()` method returns [`rst_n::R`](R) reader structure"]
37impl crate::Readable for RST_N_SPEC {}
38#[doc = "`write(|w| ..)` method takes [`rst_n::W`](W) writer structure"]
39impl crate::Writable for RST_N_SPEC {
40 type Safety = crate::Unsafe;
41}
42#[doc = "`reset()` method sets RST_N to value 0x01"]
43impl crate::Resettable for RST_N_SPEC {
44 const RESET_VALUE: u32 = 0x01;
45}