efm32gg12b830_pac/qspi0/
moduleid.rs

1#[doc = "Register `MODULEID` reader"]
2pub struct R(crate::R<MODULEID_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<MODULEID_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<MODULEID_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<MODULEID_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `CONF` reader - Configuration ID Number"]
17pub type CONF_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `MODULEID` reader - Module/Revision ID Number"]
19pub type MODULEID_R = crate::FieldReader<u16, u16>;
20#[doc = "Field `FIXPATCH` reader - Fix/patch Number"]
21pub type FIXPATCH_R = crate::FieldReader<u8, u8>;
22impl R {
23    #[doc = "Bits 0:1 - Configuration ID Number"]
24    #[inline(always)]
25    pub fn conf(&self) -> CONF_R {
26        CONF_R::new((self.bits & 3) as u8)
27    }
28    #[doc = "Bits 8:23 - Module/Revision ID Number"]
29    #[inline(always)]
30    pub fn moduleid(&self) -> MODULEID_R {
31        MODULEID_R::new(((self.bits >> 8) & 0xffff) as u16)
32    }
33    #[doc = "Bits 24:31 - Fix/patch Number"]
34    #[inline(always)]
35    pub fn fixpatch(&self) -> FIXPATCH_R {
36        FIXPATCH_R::new(((self.bits >> 24) & 0xff) as u8)
37    }
38}
39#[doc = "Module ID 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 [moduleid](index.html) module"]
40pub struct MODULEID_SPEC;
41impl crate::RegisterSpec for MODULEID_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [moduleid::R](R) reader structure"]
45impl crate::Readable for MODULEID_SPEC {
46    type Reader = R;
47}
48#[doc = "`reset()` method sets MODULEID to value 0x0400_0300"]
49impl crate::Resettable for MODULEID_SPEC {
50    #[inline(always)]
51    fn reset_value() -> Self::Ux {
52        0x0400_0300
53    }
54}