mimxrt595s/flexcomm0/
pid.rs

1#[doc = "Register `PID` reader"]
2pub struct R(crate::R<PID_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PID_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PID_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PID_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `Minor_Rev` reader - Minor revision of module implementation"]
17pub type MINOR_REV_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `Major_Rev` reader - Major revision of module implementation"]
19pub type MAJOR_REV_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `ID` reader - Module identifier for the selected function"]
21pub type ID_R = crate::FieldReader<u16, u16>;
22impl R {
23    #[doc = "Bits 8:11 - Minor revision of module implementation"]
24    #[inline(always)]
25    pub fn minor_rev(&self) -> MINOR_REV_R {
26        MINOR_REV_R::new(((self.bits >> 8) & 0x0f) as u8)
27    }
28    #[doc = "Bits 12:15 - Major revision of module implementation"]
29    #[inline(always)]
30    pub fn major_rev(&self) -> MAJOR_REV_R {
31        MAJOR_REV_R::new(((self.bits >> 12) & 0x0f) as u8)
32    }
33    #[doc = "Bits 16:31 - Module identifier for the selected function"]
34    #[inline(always)]
35    pub fn id(&self) -> ID_R {
36        ID_R::new(((self.bits >> 16) & 0xffff) as u16)
37    }
38}
39#[doc = "Peripheral Identification\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 [pid](index.html) module"]
40pub struct PID_SPEC;
41impl crate::RegisterSpec for PID_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [pid::R](R) reader structure"]
45impl crate::Readable for PID_SPEC {
46    type Reader = R;
47}
48#[doc = "`reset()` method sets PID to value 0"]
49impl crate::Resettable for PID_SPEC {
50    const RESET_VALUE: Self::Ux = 0;
51}