1#[doc = "Register `EVSR` reader"]
2pub struct R(crate::R<EVSR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<EVSR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<EVSR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<EVSR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `EVSR` writer"]
17pub struct W(crate::W<EVSR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<EVSR_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<EVSR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<EVSR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `EV0` reader - EV0 field"]
38pub type EV0_R = crate::BitReader<bool>;
39#[doc = "Field `EV0` writer - EV0 field"]
40pub type EV0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVSR_SPEC, bool, O>;
41#[doc = "Field `EV1` reader - EV1 field"]
42pub type EV1_R = crate::BitReader<bool>;
43#[doc = "Field `EV1` writer - EV1 field"]
44pub type EV1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVSR_SPEC, bool, O>;
45#[doc = "Field `EV2` reader - EV2 field"]
46pub type EV2_R = crate::BitReader<bool>;
47#[doc = "Field `EV2` writer - EV2 field"]
48pub type EV2_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVSR_SPEC, bool, O>;
49#[doc = "Field `EV3` reader - EV3 field"]
50pub type EV3_R = crate::BitReader<bool>;
51#[doc = "Field `EV3` writer - EV3 field"]
52pub type EV3_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVSR_SPEC, bool, O>;
53#[doc = "Field `EV4` reader - EV4 field"]
54pub type EV4_R = crate::BitReader<bool>;
55#[doc = "Field `EV4` writer - EV4 field"]
56pub type EV4_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVSR_SPEC, bool, O>;
57#[doc = "Field `EV5` reader - EV5 field"]
58pub type EV5_R = crate::BitReader<bool>;
59#[doc = "Field `EV5` writer - EV5 field"]
60pub type EV5_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVSR_SPEC, bool, O>;
61#[doc = "Field `EV6` reader - EV6 field"]
62pub type EV6_R = crate::BitReader<bool>;
63#[doc = "Field `EV6` writer - EV6 field"]
64pub type EV6_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVSR_SPEC, bool, O>;
65impl R {
66 #[doc = "Bit 0 - EV0 field"]
67 #[inline(always)]
68 pub fn ev0(&self) -> EV0_R {
69 EV0_R::new((self.bits & 1) != 0)
70 }
71 #[doc = "Bit 1 - EV1 field"]
72 #[inline(always)]
73 pub fn ev1(&self) -> EV1_R {
74 EV1_R::new(((self.bits >> 1) & 1) != 0)
75 }
76 #[doc = "Bit 2 - EV2 field"]
77 #[inline(always)]
78 pub fn ev2(&self) -> EV2_R {
79 EV2_R::new(((self.bits >> 2) & 1) != 0)
80 }
81 #[doc = "Bit 3 - EV3 field"]
82 #[inline(always)]
83 pub fn ev3(&self) -> EV3_R {
84 EV3_R::new(((self.bits >> 3) & 1) != 0)
85 }
86 #[doc = "Bit 4 - EV4 field"]
87 #[inline(always)]
88 pub fn ev4(&self) -> EV4_R {
89 EV4_R::new(((self.bits >> 4) & 1) != 0)
90 }
91 #[doc = "Bit 5 - EV5 field"]
92 #[inline(always)]
93 pub fn ev5(&self) -> EV5_R {
94 EV5_R::new(((self.bits >> 5) & 1) != 0)
95 }
96 #[doc = "Bit 6 - EV6 field"]
97 #[inline(always)]
98 pub fn ev6(&self) -> EV6_R {
99 EV6_R::new(((self.bits >> 6) & 1) != 0)
100 }
101}
102impl W {
103 #[doc = "Bit 0 - EV0 field"]
104 #[inline(always)]
105 pub fn ev0(&mut self) -> EV0_W<0> {
106 EV0_W::new(self)
107 }
108 #[doc = "Bit 1 - EV1 field"]
109 #[inline(always)]
110 pub fn ev1(&mut self) -> EV1_W<1> {
111 EV1_W::new(self)
112 }
113 #[doc = "Bit 2 - EV2 field"]
114 #[inline(always)]
115 pub fn ev2(&mut self) -> EV2_W<2> {
116 EV2_W::new(self)
117 }
118 #[doc = "Bit 3 - EV3 field"]
119 #[inline(always)]
120 pub fn ev3(&mut self) -> EV3_W<3> {
121 EV3_W::new(self)
122 }
123 #[doc = "Bit 4 - EV4 field"]
124 #[inline(always)]
125 pub fn ev4(&mut self) -> EV4_W<4> {
126 EV4_W::new(self)
127 }
128 #[doc = "Bit 5 - EV5 field"]
129 #[inline(always)]
130 pub fn ev5(&mut self) -> EV5_W<5> {
131 EV5_W::new(self)
132 }
133 #[doc = "Bit 6 - EV6 field"]
134 #[inline(always)]
135 pub fn ev6(&mut self) -> EV6_W<6> {
136 EV6_W::new(self)
137 }
138 #[doc = "Writes raw bits to the register."]
139 #[inline(always)]
140 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
141 self.0.bits(bits);
142 self
143 }
144}
145#[doc = "EVSR register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [evsr](index.html) module"]
146pub struct EVSR_SPEC;
147impl crate::RegisterSpec for EVSR_SPEC {
148 type Ux = u32;
149}
150#[doc = "`read()` method returns [evsr::R](R) reader structure"]
151impl crate::Readable for EVSR_SPEC {
152 type Reader = R;
153}
154#[doc = "`write(|w| ..)` method takes [evsr::W](W) writer structure"]
155impl crate::Writable for EVSR_SPEC {
156 type Writer = W;
157}
158#[doc = "`reset()` method sets EVSR to value 0"]
159impl crate::Resettable for EVSR_SPEC {
160 #[inline(always)]
161 fn reset_value() -> Self::Ux {
162 0
163 }
164}