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