efm32gg_pac/efm32gg230/etm/
etmidr.rs1#[doc = "Register `ETMIDR` reader"]
2pub struct R(crate::R<ETMIDR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<ETMIDR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<ETMIDR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<ETMIDR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `IMPVER` reader - Implementation Revision"]
17pub type IMPVER_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `ETMMINVER` reader - Minor ETM Architecture Version"]
19pub type ETMMINVER_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `ETMMAJVER` reader - Major ETM Architecture Version"]
21pub type ETMMAJVER_R = crate::FieldReader<u8, u8>;
22#[doc = "Field `PROCFAM` reader - Implementer Code"]
23pub type PROCFAM_R = crate::FieldReader<u8, u8>;
24#[doc = "Field `LPCF` reader - Load PC First"]
25pub type LPCF_R = crate::BitReader<bool>;
26#[doc = "Field `THUMBT` reader - 32-bit Thumb Instruction Tracing"]
27pub type THUMBT_R = crate::BitReader<bool>;
28#[doc = "Field `SECEXT` reader - Security Extension Support"]
29pub type SECEXT_R = crate::BitReader<bool>;
30#[doc = "Field `BPE` reader - Branch Packet Encoding"]
31pub type BPE_R = crate::BitReader<bool>;
32#[doc = "Field `IMPCODE` reader - Implementer Code"]
33pub type IMPCODE_R = crate::FieldReader<u8, u8>;
34impl R {
35 #[doc = "Bits 0:3 - Implementation Revision"]
36 #[inline(always)]
37 pub fn impver(&self) -> IMPVER_R {
38 IMPVER_R::new((self.bits & 0x0f) as u8)
39 }
40 #[doc = "Bits 4:7 - Minor ETM Architecture Version"]
41 #[inline(always)]
42 pub fn etmminver(&self) -> ETMMINVER_R {
43 ETMMINVER_R::new(((self.bits >> 4) & 0x0f) as u8)
44 }
45 #[doc = "Bits 8:11 - Major ETM Architecture Version"]
46 #[inline(always)]
47 pub fn etmmajver(&self) -> ETMMAJVER_R {
48 ETMMAJVER_R::new(((self.bits >> 8) & 0x0f) as u8)
49 }
50 #[doc = "Bits 12:15 - Implementer Code"]
51 #[inline(always)]
52 pub fn procfam(&self) -> PROCFAM_R {
53 PROCFAM_R::new(((self.bits >> 12) & 0x0f) as u8)
54 }
55 #[doc = "Bit 16 - Load PC First"]
56 #[inline(always)]
57 pub fn lpcf(&self) -> LPCF_R {
58 LPCF_R::new(((self.bits >> 16) & 1) != 0)
59 }
60 #[doc = "Bit 18 - 32-bit Thumb Instruction Tracing"]
61 #[inline(always)]
62 pub fn thumbt(&self) -> THUMBT_R {
63 THUMBT_R::new(((self.bits >> 18) & 1) != 0)
64 }
65 #[doc = "Bit 19 - Security Extension Support"]
66 #[inline(always)]
67 pub fn secext(&self) -> SECEXT_R {
68 SECEXT_R::new(((self.bits >> 19) & 1) != 0)
69 }
70 #[doc = "Bit 20 - Branch Packet Encoding"]
71 #[inline(always)]
72 pub fn bpe(&self) -> BPE_R {
73 BPE_R::new(((self.bits >> 20) & 1) != 0)
74 }
75 #[doc = "Bits 24:31 - Implementer Code"]
76 #[inline(always)]
77 pub fn impcode(&self) -> IMPCODE_R {
78 IMPCODE_R::new(((self.bits >> 24) & 0xff) as u8)
79 }
80}
81#[doc = "ID 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 [etmidr](index.html) module"]
82pub struct ETMIDR_SPEC;
83impl crate::RegisterSpec for ETMIDR_SPEC {
84 type Ux = u32;
85}
86#[doc = "`read()` method returns [etmidr::R](R) reader structure"]
87impl crate::Readable for ETMIDR_SPEC {
88 type Reader = R;
89}
90#[doc = "`reset()` method sets ETMIDR to value 0x4114_f253"]
91impl crate::Resettable for ETMIDR_SPEC {
92 const RESET_VALUE: Self::Ux = 0x4114_f253;
93}