atsamd21j/dsu/
did.rs
1#[doc = "Register `DID` reader"]
2pub type R = crate::R<DidSpec>;
3#[doc = "Field `DEVSEL` reader - Device Select"]
4pub type DevselR = crate::FieldReader;
5#[doc = "Field `REVISION` reader - Revision"]
6pub type RevisionR = crate::FieldReader;
7#[doc = "Field `DIE` reader - Die Identification"]
8pub type DieR = crate::FieldReader;
9#[doc = "Field `SERIES` reader - Product Series"]
10pub type SeriesR = crate::FieldReader;
11#[doc = "Field `FAMILY` reader - Product Family"]
12pub type FamilyR = crate::FieldReader;
13#[doc = "Field `PROCESSOR` reader - Processor"]
14pub type ProcessorR = crate::FieldReader;
15impl R {
16 #[doc = "Bits 0:7 - Device Select"]
17 #[inline(always)]
18 pub fn devsel(&self) -> DevselR {
19 DevselR::new((self.bits & 0xff) as u8)
20 }
21 #[doc = "Bits 8:11 - Revision"]
22 #[inline(always)]
23 pub fn revision(&self) -> RevisionR {
24 RevisionR::new(((self.bits >> 8) & 0x0f) as u8)
25 }
26 #[doc = "Bits 12:15 - Die Identification"]
27 #[inline(always)]
28 pub fn die(&self) -> DieR {
29 DieR::new(((self.bits >> 12) & 0x0f) as u8)
30 }
31 #[doc = "Bits 16:21 - Product Series"]
32 #[inline(always)]
33 pub fn series(&self) -> SeriesR {
34 SeriesR::new(((self.bits >> 16) & 0x3f) as u8)
35 }
36 #[doc = "Bits 23:27 - Product Family"]
37 #[inline(always)]
38 pub fn family(&self) -> FamilyR {
39 FamilyR::new(((self.bits >> 23) & 0x1f) as u8)
40 }
41 #[doc = "Bits 28:31 - Processor"]
42 #[inline(always)]
43 pub fn processor(&self) -> ProcessorR {
44 ProcessorR::new(((self.bits >> 28) & 0x0f) as u8)
45 }
46}
47#[doc = "Device Identification\n\nYou can [`read`](crate::Reg::read) this register and get [`did::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
48pub struct DidSpec;
49impl crate::RegisterSpec for DidSpec {
50 type Ux = u32;
51}
52#[doc = "`read()` method returns [`did::R`](R) reader structure"]
53impl crate::Readable for DidSpec {}
54#[doc = "`reset()` method sets DID to value 0x1001_0300"]
55impl crate::Resettable for DidSpec {
56 const RESET_VALUE: u32 = 0x1001_0300;
57}