1#[doc = "Register `SDSR` reader"]
2pub struct R(crate::R<SDSR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SDSR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SDSR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SDSR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `MRSST` reader - Mode Register Setting Status"]
17pub type MRSST_R = crate::BitReader<MRSST_A>;
18#[doc = "Mode Register Setting Status\n\nValue on reset: 0"]
19#[derive(Clone, Copy, Debug, PartialEq, Eq)]
20pub enum MRSST_A {
21 #[doc = "0: Mode register setting not in progress"]
22 _0 = 0,
23 #[doc = "1: Mode register setting in progress"]
24 _1 = 1,
25}
26impl From<MRSST_A> for bool {
27 #[inline(always)]
28 fn from(variant: MRSST_A) -> Self {
29 variant as u8 != 0
30 }
31}
32impl MRSST_R {
33 #[doc = "Get enumerated values variant"]
34 #[inline(always)]
35 pub fn variant(&self) -> MRSST_A {
36 match self.bits {
37 false => MRSST_A::_0,
38 true => MRSST_A::_1,
39 }
40 }
41 #[doc = "Checks if the value of the field is `_0`"]
42 #[inline(always)]
43 pub fn is_0(&self) -> bool {
44 *self == MRSST_A::_0
45 }
46 #[doc = "Checks if the value of the field is `_1`"]
47 #[inline(always)]
48 pub fn is_1(&self) -> bool {
49 *self == MRSST_A::_1
50 }
51}
52#[doc = "Field `INIST` reader - Initialization Status"]
53pub type INIST_R = crate::BitReader<INIST_A>;
54#[doc = "Initialization Status\n\nValue on reset: 0"]
55#[derive(Clone, Copy, Debug, PartialEq, Eq)]
56pub enum INIST_A {
57 #[doc = "0: Initialization sequence not in progress"]
58 _0 = 0,
59 #[doc = "1: Initialization sequence in progress"]
60 _1 = 1,
61}
62impl From<INIST_A> for bool {
63 #[inline(always)]
64 fn from(variant: INIST_A) -> Self {
65 variant as u8 != 0
66 }
67}
68impl INIST_R {
69 #[doc = "Get enumerated values variant"]
70 #[inline(always)]
71 pub fn variant(&self) -> INIST_A {
72 match self.bits {
73 false => INIST_A::_0,
74 true => INIST_A::_1,
75 }
76 }
77 #[doc = "Checks if the value of the field is `_0`"]
78 #[inline(always)]
79 pub fn is_0(&self) -> bool {
80 *self == INIST_A::_0
81 }
82 #[doc = "Checks if the value of the field is `_1`"]
83 #[inline(always)]
84 pub fn is_1(&self) -> bool {
85 *self == INIST_A::_1
86 }
87}
88#[doc = "Field `SRFST` reader - Self-Refresh Transition/Recovery Status"]
89pub type SRFST_R = crate::BitReader<SRFST_A>;
90#[doc = "Self-Refresh Transition/Recovery Status\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum SRFST_A {
93 #[doc = "0: Transition/recovery not in progress"]
94 _0 = 0,
95 #[doc = "1: Transition/recovery in progress"]
96 _1 = 1,
97}
98impl From<SRFST_A> for bool {
99 #[inline(always)]
100 fn from(variant: SRFST_A) -> Self {
101 variant as u8 != 0
102 }
103}
104impl SRFST_R {
105 #[doc = "Get enumerated values variant"]
106 #[inline(always)]
107 pub fn variant(&self) -> SRFST_A {
108 match self.bits {
109 false => SRFST_A::_0,
110 true => SRFST_A::_1,
111 }
112 }
113 #[doc = "Checks if the value of the field is `_0`"]
114 #[inline(always)]
115 pub fn is_0(&self) -> bool {
116 *self == SRFST_A::_0
117 }
118 #[doc = "Checks if the value of the field is `_1`"]
119 #[inline(always)]
120 pub fn is_1(&self) -> bool {
121 *self == SRFST_A::_1
122 }
123}
124impl R {
125 #[doc = "Bit 0 - Mode Register Setting Status"]
126 #[inline(always)]
127 pub fn mrsst(&self) -> MRSST_R {
128 MRSST_R::new((self.bits & 1) != 0)
129 }
130 #[doc = "Bit 3 - Initialization Status"]
131 #[inline(always)]
132 pub fn inist(&self) -> INIST_R {
133 INIST_R::new(((self.bits >> 3) & 1) != 0)
134 }
135 #[doc = "Bit 4 - Self-Refresh Transition/Recovery Status"]
136 #[inline(always)]
137 pub fn srfst(&self) -> SRFST_R {
138 SRFST_R::new(((self.bits >> 4) & 1) != 0)
139 }
140}
141#[doc = "SDRAM Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [sdsr](index.html) module"]
142pub struct SDSR_SPEC;
143impl crate::RegisterSpec for SDSR_SPEC {
144 type Ux = u8;
145}
146#[doc = "`read()` method returns [sdsr::R](R) reader structure"]
147impl crate::Readable for SDSR_SPEC {
148 type Reader = R;
149}
150#[doc = "`reset()` method sets SDSR to value 0"]
151impl crate::Resettable for SDSR_SPEC {
152 const RESET_VALUE: Self::Ux = 0;
153}