atsam4ls4c_pac/smap/
idr.rs1#[doc = "Register `IDR` reader"]
2pub struct R(crate::R<IDR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<IDR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<IDR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<IDR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `APIDV` reader - AP Identification Variant"]
17pub type APIDV_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `APID` reader - AP Identification"]
19pub type APID_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `CLSS` reader - Class"]
21pub type CLSS_R = crate::BitReader<bool>;
22#[doc = "Field `IC` reader - JEP-106 Identity Code"]
23pub type IC_R = crate::FieldReader<u8, u8>;
24#[doc = "Field `CC` reader - JEP-106 Continuation Code"]
25pub type CC_R = crate::FieldReader<u8, u8>;
26#[doc = "Field `REVISION` reader - Revision"]
27pub type REVISION_R = crate::FieldReader<u8, u8>;
28impl R {
29 #[doc = "Bits 0:3 - AP Identification Variant"]
30 #[inline(always)]
31 pub fn apidv(&self) -> APIDV_R {
32 APIDV_R::new((self.bits & 0x0f) as u8)
33 }
34 #[doc = "Bits 4:7 - AP Identification"]
35 #[inline(always)]
36 pub fn apid(&self) -> APID_R {
37 APID_R::new(((self.bits >> 4) & 0x0f) as u8)
38 }
39 #[doc = "Bit 16 - Class"]
40 #[inline(always)]
41 pub fn clss(&self) -> CLSS_R {
42 CLSS_R::new(((self.bits >> 16) & 1) != 0)
43 }
44 #[doc = "Bits 17:23 - JEP-106 Identity Code"]
45 #[inline(always)]
46 pub fn ic(&self) -> IC_R {
47 IC_R::new(((self.bits >> 17) & 0x7f) as u8)
48 }
49 #[doc = "Bits 24:27 - JEP-106 Continuation Code"]
50 #[inline(always)]
51 pub fn cc(&self) -> CC_R {
52 CC_R::new(((self.bits >> 24) & 0x0f) as u8)
53 }
54 #[doc = "Bits 28:31 - Revision"]
55 #[inline(always)]
56 pub fn revision(&self) -> REVISION_R {
57 REVISION_R::new(((self.bits >> 28) & 0x0f) as u8)
58 }
59}
60#[doc = "AP Identification register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [idr](index.html) module"]
61pub struct IDR_SPEC;
62impl crate::RegisterSpec for IDR_SPEC {
63 type Ux = u32;
64}
65#[doc = "`read()` method returns [idr::R](R) reader structure"]
66impl crate::Readable for IDR_SPEC {
67 type Reader = R;
68}
69#[doc = "`reset()` method sets IDR to value 0x003e_0000"]
70impl crate::Resettable for IDR_SPEC {
71 const RESET_VALUE: Self::Ux = 0x003e_0000;
72}