mimxrt685s_pac/i3c/
smsgmapaddr.rs

1#[doc = "Register `SMSGMAPADDR` reader"]
2pub type R = crate::R<SmsgmapaddrSpec>;
3#[doc = "Field `MAPLAST` reader - Matched address index"]
4pub type MaplastR = crate::FieldReader;
5#[doc = "Field `MAPLASTM1` reader - Previous match index 1"]
6pub type Maplastm1R = crate::FieldReader;
7#[doc = "Field `MAPLASTM2` reader - Previous match index 2"]
8pub type Maplastm2R = crate::FieldReader;
9impl R {
10    #[doc = "Bits 0:3 - Matched address index"]
11    #[inline(always)]
12    pub fn maplast(&self) -> MaplastR {
13        MaplastR::new((self.bits & 0x0f) as u8)
14    }
15    #[doc = "Bits 8:11 - Previous match index 1"]
16    #[inline(always)]
17    pub fn maplastm1(&self) -> Maplastm1R {
18        Maplastm1R::new(((self.bits >> 8) & 0x0f) as u8)
19    }
20    #[doc = "Bits 16:19 - Previous match index 2"]
21    #[inline(always)]
22    pub fn maplastm2(&self) -> Maplastm2R {
23        Maplastm2R::new(((self.bits >> 16) & 0x0f) as u8)
24    }
25}
26#[cfg(feature = "debug")]
27impl core::fmt::Debug for R {
28    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
29        f.debug_struct("SMSGMAPADDR")
30            .field("maplast", &self.maplast())
31            .field("maplastm1", &self.maplastm1())
32            .field("maplastm2", &self.maplastm2())
33            .finish()
34    }
35}
36#[doc = "Slave Message-Mapped Address Register\n\nYou can [`read`](crate::Reg::read) this register and get [`smsgmapaddr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
37pub struct SmsgmapaddrSpec;
38impl crate::RegisterSpec for SmsgmapaddrSpec {
39    type Ux = u32;
40}
41#[doc = "`read()` method returns [`smsgmapaddr::R`](R) reader structure"]
42impl crate::Readable for SmsgmapaddrSpec {}
43#[doc = "`reset()` method sets SMSGMAPADDR to value 0x0214"]
44impl crate::Resettable for SmsgmapaddrSpec {
45    const RESET_VALUE: u32 = 0x0214;
46}