mcxa_pac/lpuart0/
match_.rs

1#[doc = "Register `MATCH` reader"]
2pub type R = crate::R<MatchSpec>;
3#[doc = "Register `MATCH` writer"]
4pub type W = crate::W<MatchSpec>;
5#[doc = "Field `MA1` reader - Match Address 1"]
6pub type Ma1R = crate::FieldReader<u16>;
7#[doc = "Field `MA1` writer - Match Address 1"]
8pub type Ma1W<'a, REG> = crate::FieldWriter<'a, REG, 10, u16>;
9#[doc = "Field `MA2` reader - Match Address 2"]
10pub type Ma2R = crate::FieldReader<u16>;
11#[doc = "Field `MA2` writer - Match Address 2"]
12pub type Ma2W<'a, REG> = crate::FieldWriter<'a, REG, 10, u16>;
13impl R {
14    #[doc = "Bits 0:9 - Match Address 1"]
15    #[inline(always)]
16    pub fn ma1(&self) -> Ma1R {
17        Ma1R::new((self.bits & 0x03ff) as u16)
18    }
19    #[doc = "Bits 16:25 - Match Address 2"]
20    #[inline(always)]
21    pub fn ma2(&self) -> Ma2R {
22        Ma2R::new(((self.bits >> 16) & 0x03ff) as u16)
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("MATCH")
29            .field("ma1", &self.ma1())
30            .field("ma2", &self.ma2())
31            .finish()
32    }
33}
34impl W {
35    #[doc = "Bits 0:9 - Match Address 1"]
36    #[inline(always)]
37    pub fn ma1(&mut self) -> Ma1W<'_, MatchSpec> {
38        Ma1W::new(self, 0)
39    }
40    #[doc = "Bits 16:25 - Match Address 2"]
41    #[inline(always)]
42    pub fn ma2(&mut self) -> Ma2W<'_, MatchSpec> {
43        Ma2W::new(self, 16)
44    }
45}
46#[doc = "Match Address\n\nYou can [`read`](crate::Reg::read) this register and get [`match_::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`match_::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct MatchSpec;
48impl crate::RegisterSpec for MatchSpec {
49    type Ux = u32;
50}
51#[doc = "`read()` method returns [`match_::R`](R) reader structure"]
52impl crate::Readable for MatchSpec {}
53#[doc = "`write(|w| ..)` method takes [`match_::W`](W) writer structure"]
54impl crate::Writable for MatchSpec {
55    type Safety = crate::Unsafe;
56}
57#[doc = "`reset()` method sets MATCH to value 0"]
58impl crate::Resettable for MatchSpec {}