rp2040_pac/ppb/
cpuid.rs

1#[doc = "Register `CPUID` reader"]
2pub type R = crate::R<CPUID_SPEC>;
3#[doc = "Field `REVISION` reader - Minor revision number m in the rnpm revision status:  
4 0x1 = Patch 1."]
5pub type REVISION_R = crate::FieldReader;
6#[doc = "Field `PARTNO` reader - Number of processor within family: 0xC60 = Cortex-M0+"]
7pub type PARTNO_R = crate::FieldReader<u16>;
8#[doc = "Field `ARCHITECTURE` reader - Constant that defines the architecture of the processor:  
9 0xC = ARMv6-M architecture."]
10pub type ARCHITECTURE_R = crate::FieldReader;
11#[doc = "Field `VARIANT` reader - Major revision number n in the rnpm revision status:  
12 0x0 = Revision 0."]
13pub type VARIANT_R = crate::FieldReader;
14#[doc = "Field `IMPLEMENTER` reader - Implementor code: 0x41 = ARM"]
15pub type IMPLEMENTER_R = crate::FieldReader;
16impl R {
17    #[doc = "Bits 0:3 - Minor revision number m in the rnpm revision status:  
18 0x1 = Patch 1."]
19    #[inline(always)]
20    pub fn revision(&self) -> REVISION_R {
21        REVISION_R::new((self.bits & 0x0f) as u8)
22    }
23    #[doc = "Bits 4:15 - Number of processor within family: 0xC60 = Cortex-M0+"]
24    #[inline(always)]
25    pub fn partno(&self) -> PARTNO_R {
26        PARTNO_R::new(((self.bits >> 4) & 0x0fff) as u16)
27    }
28    #[doc = "Bits 16:19 - Constant that defines the architecture of the processor:  
29 0xC = ARMv6-M architecture."]
30    #[inline(always)]
31    pub fn architecture(&self) -> ARCHITECTURE_R {
32        ARCHITECTURE_R::new(((self.bits >> 16) & 0x0f) as u8)
33    }
34    #[doc = "Bits 20:23 - Major revision number n in the rnpm revision status:  
35 0x0 = Revision 0."]
36    #[inline(always)]
37    pub fn variant(&self) -> VARIANT_R {
38        VARIANT_R::new(((self.bits >> 20) & 0x0f) as u8)
39    }
40    #[doc = "Bits 24:31 - Implementor code: 0x41 = ARM"]
41    #[inline(always)]
42    pub fn implementer(&self) -> IMPLEMENTER_R {
43        IMPLEMENTER_R::new(((self.bits >> 24) & 0xff) as u8)
44    }
45}
46#[doc = "Read the CPU ID Base Register to determine: the ID number of the processor core, the version number of the processor core, the implementation details of the processor core.  
47
48You can [`read`](crate::generic::Reg::read) this register and get [`cpuid::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
49pub struct CPUID_SPEC;
50impl crate::RegisterSpec for CPUID_SPEC {
51    type Ux = u32;
52}
53#[doc = "`read()` method returns [`cpuid::R`](R) reader structure"]
54impl crate::Readable for CPUID_SPEC {}
55#[doc = "`reset()` method sets CPUID to value 0x410c_c601"]
56impl crate::Resettable for CPUID_SPEC {
57    const RESET_VALUE: u32 = 0x410c_c601;
58}