atsamd21g/dsu/
cid1.rs

1#[doc = "Register `CID1` reader"]
2pub type R = crate::R<Cid1Spec>;
3#[doc = "Field `PREAMBLE` reader - Preamble"]
4pub type PreambleR = crate::FieldReader;
5#[doc = "Field `CCLASS` reader - Component Class"]
6pub type CclassR = crate::FieldReader;
7impl R {
8    #[doc = "Bits 0:3 - Preamble"]
9    #[inline(always)]
10    pub fn preamble(&self) -> PreambleR {
11        PreambleR::new((self.bits & 0x0f) as u8)
12    }
13    #[doc = "Bits 4:7 - Component Class"]
14    #[inline(always)]
15    pub fn cclass(&self) -> CclassR {
16        CclassR::new(((self.bits >> 4) & 0x0f) as u8)
17    }
18}
19#[doc = "Component Identification 1\n\nYou can [`read`](crate::Reg::read) this register and get [`cid1::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
20pub struct Cid1Spec;
21impl crate::RegisterSpec for Cid1Spec {
22    type Ux = u32;
23}
24#[doc = "`read()` method returns [`cid1::R`](R) reader structure"]
25impl crate::Readable for Cid1Spec {}
26#[doc = "`reset()` method sets CID1 to value 0x10"]
27impl crate::Resettable for Cid1Spec {
28    const RESET_VALUE: u32 = 0x10;
29}