efm32lg230_pac/etm/
etmscr.rs1#[doc = "Register `ETMSCR` reader"]
2pub struct R(crate::R<ETMSCR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<ETMSCR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<ETMSCR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<ETMSCR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `MAXPORTSIZE` reader - Maximum Port Size"]
17pub type MAXPORTSIZE_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `FIFOFULL` reader - FIFO FULL Supported"]
19pub type FIFOFULL_R = crate::BitReader<bool>;
20#[doc = "Field `MAXPORTSIZE3` reader - Max Port Size\\[3\\]"]
21pub type MAXPORTSIZE3_R = crate::BitReader<bool>;
22#[doc = "Field `PORTSIZE` reader - Port Size Supported"]
23pub type PORTSIZE_R = crate::BitReader<bool>;
24#[doc = "Field `PORTMODE` reader - Port Mode Supported"]
25pub type PORTMODE_R = crate::BitReader<bool>;
26#[doc = "Field `PROCNUM` reader - Number of Supported Processros"]
27pub type PROCNUM_R = crate::FieldReader<u8, u8>;
28#[doc = "Field `NOFETCHCOMP` reader - No Fetch Comparison"]
29pub type NOFETCHCOMP_R = crate::BitReader<bool>;
30impl R {
31 #[doc = "Bits 0:2 - Maximum Port Size"]
32 #[inline(always)]
33 pub fn maxportsize(&self) -> MAXPORTSIZE_R {
34 MAXPORTSIZE_R::new((self.bits & 7) as u8)
35 }
36 #[doc = "Bit 8 - FIFO FULL Supported"]
37 #[inline(always)]
38 pub fn fifofull(&self) -> FIFOFULL_R {
39 FIFOFULL_R::new(((self.bits >> 8) & 1) != 0)
40 }
41 #[doc = "Bit 9 - Max Port Size\\[3\\]"]
42 #[inline(always)]
43 pub fn maxportsize3(&self) -> MAXPORTSIZE3_R {
44 MAXPORTSIZE3_R::new(((self.bits >> 9) & 1) != 0)
45 }
46 #[doc = "Bit 10 - Port Size Supported"]
47 #[inline(always)]
48 pub fn portsize(&self) -> PORTSIZE_R {
49 PORTSIZE_R::new(((self.bits >> 10) & 1) != 0)
50 }
51 #[doc = "Bit 11 - Port Mode Supported"]
52 #[inline(always)]
53 pub fn portmode(&self) -> PORTMODE_R {
54 PORTMODE_R::new(((self.bits >> 11) & 1) != 0)
55 }
56 #[doc = "Bits 12:14 - Number of Supported Processros"]
57 #[inline(always)]
58 pub fn procnum(&self) -> PROCNUM_R {
59 PROCNUM_R::new(((self.bits >> 12) & 7) as u8)
60 }
61 #[doc = "Bit 17 - No Fetch Comparison"]
62 #[inline(always)]
63 pub fn nofetchcomp(&self) -> NOFETCHCOMP_R {
64 NOFETCHCOMP_R::new(((self.bits >> 17) & 1) != 0)
65 }
66}
67#[doc = "ETM System Configuration 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 [etmscr](index.html) module"]
68pub struct ETMSCR_SPEC;
69impl crate::RegisterSpec for ETMSCR_SPEC {
70 type Ux = u32;
71}
72#[doc = "`read()` method returns [etmscr::R](R) reader structure"]
73impl crate::Readable for ETMSCR_SPEC {
74 type Reader = R;
75}
76#[doc = "`reset()` method sets ETMSCR to value 0x0002_0d09"]
77impl crate::Resettable for ETMSCR_SPEC {
78 #[inline(always)]
79 fn reset_value() -> Self::Ux {
80 0x0002_0d09
81 }
82}