1#[doc = "Register `DLMMON` reader"]
2pub struct R(crate::R<DLMMON_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<DLMMON_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<DLMMON_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<DLMMON_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `DLMMON` reader - Device Lifecycle Management State Monitor"]
17pub type DLMMON_R = crate::FieldReader<u8, DLMMON_A>;
18#[doc = "Device Lifecycle Management State Monitor\n\nValue on reset: 0"]
19#[derive(Clone, Copy, Debug, PartialEq, Eq)]
20#[repr(u8)]
21pub enum DLMMON_A {
22 #[doc = "1: CM"]
23 _0X1 = 1,
24 #[doc = "2: SSD"]
25 _0X2 = 2,
26 #[doc = "3: NSECSD"]
27 _0X3 = 3,
28 #[doc = "4: DPL"]
29 _0X4 = 4,
30 #[doc = "5: LCK_DBG"]
31 _0X5 = 5,
32 #[doc = "6: LCK_BOOT"]
33 _0X6 = 6,
34 #[doc = "7: RMA_REQ"]
35 _0X7 = 7,
36 #[doc = "8: RMA_ACK"]
37 _0X8 = 8,
38}
39impl From<DLMMON_A> for u8 {
40 #[inline(always)]
41 fn from(variant: DLMMON_A) -> Self {
42 variant as _
43 }
44}
45impl DLMMON_R {
46 #[doc = "Get enumerated values variant"]
47 #[inline(always)]
48 pub fn variant(&self) -> Option<DLMMON_A> {
49 match self.bits {
50 1 => Some(DLMMON_A::_0X1),
51 2 => Some(DLMMON_A::_0X2),
52 3 => Some(DLMMON_A::_0X3),
53 4 => Some(DLMMON_A::_0X4),
54 5 => Some(DLMMON_A::_0X5),
55 6 => Some(DLMMON_A::_0X6),
56 7 => Some(DLMMON_A::_0X7),
57 8 => Some(DLMMON_A::_0X8),
58 _ => None,
59 }
60 }
61 #[doc = "Checks if the value of the field is `_0X1`"]
62 #[inline(always)]
63 pub fn is_0x1(&self) -> bool {
64 *self == DLMMON_A::_0X1
65 }
66 #[doc = "Checks if the value of the field is `_0X2`"]
67 #[inline(always)]
68 pub fn is_0x2(&self) -> bool {
69 *self == DLMMON_A::_0X2
70 }
71 #[doc = "Checks if the value of the field is `_0X3`"]
72 #[inline(always)]
73 pub fn is_0x3(&self) -> bool {
74 *self == DLMMON_A::_0X3
75 }
76 #[doc = "Checks if the value of the field is `_0X4`"]
77 #[inline(always)]
78 pub fn is_0x4(&self) -> bool {
79 *self == DLMMON_A::_0X4
80 }
81 #[doc = "Checks if the value of the field is `_0X5`"]
82 #[inline(always)]
83 pub fn is_0x5(&self) -> bool {
84 *self == DLMMON_A::_0X5
85 }
86 #[doc = "Checks if the value of the field is `_0X6`"]
87 #[inline(always)]
88 pub fn is_0x6(&self) -> bool {
89 *self == DLMMON_A::_0X6
90 }
91 #[doc = "Checks if the value of the field is `_0X7`"]
92 #[inline(always)]
93 pub fn is_0x7(&self) -> bool {
94 *self == DLMMON_A::_0X7
95 }
96 #[doc = "Checks if the value of the field is `_0X8`"]
97 #[inline(always)]
98 pub fn is_0x8(&self) -> bool {
99 *self == DLMMON_A::_0X8
100 }
101}
102impl R {
103 #[doc = "Bits 0:3 - Device Lifecycle Management State Monitor"]
104 #[inline(always)]
105 pub fn dlmmon(&self) -> DLMMON_R {
106 DLMMON_R::new((self.bits & 0x0f) as u8)
107 }
108}
109#[doc = "Device Lifecycle Management State Monitor 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 [dlmmon](index.html) module"]
110pub struct DLMMON_SPEC;
111impl crate::RegisterSpec for DLMMON_SPEC {
112 type Ux = u32;
113}
114#[doc = "`read()` method returns [dlmmon::R](R) reader structure"]
115impl crate::Readable for DLMMON_SPEC {
116 type Reader = R;
117}
118#[doc = "`reset()` method sets DLMMON to value 0"]
119impl crate::Resettable for DLMMON_SPEC {
120 const RESET_VALUE: Self::Ux = 0;
121}