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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#[doc = "Register `ETMCCR` reader"]
pub struct R(crate::R<ETMCCR_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<ETMCCR_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<ETMCCR_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<ETMCCR_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Field `ADRCMPPAIR` reader - Number of Address Comparator Pairs"]
pub type ADRCMPPAIR_R = crate::FieldReader<u8, u8>;
#[doc = "Field `DATACMPNUM` reader - Number of Data Value Comparators"]
pub type DATACMPNUM_R = crate::FieldReader<u8, u8>;
#[doc = "Field `MMDECCNT` reader - Number of Memeory Map Decoders"]
pub type MMDECCNT_R = crate::FieldReader<u8, u8>;
#[doc = "Field `COUNTNUM` reader - Number of Counters"]
pub type COUNTNUM_R = crate::FieldReader<u8, u8>;
#[doc = "Field `SEQPRES` reader - Sequencer Present"]
pub type SEQPRES_R = crate::BitReader<bool>;
#[doc = "Field `EXTINPNUM` reader - Number of External Inputs"]
pub type EXTINPNUM_R = crate::FieldReader<u8, EXTINPNUM_A>;
#[doc = "Number of External Inputs\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum EXTINPNUM_A {
    #[doc = "0: Zero inputs presents"]
    ZERO = 0,
    #[doc = "1: One inputs presents"]
    ONE = 1,
    #[doc = "2: Two inputs presents"]
    TWO = 2,
}
impl From<EXTINPNUM_A> for u8 {
    #[inline(always)]
    fn from(variant: EXTINPNUM_A) -> Self {
        variant as _
    }
}
impl EXTINPNUM_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> Option<EXTINPNUM_A> {
        match self.bits {
            0 => Some(EXTINPNUM_A::ZERO),
            1 => Some(EXTINPNUM_A::ONE),
            2 => Some(EXTINPNUM_A::TWO),
            _ => None,
        }
    }
    #[doc = "Checks if the value of the field is `ZERO`"]
    #[inline(always)]
    pub fn is_zero(&self) -> bool {
        *self == EXTINPNUM_A::ZERO
    }
    #[doc = "Checks if the value of the field is `ONE`"]
    #[inline(always)]
    pub fn is_one(&self) -> bool {
        *self == EXTINPNUM_A::ONE
    }
    #[doc = "Checks if the value of the field is `TWO`"]
    #[inline(always)]
    pub fn is_two(&self) -> bool {
        *self == EXTINPNUM_A::TWO
    }
}
#[doc = "Field `EXTOUTNUM` reader - Number of External Output"]
pub type EXTOUTNUM_R = crate::FieldReader<u8, u8>;
#[doc = "Field `FIFOFULLPRES` reader - FIFIO FULL present"]
pub type FIFOFULLPRES_R = crate::BitReader<bool>;
#[doc = "Field `IDCOMPNUM` reader - Number of context ID Comparators"]
pub type IDCOMPNUM_R = crate::FieldReader<u8, u8>;
#[doc = "Field `TRACESS` reader - Trace Start/Stop Block Present"]
pub type TRACESS_R = crate::BitReader<bool>;
#[doc = "Field `MMACCESS` reader - Coprocessor and Memeory Access"]
pub type MMACCESS_R = crate::BitReader<bool>;
#[doc = "Field `ETMID` reader - ETM ID Register Present"]
pub type ETMID_R = crate::BitReader<bool>;
impl R {
    #[doc = "Bits 0:3 - Number of Address Comparator Pairs"]
    #[inline(always)]
    pub fn adrcmppair(&self) -> ADRCMPPAIR_R {
        ADRCMPPAIR_R::new((self.bits & 0x0f) as u8)
    }
    #[doc = "Bits 4:7 - Number of Data Value Comparators"]
    #[inline(always)]
    pub fn datacmpnum(&self) -> DATACMPNUM_R {
        DATACMPNUM_R::new(((self.bits >> 4) & 0x0f) as u8)
    }
    #[doc = "Bits 8:12 - Number of Memeory Map Decoders"]
    #[inline(always)]
    pub fn mmdeccnt(&self) -> MMDECCNT_R {
        MMDECCNT_R::new(((self.bits >> 8) & 0x1f) as u8)
    }
    #[doc = "Bits 13:15 - Number of Counters"]
    #[inline(always)]
    pub fn countnum(&self) -> COUNTNUM_R {
        COUNTNUM_R::new(((self.bits >> 13) & 7) as u8)
    }
    #[doc = "Bit 16 - Sequencer Present"]
    #[inline(always)]
    pub fn seqpres(&self) -> SEQPRES_R {
        SEQPRES_R::new(((self.bits >> 16) & 1) != 0)
    }
    #[doc = "Bits 17:19 - Number of External Inputs"]
    #[inline(always)]
    pub fn extinpnum(&self) -> EXTINPNUM_R {
        EXTINPNUM_R::new(((self.bits >> 17) & 7) as u8)
    }
    #[doc = "Bits 20:22 - Number of External Output"]
    #[inline(always)]
    pub fn extoutnum(&self) -> EXTOUTNUM_R {
        EXTOUTNUM_R::new(((self.bits >> 20) & 7) as u8)
    }
    #[doc = "Bit 23 - FIFIO FULL present"]
    #[inline(always)]
    pub fn fifofullpres(&self) -> FIFOFULLPRES_R {
        FIFOFULLPRES_R::new(((self.bits >> 23) & 1) != 0)
    }
    #[doc = "Bits 24:25 - Number of context ID Comparators"]
    #[inline(always)]
    pub fn idcompnum(&self) -> IDCOMPNUM_R {
        IDCOMPNUM_R::new(((self.bits >> 24) & 3) as u8)
    }
    #[doc = "Bit 26 - Trace Start/Stop Block Present"]
    #[inline(always)]
    pub fn tracess(&self) -> TRACESS_R {
        TRACESS_R::new(((self.bits >> 26) & 1) != 0)
    }
    #[doc = "Bit 27 - Coprocessor and Memeory Access"]
    #[inline(always)]
    pub fn mmaccess(&self) -> MMACCESS_R {
        MMACCESS_R::new(((self.bits >> 27) & 1) != 0)
    }
    #[doc = "Bit 31 - ETM ID Register Present"]
    #[inline(always)]
    pub fn etmid(&self) -> ETMID_R {
        ETMID_R::new(((self.bits >> 31) & 1) != 0)
    }
}
#[doc = "Configuration Code 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 [etmccr](index.html) module"]
pub struct ETMCCR_SPEC;
impl crate::RegisterSpec for ETMCCR_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [etmccr::R](R) reader structure"]
impl crate::Readable for ETMCCR_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets ETMCCR to value 0x8c80_2000"]
impl crate::Resettable for ETMCCR_SPEC {
    const RESET_VALUE: Self::Ux = 0x8c80_2000;
}