lpc845_pac/capt/
id.rs

1#[doc = "Register `ID` reader"]
2pub struct R(crate::R<ID_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<ID_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<ID_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<ID_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `APERTURE` reader - Aperture: encoded as (aperture size/4K) -1, so 0x00 is a 4 K aperture."]
17pub struct APERTURE_R(crate::FieldReader<u8, u8>);
18impl APERTURE_R {
19    pub(crate) fn new(bits: u8) -> Self {
20        APERTURE_R(crate::FieldReader::new(bits))
21    }
22}
23impl core::ops::Deref for APERTURE_R {
24    type Target = crate::FieldReader<u8, u8>;
25    #[inline(always)]
26    fn deref(&self) -> &Self::Target {
27        &self.0
28    }
29}
30#[doc = "Field `MINOR_REV` reader - Minor revision of module implementation, starting at 0. Software compatibility is expected between minor revisions."]
31pub struct MINOR_REV_R(crate::FieldReader<u8, u8>);
32impl MINOR_REV_R {
33    pub(crate) fn new(bits: u8) -> Self {
34        MINOR_REV_R(crate::FieldReader::new(bits))
35    }
36}
37impl core::ops::Deref for MINOR_REV_R {
38    type Target = crate::FieldReader<u8, u8>;
39    #[inline(always)]
40    fn deref(&self) -> &Self::Target {
41        &self.0
42    }
43}
44#[doc = "Field `MAJOR_REV` reader - Major revision of module implementation, starting at 0. There may not be software compatibility between major revisions."]
45pub struct MAJOR_REV_R(crate::FieldReader<u8, u8>);
46impl MAJOR_REV_R {
47    pub(crate) fn new(bits: u8) -> Self {
48        MAJOR_REV_R(crate::FieldReader::new(bits))
49    }
50}
51impl core::ops::Deref for MAJOR_REV_R {
52    type Target = crate::FieldReader<u8, u8>;
53    #[inline(always)]
54    fn deref(&self) -> &Self::Target {
55        &self.0
56    }
57}
58#[doc = "Field `ID` reader - 1 if is Timeout."]
59pub struct ID_R(crate::FieldReader<u16, u16>);
60impl ID_R {
61    pub(crate) fn new(bits: u16) -> Self {
62        ID_R(crate::FieldReader::new(bits))
63    }
64}
65impl core::ops::Deref for ID_R {
66    type Target = crate::FieldReader<u16, u16>;
67    #[inline(always)]
68    fn deref(&self) -> &Self::Target {
69        &self.0
70    }
71}
72impl R {
73    #[doc = "Bits 0:7 - Aperture: encoded as (aperture size/4K) -1, so 0x00 is a 4 K aperture."]
74    #[inline(always)]
75    pub fn aperture(&self) -> APERTURE_R {
76        APERTURE_R::new((self.bits & 0xff) as u8)
77    }
78    #[doc = "Bits 8:11 - Minor revision of module implementation, starting at 0. Software compatibility is expected between minor revisions."]
79    #[inline(always)]
80    pub fn minor_rev(&self) -> MINOR_REV_R {
81        MINOR_REV_R::new(((self.bits >> 8) & 0x0f) as u8)
82    }
83    #[doc = "Bits 12:15 - Major revision of module implementation, starting at 0. There may not be software compatibility between major revisions."]
84    #[inline(always)]
85    pub fn major_rev(&self) -> MAJOR_REV_R {
86        MAJOR_REV_R::new(((self.bits >> 12) & 0x0f) as u8)
87    }
88    #[doc = "Bits 16:31 - 1 if is Timeout."]
89    #[inline(always)]
90    pub fn id(&self) -> ID_R {
91        ID_R::new(((self.bits >> 16) & 0xffff) as u16)
92    }
93}
94#[doc = "Block ID\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 [id](index.html) module"]
95pub struct ID_SPEC;
96impl crate::RegisterSpec for ID_SPEC {
97    type Ux = u32;
98}
99#[doc = "`read()` method returns [id::R](R) reader structure"]
100impl crate::Readable for ID_SPEC {
101    type Reader = R;
102}
103#[doc = "`reset()` method sets ID to value 0xe100_0000"]
104impl crate::Resettable for ID_SPEC {
105    #[inline(always)]
106    fn reset_value() -> Self::Ux {
107        0xe100_0000
108    }
109}