efm32pg22_pac/efm32pg22c200/devinfo/
info.rs1#[doc = "Register `INFO` reader"]
2pub struct R(crate::R<INFO_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<INFO_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<INFO_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<INFO_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `CRC` reader - CRC"]
17pub type CRC_R = crate::FieldReader<u16, u16>;
18#[doc = "Field `PRODREV` reader - Production Revision"]
19pub type PRODREV_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `DEVINFOREV` reader - DI Page Version"]
21pub type DEVINFOREV_R = crate::FieldReader<u8, u8>;
22impl R {
23 #[doc = "Bits 0:15 - CRC"]
24 #[inline(always)]
25 pub fn crc(&self) -> CRC_R {
26 CRC_R::new((self.bits & 0xffff) as u16)
27 }
28 #[doc = "Bits 16:23 - Production Revision"]
29 #[inline(always)]
30 pub fn prodrev(&self) -> PRODREV_R {
31 PRODREV_R::new(((self.bits >> 16) & 0xff) as u8)
32 }
33 #[doc = "Bits 24:31 - DI Page Version"]
34 #[inline(always)]
35 pub fn devinforev(&self) -> DEVINFOREV_R {
36 DEVINFOREV_R::new(((self.bits >> 24) & 0xff) as u8)
37 }
38}
39#[doc = "Version of the device info structure being used\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 [info](index.html) module"]
40pub struct INFO_SPEC;
41impl crate::RegisterSpec for INFO_SPEC {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [info::R](R) reader structure"]
45impl crate::Readable for INFO_SPEC {
46 type Reader = R;
47}
48#[doc = "`reset()` method sets INFO to value 0x0700_0000"]
49impl crate::Resettable for INFO_SPEC {
50 const RESET_VALUE: Self::Ux = 0x0700_0000;
51}