Skip to main content

mcxa_pac/i3c0/
mrdatah.rs

1#[doc = "Register `MRDATAH` reader"]
2pub type R = crate::R<MrdatahSpec>;
3#[doc = "Field `LSB` reader - Low Byte"]
4pub type LsbR = crate::FieldReader;
5#[doc = "Field `MSB` reader - High Byte"]
6pub type MsbR = crate::FieldReader;
7impl R {
8    #[doc = "Bits 0:7 - Low Byte"]
9    #[inline(always)]
10    pub fn lsb(&self) -> LsbR {
11        LsbR::new((self.bits & 0xff) as u8)
12    }
13    #[doc = "Bits 8:15 - High Byte"]
14    #[inline(always)]
15    pub fn msb(&self) -> MsbR {
16        MsbR::new(((self.bits >> 8) & 0xff) as u8)
17    }
18}
19#[cfg(feature = "debug")]
20impl core::fmt::Debug for R {
21    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
22        f.debug_struct("MRDATAH")
23            .field("lsb", &self.lsb())
24            .field("msb", &self.msb())
25            .finish()
26    }
27}
28#[doc = "Controller Read Data Halfword\n\nYou can [`read`](crate::Reg::read) this register and get [`mrdatah::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct MrdatahSpec;
30impl crate::RegisterSpec for MrdatahSpec {
31    type Ux = u32;
32}
33#[doc = "`read()` method returns [`mrdatah::R`](R) reader structure"]
34impl crate::Readable for MrdatahSpec {}
35#[doc = "`reset()` method sets MRDATAH to value 0"]
36impl crate::Resettable for MrdatahSpec {}