1#[doc = "Register `MAN` reader"]
2pub type R = crate::R<ManSpec>;
3#[doc = "Register `MAN` writer"]
4pub type W = crate::W<ManSpec>;
5#[doc = "Field `DATA` reader - "]
6pub type DataR = crate::FieldReader<u16>;
7#[doc = "Field `DATA` writer - "]
8pub type DataW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9#[doc = "Field `CODE` reader - "]
10pub type CodeR = crate::FieldReader;
11#[doc = "Field `CODE` writer - "]
12pub type CodeW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
13#[doc = "Field `REGA` reader - Register Address"]
14pub type RegaR = crate::FieldReader;
15#[doc = "Field `REGA` writer - Register Address"]
16pub type RegaW<'a, REG> = crate::FieldWriter<'a, REG, 5>;
17#[doc = "Field `PHYA` reader - PHY Address"]
18pub type PhyaR = crate::FieldReader;
19#[doc = "Field `PHYA` writer - PHY Address"]
20pub type PhyaW<'a, REG> = crate::FieldWriter<'a, REG, 5>;
21#[doc = "Field `RW` reader - Read-write"]
22pub type RwR = crate::FieldReader;
23#[doc = "Field `RW` writer - Read-write"]
24pub type RwW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
25#[doc = "Field `SOF` reader - Start of frame"]
26pub type SofR = crate::FieldReader;
27#[doc = "Field `SOF` writer - Start of frame"]
28pub type SofW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
29impl R {
30 #[doc = "Bits 0:15"]
31 #[inline(always)]
32 pub fn data(&self) -> DataR {
33 DataR::new((self.bits & 0xffff) as u16)
34 }
35 #[doc = "Bits 16:17"]
36 #[inline(always)]
37 pub fn code(&self) -> CodeR {
38 CodeR::new(((self.bits >> 16) & 3) as u8)
39 }
40 #[doc = "Bits 18:22 - Register Address"]
41 #[inline(always)]
42 pub fn rega(&self) -> RegaR {
43 RegaR::new(((self.bits >> 18) & 0x1f) as u8)
44 }
45 #[doc = "Bits 23:27 - PHY Address"]
46 #[inline(always)]
47 pub fn phya(&self) -> PhyaR {
48 PhyaR::new(((self.bits >> 23) & 0x1f) as u8)
49 }
50 #[doc = "Bits 28:29 - Read-write"]
51 #[inline(always)]
52 pub fn rw(&self) -> RwR {
53 RwR::new(((self.bits >> 28) & 3) as u8)
54 }
55 #[doc = "Bits 30:31 - Start of frame"]
56 #[inline(always)]
57 pub fn sof(&self) -> SofR {
58 SofR::new(((self.bits >> 30) & 3) as u8)
59 }
60}
61impl W {
62 #[doc = "Bits 0:15"]
63 #[inline(always)]
64 #[must_use]
65 pub fn data(&mut self) -> DataW<ManSpec> {
66 DataW::new(self, 0)
67 }
68 #[doc = "Bits 16:17"]
69 #[inline(always)]
70 #[must_use]
71 pub fn code(&mut self) -> CodeW<ManSpec> {
72 CodeW::new(self, 16)
73 }
74 #[doc = "Bits 18:22 - Register Address"]
75 #[inline(always)]
76 #[must_use]
77 pub fn rega(&mut self) -> RegaW<ManSpec> {
78 RegaW::new(self, 18)
79 }
80 #[doc = "Bits 23:27 - PHY Address"]
81 #[inline(always)]
82 #[must_use]
83 pub fn phya(&mut self) -> PhyaW<ManSpec> {
84 PhyaW::new(self, 23)
85 }
86 #[doc = "Bits 28:29 - Read-write"]
87 #[inline(always)]
88 #[must_use]
89 pub fn rw(&mut self) -> RwW<ManSpec> {
90 RwW::new(self, 28)
91 }
92 #[doc = "Bits 30:31 - Start of frame"]
93 #[inline(always)]
94 #[must_use]
95 pub fn sof(&mut self) -> SofW<ManSpec> {
96 SofW::new(self, 30)
97 }
98}
99#[doc = "Phy Maintenance Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`man::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`man::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
100pub struct ManSpec;
101impl crate::RegisterSpec for ManSpec {
102 type Ux = u32;
103}
104#[doc = "`read()` method returns [`man::R`](R) reader structure"]
105impl crate::Readable for ManSpec {}
106#[doc = "`write(|w| ..)` method takes [`man::W`](W) writer structure"]
107impl crate::Writable for ManSpec {
108 type Safety = crate::Unsafe;
109 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
110 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
111}
112#[doc = "`reset()` method sets MAN to value 0"]
113impl crate::Resettable for ManSpec {
114 const RESET_VALUE: u32 = 0;
115}