nrf5340_app_pac/ficr_s/info/
ram.rs1#[doc = "Register `RAM` reader"]
2pub struct R(crate::R<RAM_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<RAM_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<RAM_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<RAM_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `RAM` reader - RAM variant"]
17pub type RAM_R = crate::FieldReader<u32, RAM_A>;
18#[doc = "RAM variant\n\nValue on reset: 4294967295"]
19#[derive(Clone, Copy, Debug, PartialEq)]
20#[repr(u32)]
21pub enum RAM_A {
22 #[doc = "16: 16 kByte RAM"]
23 K16 = 16,
24 #[doc = "32: 32 kByte RAM"]
25 K32 = 32,
26 #[doc = "64: 64 kByte RAM"]
27 K64 = 64,
28 #[doc = "128: 128 kByte RAM"]
29 K128 = 128,
30 #[doc = "256: 256 kByte RAM"]
31 K256 = 256,
32 #[doc = "512: 512 kByte RAM"]
33 K512 = 512,
34 #[doc = "4294967295: Unspecified"]
35 UNSPECIFIED = 4294967295,
36}
37impl From<RAM_A> for u32 {
38 #[inline(always)]
39 fn from(variant: RAM_A) -> Self {
40 variant as _
41 }
42}
43impl RAM_R {
44 #[doc = "Get enumerated values variant"]
45 #[inline(always)]
46 pub fn variant(&self) -> Option<RAM_A> {
47 match self.bits {
48 16 => Some(RAM_A::K16),
49 32 => Some(RAM_A::K32),
50 64 => Some(RAM_A::K64),
51 128 => Some(RAM_A::K128),
52 256 => Some(RAM_A::K256),
53 512 => Some(RAM_A::K512),
54 4294967295 => Some(RAM_A::UNSPECIFIED),
55 _ => None,
56 }
57 }
58 #[doc = "Checks if the value of the field is `K16`"]
59 #[inline(always)]
60 pub fn is_k16(&self) -> bool {
61 *self == RAM_A::K16
62 }
63 #[doc = "Checks if the value of the field is `K32`"]
64 #[inline(always)]
65 pub fn is_k32(&self) -> bool {
66 *self == RAM_A::K32
67 }
68 #[doc = "Checks if the value of the field is `K64`"]
69 #[inline(always)]
70 pub fn is_k64(&self) -> bool {
71 *self == RAM_A::K64
72 }
73 #[doc = "Checks if the value of the field is `K128`"]
74 #[inline(always)]
75 pub fn is_k128(&self) -> bool {
76 *self == RAM_A::K128
77 }
78 #[doc = "Checks if the value of the field is `K256`"]
79 #[inline(always)]
80 pub fn is_k256(&self) -> bool {
81 *self == RAM_A::K256
82 }
83 #[doc = "Checks if the value of the field is `K512`"]
84 #[inline(always)]
85 pub fn is_k512(&self) -> bool {
86 *self == RAM_A::K512
87 }
88 #[doc = "Checks if the value of the field is `UNSPECIFIED`"]
89 #[inline(always)]
90 pub fn is_unspecified(&self) -> bool {
91 *self == RAM_A::UNSPECIFIED
92 }
93}
94impl R {
95 #[doc = "Bits 0:31 - RAM variant"]
96 #[inline(always)]
97 pub fn ram(&self) -> RAM_R {
98 RAM_R::new(self.bits)
99 }
100}
101#[doc = "RAM variant\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 [ram](index.html) module"]
102pub struct RAM_SPEC;
103impl crate::RegisterSpec for RAM_SPEC {
104 type Ux = u32;
105}
106#[doc = "`read()` method returns [ram::R](R) reader structure"]
107impl crate::Readable for RAM_SPEC {
108 type Reader = R;
109}
110#[doc = "`reset()` method sets RAM to value 0xffff_ffff"]
111impl crate::Resettable for RAM_SPEC {
112 #[inline(always)]
113 fn reset_value() -> Self::Ux {
114 0xffff_ffff
115 }
116}