nrf52810_pac/ficr/info/
variant.rs1#[doc = "Register `VARIANT` reader"]
2pub struct R(crate::R<VARIANT_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<VARIANT_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<VARIANT_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<VARIANT_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `VARIANT` reader - Part variant, hardware version and production configuration, encoded as ASCII"]
17pub type VARIANT_R = crate::FieldReader<u32, VARIANT_A>;
18#[doc = "Part variant, hardware version and production configuration, encoded as ASCII\n\nValue on reset: 4294967295"]
19#[derive(Clone, Copy, Debug, PartialEq)]
20#[repr(u32)]
21pub enum VARIANT_A {
22 #[doc = "1094795585: AAAA"]
23 AAAA = 1094795585,
24 #[doc = "1094795568: AAA0"]
25 AAA0 = 1094795568,
26 #[doc = "1094795841: AABA"]
27 AABA = 1094795841,
28 #[doc = "1094795842: AABB"]
29 AABB = 1094795842,
30 #[doc = "1094795824: AAB0"]
31 AAB0 = 1094795824,
32 #[doc = "1094796097: AACA"]
33 AACA = 1094796097,
34 #[doc = "1094796098: AACB"]
35 AACB = 1094796098,
36 #[doc = "1094796080: AAC0"]
37 AAC0 = 1094796080,
38 #[doc = "4294967295: Unspecified"]
39 UNSPECIFIED = 4294967295,
40}
41impl From<VARIANT_A> for u32 {
42 #[inline(always)]
43 fn from(variant: VARIANT_A) -> Self {
44 variant as _
45 }
46}
47impl VARIANT_R {
48 #[doc = "Get enumerated values variant"]
49 #[inline(always)]
50 pub fn variant(&self) -> Option<VARIANT_A> {
51 match self.bits {
52 1094795585 => Some(VARIANT_A::AAAA),
53 1094795568 => Some(VARIANT_A::AAA0),
54 1094795841 => Some(VARIANT_A::AABA),
55 1094795842 => Some(VARIANT_A::AABB),
56 1094795824 => Some(VARIANT_A::AAB0),
57 1094796097 => Some(VARIANT_A::AACA),
58 1094796098 => Some(VARIANT_A::AACB),
59 1094796080 => Some(VARIANT_A::AAC0),
60 4294967295 => Some(VARIANT_A::UNSPECIFIED),
61 _ => None,
62 }
63 }
64 #[doc = "Checks if the value of the field is `AAAA`"]
65 #[inline(always)]
66 pub fn is_aaaa(&self) -> bool {
67 *self == VARIANT_A::AAAA
68 }
69 #[doc = "Checks if the value of the field is `AAA0`"]
70 #[inline(always)]
71 pub fn is_aaa0(&self) -> bool {
72 *self == VARIANT_A::AAA0
73 }
74 #[doc = "Checks if the value of the field is `AABA`"]
75 #[inline(always)]
76 pub fn is_aaba(&self) -> bool {
77 *self == VARIANT_A::AABA
78 }
79 #[doc = "Checks if the value of the field is `AABB`"]
80 #[inline(always)]
81 pub fn is_aabb(&self) -> bool {
82 *self == VARIANT_A::AABB
83 }
84 #[doc = "Checks if the value of the field is `AAB0`"]
85 #[inline(always)]
86 pub fn is_aab0(&self) -> bool {
87 *self == VARIANT_A::AAB0
88 }
89 #[doc = "Checks if the value of the field is `AACA`"]
90 #[inline(always)]
91 pub fn is_aaca(&self) -> bool {
92 *self == VARIANT_A::AACA
93 }
94 #[doc = "Checks if the value of the field is `AACB`"]
95 #[inline(always)]
96 pub fn is_aacb(&self) -> bool {
97 *self == VARIANT_A::AACB
98 }
99 #[doc = "Checks if the value of the field is `AAC0`"]
100 #[inline(always)]
101 pub fn is_aac0(&self) -> bool {
102 *self == VARIANT_A::AAC0
103 }
104 #[doc = "Checks if the value of the field is `UNSPECIFIED`"]
105 #[inline(always)]
106 pub fn is_unspecified(&self) -> bool {
107 *self == VARIANT_A::UNSPECIFIED
108 }
109}
110impl R {
111 #[doc = "Bits 0:31 - Part variant, hardware version and production configuration, encoded as ASCII"]
112 #[inline(always)]
113 pub fn variant(&self) -> VARIANT_R {
114 VARIANT_R::new(self.bits)
115 }
116}
117#[doc = "Part variant, hardware version and production configuration\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 [variant](index.html) module"]
118pub struct VARIANT_SPEC;
119impl crate::RegisterSpec for VARIANT_SPEC {
120 type Ux = u32;
121}
122#[doc = "`read()` method returns [variant::R](R) reader structure"]
123impl crate::Readable for VARIANT_SPEC {
124 type Reader = R;
125}
126#[doc = "`reset()` method sets VARIANT to value 0xffff_ffff"]
127impl crate::Resettable for VARIANT_SPEC {
128 #[inline(always)]
129 fn reset_value() -> Self::Ux {
130 0xffff_ffff
131 }
132}