bl702_pac/sec_dbg/
sd_status.rs

1#[doc = "Register `sd_status` reader"]
2pub struct R(crate::R<SD_STATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SD_STATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SD_STATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SD_STATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `sd_status` writer"]
17pub struct W(crate::W<SD_STATUS_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SD_STATUS_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<SD_STATUS_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SD_STATUS_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `sd_dbg_pwd_busy` reader - "]
38pub type SD_DBG_PWD_BUSY_R = crate::BitReader<bool>;
39#[doc = "Field `sd_dbg_pwd_busy` writer - "]
40pub type SD_DBG_PWD_BUSY_W<'a, const O: u8> = crate::BitWriter<'a, u32, SD_STATUS_SPEC, bool, O>;
41#[doc = "Field `sd_dbg_pwd_trig` reader - "]
42pub type SD_DBG_PWD_TRIG_R = crate::BitReader<bool>;
43#[doc = "Field `sd_dbg_pwd_trig` writer - "]
44pub type SD_DBG_PWD_TRIG_W<'a, const O: u8> = crate::BitWriter<'a, u32, SD_STATUS_SPEC, bool, O>;
45#[doc = "Field `sd_dbg_cci_read_en` reader - "]
46pub type SD_DBG_CCI_READ_EN_R = crate::BitReader<bool>;
47#[doc = "Field `sd_dbg_cci_read_en` writer - "]
48pub type SD_DBG_CCI_READ_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SD_STATUS_SPEC, bool, O>;
49#[doc = "Field `sd_dbg_cci_clk_sel` reader - "]
50pub type SD_DBG_CCI_CLK_SEL_R = crate::BitReader<bool>;
51#[doc = "Field `sd_dbg_cci_clk_sel` writer - "]
52pub type SD_DBG_CCI_CLK_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, SD_STATUS_SPEC, bool, O>;
53#[doc = "Field `sd_dbg_pwd_cnt` reader - "]
54pub type SD_DBG_PWD_CNT_R = crate::FieldReader<u32, u32>;
55#[doc = "Field `sd_dbg_pwd_cnt` writer - "]
56pub type SD_DBG_PWD_CNT_W<'a, const O: u8> =
57    crate::FieldWriter<'a, u32, SD_STATUS_SPEC, u32, u32, 20, O>;
58#[doc = "Field `sd_dbg_mode` reader - "]
59pub type SD_DBG_MODE_R = crate::FieldReader<u8, u8>;
60#[doc = "Field `sd_dbg_mode` writer - "]
61pub type SD_DBG_MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SD_STATUS_SPEC, u8, u8, 4, O>;
62#[doc = "Field `sd_dbg_ena` reader - "]
63pub type SD_DBG_ENA_R = crate::FieldReader<u8, u8>;
64#[doc = "Field `sd_dbg_ena` writer - "]
65pub type SD_DBG_ENA_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SD_STATUS_SPEC, u8, u8, 4, O>;
66impl R {
67    #[doc = "Bit 0"]
68    #[inline(always)]
69    pub fn sd_dbg_pwd_busy(&self) -> SD_DBG_PWD_BUSY_R {
70        SD_DBG_PWD_BUSY_R::new((self.bits & 1) != 0)
71    }
72    #[doc = "Bit 1"]
73    #[inline(always)]
74    pub fn sd_dbg_pwd_trig(&self) -> SD_DBG_PWD_TRIG_R {
75        SD_DBG_PWD_TRIG_R::new(((self.bits >> 1) & 1) != 0)
76    }
77    #[doc = "Bit 2"]
78    #[inline(always)]
79    pub fn sd_dbg_cci_read_en(&self) -> SD_DBG_CCI_READ_EN_R {
80        SD_DBG_CCI_READ_EN_R::new(((self.bits >> 2) & 1) != 0)
81    }
82    #[doc = "Bit 3"]
83    #[inline(always)]
84    pub fn sd_dbg_cci_clk_sel(&self) -> SD_DBG_CCI_CLK_SEL_R {
85        SD_DBG_CCI_CLK_SEL_R::new(((self.bits >> 3) & 1) != 0)
86    }
87    #[doc = "Bits 4:23"]
88    #[inline(always)]
89    pub fn sd_dbg_pwd_cnt(&self) -> SD_DBG_PWD_CNT_R {
90        SD_DBG_PWD_CNT_R::new((self.bits >> 4) & 0x000f_ffff)
91    }
92    #[doc = "Bits 24:27"]
93    #[inline(always)]
94    pub fn sd_dbg_mode(&self) -> SD_DBG_MODE_R {
95        SD_DBG_MODE_R::new(((self.bits >> 24) & 0x0f) as u8)
96    }
97    #[doc = "Bits 28:31"]
98    #[inline(always)]
99    pub fn sd_dbg_ena(&self) -> SD_DBG_ENA_R {
100        SD_DBG_ENA_R::new(((self.bits >> 28) & 0x0f) as u8)
101    }
102}
103impl W {
104    #[doc = "Bit 0"]
105    #[inline(always)]
106    #[must_use]
107    pub fn sd_dbg_pwd_busy(&mut self) -> SD_DBG_PWD_BUSY_W<0> {
108        SD_DBG_PWD_BUSY_W::new(self)
109    }
110    #[doc = "Bit 1"]
111    #[inline(always)]
112    #[must_use]
113    pub fn sd_dbg_pwd_trig(&mut self) -> SD_DBG_PWD_TRIG_W<1> {
114        SD_DBG_PWD_TRIG_W::new(self)
115    }
116    #[doc = "Bit 2"]
117    #[inline(always)]
118    #[must_use]
119    pub fn sd_dbg_cci_read_en(&mut self) -> SD_DBG_CCI_READ_EN_W<2> {
120        SD_DBG_CCI_READ_EN_W::new(self)
121    }
122    #[doc = "Bit 3"]
123    #[inline(always)]
124    #[must_use]
125    pub fn sd_dbg_cci_clk_sel(&mut self) -> SD_DBG_CCI_CLK_SEL_W<3> {
126        SD_DBG_CCI_CLK_SEL_W::new(self)
127    }
128    #[doc = "Bits 4:23"]
129    #[inline(always)]
130    #[must_use]
131    pub fn sd_dbg_pwd_cnt(&mut self) -> SD_DBG_PWD_CNT_W<4> {
132        SD_DBG_PWD_CNT_W::new(self)
133    }
134    #[doc = "Bits 24:27"]
135    #[inline(always)]
136    #[must_use]
137    pub fn sd_dbg_mode(&mut self) -> SD_DBG_MODE_W<24> {
138        SD_DBG_MODE_W::new(self)
139    }
140    #[doc = "Bits 28:31"]
141    #[inline(always)]
142    #[must_use]
143    pub fn sd_dbg_ena(&mut self) -> SD_DBG_ENA_W<28> {
144        SD_DBG_ENA_W::new(self)
145    }
146    #[doc = "Writes raw bits to the register."]
147    #[inline(always)]
148    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
149        self.0.bits(bits);
150        self
151    }
152}
153#[doc = "sd_status.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [sd_status](index.html) module"]
154pub struct SD_STATUS_SPEC;
155impl crate::RegisterSpec for SD_STATUS_SPEC {
156    type Ux = u32;
157}
158#[doc = "`read()` method returns [sd_status::R](R) reader structure"]
159impl crate::Readable for SD_STATUS_SPEC {
160    type Reader = R;
161}
162#[doc = "`write(|w| ..)` method takes [sd_status::W](W) writer structure"]
163impl crate::Writable for SD_STATUS_SPEC {
164    type Writer = W;
165    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
166    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
167}
168#[doc = "`reset()` method sets sd_status to value 0"]
169impl crate::Resettable for SD_STATUS_SPEC {
170    const RESET_VALUE: Self::Ux = 0;
171}