1#[doc = "Register `MDMR` reader"]
2pub type R = crate::R<MdmrSpec>;
3#[doc = "Register `MDMR` writer"]
4pub type W = crate::W<MdmrSpec>;
5#[doc = "Field `MATCH0` reader - Match 0 Value"]
6pub type Match0R = crate::FieldReader;
7#[doc = "Field `MATCH0` writer - Match 0 Value"]
8pub type Match0W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `MATCH1` reader - Match 1 Value"]
10pub type Match1R = crate::FieldReader;
11#[doc = "Field `MATCH1` writer - Match 1 Value"]
12pub type Match1W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13impl R {
14 #[doc = "Bits 0:7 - Match 0 Value"]
15 #[inline(always)]
16 pub fn match0(&self) -> Match0R {
17 Match0R::new((self.bits & 0xff) as u8)
18 }
19 #[doc = "Bits 16:23 - Match 1 Value"]
20 #[inline(always)]
21 pub fn match1(&self) -> Match1R {
22 Match1R::new(((self.bits >> 16) & 0xff) as u8)
23 }
24}
25#[cfg(feature = "debug")]
26impl core::fmt::Debug for R {
27 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28 f.debug_struct("MDMR")
29 .field("match0", &self.match0())
30 .field("match1", &self.match1())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bits 0:7 - Match 0 Value"]
36 #[inline(always)]
37 pub fn match0(&mut self) -> Match0W<'_, MdmrSpec> {
38 Match0W::new(self, 0)
39 }
40 #[doc = "Bits 16:23 - Match 1 Value"]
41 #[inline(always)]
42 pub fn match1(&mut self) -> Match1W<'_, MdmrSpec> {
43 Match1W::new(self, 16)
44 }
45}
46#[doc = "Controller Data Match\n\nYou can [`read`](crate::Reg::read) this register and get [`mdmr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mdmr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct MdmrSpec;
48impl crate::RegisterSpec for MdmrSpec {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`mdmr::R`](R) reader structure"]
52impl crate::Readable for MdmrSpec {}
53#[doc = "`write(|w| ..)` method takes [`mdmr::W`](W) writer structure"]
54impl crate::Writable for MdmrSpec {
55 type Safety = crate::Unsafe;
56}
57#[doc = "`reset()` method sets MDMR to value 0"]
58impl crate::Resettable for MdmrSpec {}