xmc4800/eth0/
pmt_control_status.rs1#[doc = "Register `PMT_CONTROL_STATUS` reader"]
2pub type R = crate::R<PMT_CONTROL_STATUS_SPEC>;
3#[doc = "Register `PMT_CONTROL_STATUS` writer"]
4pub type W = crate::W<PMT_CONTROL_STATUS_SPEC>;
5#[doc = "Field `PWRDWN` reader - Power Down"]
6pub type PWRDWN_R = crate::BitReader;
7#[doc = "Field `PWRDWN` writer - Power Down"]
8pub type PWRDWN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `MGKPKTEN` reader - Magic Packet Enable"]
10pub type MGKPKTEN_R = crate::BitReader;
11#[doc = "Field `MGKPKTEN` writer - Magic Packet Enable"]
12pub type MGKPKTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `RWKPKTEN` reader - Wake-Up Frame Enable"]
14pub type RWKPKTEN_R = crate::BitReader;
15#[doc = "Field `RWKPKTEN` writer - Wake-Up Frame Enable"]
16pub type RWKPKTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `MGKPRCVD` reader - Magic Packet Received"]
18pub type MGKPRCVD_R = crate::BitReader;
19#[doc = "Field `RWKPRCVD` reader - Wake-Up Frame Received"]
20pub type RWKPRCVD_R = crate::BitReader;
21#[doc = "Field `GLBLUCAST` reader - Global Unicast"]
22pub type GLBLUCAST_R = crate::BitReader;
23#[doc = "Field `GLBLUCAST` writer - Global Unicast"]
24pub type GLBLUCAST_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `RWKFILTRST` reader - Wake-Up Frame Filter Register Pointer Reset"]
26pub type RWKFILTRST_R = crate::BitReader;
27#[doc = "Field `RWKFILTRST` writer - Wake-Up Frame Filter Register Pointer Reset"]
28pub type RWKFILTRST_W<'a, REG> = crate::BitWriter<'a, REG>;
29impl R {
30 #[doc = "Bit 0 - Power Down"]
31 #[inline(always)]
32 pub fn pwrdwn(&self) -> PWRDWN_R {
33 PWRDWN_R::new((self.bits & 1) != 0)
34 }
35 #[doc = "Bit 1 - Magic Packet Enable"]
36 #[inline(always)]
37 pub fn mgkpkten(&self) -> MGKPKTEN_R {
38 MGKPKTEN_R::new(((self.bits >> 1) & 1) != 0)
39 }
40 #[doc = "Bit 2 - Wake-Up Frame Enable"]
41 #[inline(always)]
42 pub fn rwkpkten(&self) -> RWKPKTEN_R {
43 RWKPKTEN_R::new(((self.bits >> 2) & 1) != 0)
44 }
45 #[doc = "Bit 5 - Magic Packet Received"]
46 #[inline(always)]
47 pub fn mgkprcvd(&self) -> MGKPRCVD_R {
48 MGKPRCVD_R::new(((self.bits >> 5) & 1) != 0)
49 }
50 #[doc = "Bit 6 - Wake-Up Frame Received"]
51 #[inline(always)]
52 pub fn rwkprcvd(&self) -> RWKPRCVD_R {
53 RWKPRCVD_R::new(((self.bits >> 6) & 1) != 0)
54 }
55 #[doc = "Bit 9 - Global Unicast"]
56 #[inline(always)]
57 pub fn glblucast(&self) -> GLBLUCAST_R {
58 GLBLUCAST_R::new(((self.bits >> 9) & 1) != 0)
59 }
60 #[doc = "Bit 31 - Wake-Up Frame Filter Register Pointer Reset"]
61 #[inline(always)]
62 pub fn rwkfiltrst(&self) -> RWKFILTRST_R {
63 RWKFILTRST_R::new(((self.bits >> 31) & 1) != 0)
64 }
65}
66impl W {
67 #[doc = "Bit 0 - Power Down"]
68 #[inline(always)]
69 pub fn pwrdwn(&mut self) -> PWRDWN_W<PMT_CONTROL_STATUS_SPEC> {
70 PWRDWN_W::new(self, 0)
71 }
72 #[doc = "Bit 1 - Magic Packet Enable"]
73 #[inline(always)]
74 pub fn mgkpkten(&mut self) -> MGKPKTEN_W<PMT_CONTROL_STATUS_SPEC> {
75 MGKPKTEN_W::new(self, 1)
76 }
77 #[doc = "Bit 2 - Wake-Up Frame Enable"]
78 #[inline(always)]
79 pub fn rwkpkten(&mut self) -> RWKPKTEN_W<PMT_CONTROL_STATUS_SPEC> {
80 RWKPKTEN_W::new(self, 2)
81 }
82 #[doc = "Bit 9 - Global Unicast"]
83 #[inline(always)]
84 pub fn glblucast(&mut self) -> GLBLUCAST_W<PMT_CONTROL_STATUS_SPEC> {
85 GLBLUCAST_W::new(self, 9)
86 }
87 #[doc = "Bit 31 - Wake-Up Frame Filter Register Pointer Reset"]
88 #[inline(always)]
89 pub fn rwkfiltrst(&mut self) -> RWKFILTRST_W<PMT_CONTROL_STATUS_SPEC> {
90 RWKFILTRST_W::new(self, 31)
91 }
92}
93#[doc = "PMT Control and Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`pmt_control_status::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pmt_control_status::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
94pub struct PMT_CONTROL_STATUS_SPEC;
95impl crate::RegisterSpec for PMT_CONTROL_STATUS_SPEC {
96 type Ux = u32;
97}
98#[doc = "`read()` method returns [`pmt_control_status::R`](R) reader structure"]
99impl crate::Readable for PMT_CONTROL_STATUS_SPEC {}
100#[doc = "`write(|w| ..)` method takes [`pmt_control_status::W`](W) writer structure"]
101impl crate::Writable for PMT_CONTROL_STATUS_SPEC {
102 type Safety = crate::Unsafe;
103 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
104 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
105}
106#[doc = "`reset()` method sets PMT_CONTROL_STATUS to value 0"]
107impl crate::Resettable for PMT_CONTROL_STATUS_SPEC {
108 const RESET_VALUE: u32 = 0;
109}