1#[doc = "Register `ID` reader"]
2pub struct R(crate::R<ID_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<ID_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<ID_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<ID_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `ID` writer"]
17pub struct W(crate::W<ID_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<ID_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<ID_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<ID_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `rtl_version` reader - RTL Release Version"]
38pub type RTL_VERSION_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `part_num` reader - Part Number ID"]
40pub type PART_NUM_R = crate::FieldReader<u8, u8>;
41#[doc = "Field `cache_id` reader - Cache ID"]
42pub type CACHE_ID_R = crate::FieldReader<u8, u8>;
43impl R {
44 #[doc = "Bits 0:5 - RTL Release Version"]
45 #[inline(always)]
46 pub fn rtl_version(&self) -> RTL_VERSION_R {
47 RTL_VERSION_R::new((self.bits & 0x3f) as u8)
48 }
49 #[doc = "Bits 6:9 - Part Number ID"]
50 #[inline(always)]
51 pub fn part_num(&self) -> PART_NUM_R {
52 PART_NUM_R::new(((self.bits >> 6) & 0x0f) as u8)
53 }
54 #[doc = "Bits 10:15 - Cache ID"]
55 #[inline(always)]
56 pub fn cache_id(&self) -> CACHE_ID_R {
57 CACHE_ID_R::new(((self.bits >> 10) & 0x3f) as u8)
58 }
59}
60impl W {
61 #[doc = "Writes raw bits to the register."]
62 #[inline(always)]
63 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
64 self.0.bits(bits);
65 self
66 }
67}
68#[doc = "Device ID Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [id](index.html) module"]
69pub struct ID_SPEC;
70impl crate::RegisterSpec for ID_SPEC {
71 type Ux = u32;
72}
73#[doc = "`read()` method returns [id::R](R) reader structure"]
74impl crate::Readable for ID_SPEC {
75 type Reader = R;
76}
77#[doc = "`write(|w| ..)` method takes [id::W](W) writer structure"]
78impl crate::Writable for ID_SPEC {
79 type Writer = W;
80}
81#[doc = "`reset()` method sets ID to value 0"]
82impl crate::Resettable for ID_SPEC {
83 #[inline(always)]
84 fn reset_value() -> Self::Ux {
85 0
86 }
87}