1#[doc = "Register `GUID` reader"]
2pub type R = crate::R<GUID_SPEC>;
3#[doc = "Register `GUID` writer"]
4pub type W = crate::W<GUID_SPEC>;
5#[doc = "Field `MOD_REV` reader - Module Revision"]
6pub type MOD_REV_R = crate::FieldReader;
7#[doc = "Field `MOD_REV` writer - Module Revision"]
8pub type MOD_REV_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `MOD_TYPE` reader - Module Type"]
10pub type MOD_TYPE_R = crate::FieldReader;
11#[doc = "Field `MOD_TYPE` writer - Module Type"]
12pub type MOD_TYPE_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `MOD_NUMBER` reader - Module Number"]
14pub type MOD_NUMBER_R = crate::FieldReader<u16>;
15#[doc = "Field `MOD_NUMBER` writer - Module Number"]
16pub type MOD_NUMBER_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
17impl R {
18 #[doc = "Bits 0:7 - Module Revision"]
19 #[inline(always)]
20 pub fn mod_rev(&self) -> MOD_REV_R {
21 MOD_REV_R::new((self.bits & 0xff) as u8)
22 }
23 #[doc = "Bits 8:15 - Module Type"]
24 #[inline(always)]
25 pub fn mod_type(&self) -> MOD_TYPE_R {
26 MOD_TYPE_R::new(((self.bits >> 8) & 0xff) as u8)
27 }
28 #[doc = "Bits 16:31 - Module Number"]
29 #[inline(always)]
30 pub fn mod_number(&self) -> MOD_NUMBER_R {
31 MOD_NUMBER_R::new(((self.bits >> 16) & 0xffff) as u16)
32 }
33}
34impl W {
35 #[doc = "Bits 0:7 - Module Revision"]
36 #[inline(always)]
37 pub fn mod_rev(&mut self) -> MOD_REV_W<GUID_SPEC> {
38 MOD_REV_W::new(self, 0)
39 }
40 #[doc = "Bits 8:15 - Module Type"]
41 #[inline(always)]
42 pub fn mod_type(&mut self) -> MOD_TYPE_W<GUID_SPEC> {
43 MOD_TYPE_W::new(self, 8)
44 }
45 #[doc = "Bits 16:31 - Module Number"]
46 #[inline(always)]
47 pub fn mod_number(&mut self) -> MOD_NUMBER_W<GUID_SPEC> {
48 MOD_NUMBER_W::new(self, 16)
49 }
50}
51#[doc = "USB Module Identification Register\n\nYou can [`read`](crate::Reg::read) this register and get [`guid::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`guid::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
52pub struct GUID_SPEC;
53impl crate::RegisterSpec for GUID_SPEC {
54 type Ux = u32;
55}
56#[doc = "`read()` method returns [`guid::R`](R) reader structure"]
57impl crate::Readable for GUID_SPEC {}
58#[doc = "`write(|w| ..)` method takes [`guid::W`](W) writer structure"]
59impl crate::Writable for GUID_SPEC {
60 type Safety = crate::Unsafe;
61 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
62 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
63}
64#[doc = "`reset()` method sets GUID to value 0x00ae_c000"]
65impl crate::Resettable for GUID_SPEC {
66 const RESET_VALUE: u32 = 0x00ae_c000;
67}