atsamd11c/dsu/
pid2.rs

1#[doc = "Register `PID2` reader"]
2pub type R = crate::R<Pid2Spec>;
3#[doc = "Field `JEPIDCH` reader - JEP-106 Identity Code High"]
4pub type JepidchR = crate::FieldReader;
5#[doc = "Field `JEPU` reader - JEP-106 Identity Code is used"]
6pub type JepuR = crate::BitReader;
7#[doc = "Field `REVISION` reader - Revision Number"]
8pub type RevisionR = crate::FieldReader;
9impl R {
10    #[doc = "Bits 0:2 - JEP-106 Identity Code High"]
11    #[inline(always)]
12    pub fn jepidch(&self) -> JepidchR {
13        JepidchR::new((self.bits & 7) as u8)
14    }
15    #[doc = "Bit 3 - JEP-106 Identity Code is used"]
16    #[inline(always)]
17    pub fn jepu(&self) -> JepuR {
18        JepuR::new(((self.bits >> 3) & 1) != 0)
19    }
20    #[doc = "Bits 4:7 - Revision Number"]
21    #[inline(always)]
22    pub fn revision(&self) -> RevisionR {
23        RevisionR::new(((self.bits >> 4) & 0x0f) as u8)
24    }
25}
26#[doc = "Peripheral Identification 2\n\nYou can [`read`](crate::Reg::read) this register and get [`pid2::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
27pub struct Pid2Spec;
28impl crate::RegisterSpec for Pid2Spec {
29    type Ux = u32;
30}
31#[doc = "`read()` method returns [`pid2::R`](R) reader structure"]
32impl crate::Readable for Pid2Spec {}
33#[doc = "`reset()` method sets PID2 to value 0x09"]
34impl crate::Resettable for Pid2Spec {
35    const RESET_VALUE: u32 = 0x09;
36}