1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#[doc = "Register `retite_pc1` reader"]
pub struct R(crate::R<RETITE_PC1_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<RETITE_PC1_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<RETITE_PC1_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<RETITE_PC1_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Field `rt_pc_h` reader - Retire PC\\[39:32\\]"]
pub type RT_PC_H_R = crate::FieldReader<u8, u8>;
#[doc = "Field `rt_sig` reader - Retire Signal"]
pub type RT_SIG_R = crate::BitReader<RT_SIG_A>;
#[doc = "Retire Signal\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RT_SIG_A {
    #[doc = "0: `0`"]
    NOT_HAVE = 0,
    #[doc = "1: `1`"]
    HAVE = 1,
}
impl From<RT_SIG_A> for bool {
    #[inline(always)]
    fn from(variant: RT_SIG_A) -> Self {
        variant as u8 != 0
    }
}
impl RT_SIG_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RT_SIG_A {
        match self.bits {
            false => RT_SIG_A::NOT_HAVE,
            true => RT_SIG_A::HAVE,
        }
    }
    #[doc = "Checks if the value of the field is `NOT_HAVE`"]
    #[inline(always)]
    pub fn is_not_have(&self) -> bool {
        *self == RT_SIG_A::NOT_HAVE
    }
    #[doc = "Checks if the value of the field is `HAVE`"]
    #[inline(always)]
    pub fn is_have(&self) -> bool {
        *self == RT_SIG_A::HAVE
    }
}
impl R {
    #[doc = "Bits 0:7 - Retire PC\\[39:32\\]"]
    #[inline(always)]
    pub fn rt_pc_h(&self) -> RT_PC_H_R {
        RT_PC_H_R::new((self.bits & 0xff) as u8)
    }
    #[doc = "Bit 31 - Retire Signal"]
    #[inline(always)]
    pub fn rt_sig(&self) -> RT_SIG_R {
        RT_SIG_R::new(((self.bits >> 31) & 1) != 0)
    }
}
#[doc = "Retire PC1 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 [retite_pc1](index.html) module"]
pub struct RETITE_PC1_SPEC;
impl crate::RegisterSpec for RETITE_PC1_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [retite_pc1::R](R) reader structure"]
impl crate::Readable for RETITE_PC1_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets retite_pc1 to value 0"]
impl crate::Resettable for RETITE_PC1_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}