rp2040_pac/sysinfo/
chip_id.rs

1#[doc = "Register `CHIP_ID` reader"]
2pub type R = crate::R<CHIP_ID_SPEC>;
3#[doc = "Field `MANUFACTURER` reader - "]
4pub type MANUFACTURER_R = crate::FieldReader<u16>;
5#[doc = "Field `PART` reader - "]
6pub type PART_R = crate::FieldReader<u16>;
7#[doc = "Field `REVISION` reader - "]
8pub type REVISION_R = crate::FieldReader;
9impl R {
10    #[doc = "Bits 0:11"]
11    #[inline(always)]
12    pub fn manufacturer(&self) -> MANUFACTURER_R {
13        MANUFACTURER_R::new((self.bits & 0x0fff) as u16)
14    }
15    #[doc = "Bits 12:27"]
16    #[inline(always)]
17    pub fn part(&self) -> PART_R {
18        PART_R::new(((self.bits >> 12) & 0xffff) as u16)
19    }
20    #[doc = "Bits 28:31"]
21    #[inline(always)]
22    pub fn revision(&self) -> REVISION_R {
23        REVISION_R::new(((self.bits >> 28) & 0x0f) as u8)
24    }
25}
26#[doc = "JEDEC JEP-106 compliant chip identifier.  
27
28You can [`read`](crate::generic::Reg::read) this register and get [`chip_id::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct CHIP_ID_SPEC;
30impl crate::RegisterSpec for CHIP_ID_SPEC {
31    type Ux = u32;
32}
33#[doc = "`read()` method returns [`chip_id::R`](R) reader structure"]
34impl crate::Readable for CHIP_ID_SPEC {}
35#[doc = "`reset()` method sets CHIP_ID to value 0"]
36impl crate::Resettable for CHIP_ID_SPEC {
37    const RESET_VALUE: u32 = 0;
38}