1#[doc = "Register `EVCTRL` reader"]
2pub type R = crate::R<EvctrlSpec>;
3#[doc = "Register `EVCTRL` writer"]
4pub type W = crate::W<EvctrlSpec>;
5#[doc = "Field `STARTEI0` reader - Start Conversion Event Input DAC 0"]
6pub type Startei0R = crate::BitReader;
7#[doc = "Field `STARTEI0` writer - Start Conversion Event Input DAC 0"]
8pub type Startei0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `STARTEI1` reader - Start Conversion Event Input DAC 1"]
10pub type Startei1R = crate::BitReader;
11#[doc = "Field `STARTEI1` writer - Start Conversion Event Input DAC 1"]
12pub type Startei1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `EMPTYEO0` reader - Data Buffer Empty Event Output DAC 0"]
14pub type Emptyeo0R = crate::BitReader;
15#[doc = "Field `EMPTYEO0` writer - Data Buffer Empty Event Output DAC 0"]
16pub type Emptyeo0W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `EMPTYEO1` reader - Data Buffer Empty Event Output DAC 1"]
18pub type Emptyeo1R = crate::BitReader;
19#[doc = "Field `EMPTYEO1` writer - Data Buffer Empty Event Output DAC 1"]
20pub type Emptyeo1W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `INVEI0` reader - Enable Invertion of DAC 0 input event"]
22pub type Invei0R = crate::BitReader;
23#[doc = "Field `INVEI0` writer - Enable Invertion of DAC 0 input event"]
24pub type Invei0W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `INVEI1` reader - Enable Invertion of DAC 1 input event"]
26pub type Invei1R = crate::BitReader;
27#[doc = "Field `INVEI1` writer - Enable Invertion of DAC 1 input event"]
28pub type Invei1W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `RESRDYEO0` reader - Result Ready Event Output 0"]
30pub type Resrdyeo0R = crate::BitReader;
31#[doc = "Field `RESRDYEO0` writer - Result Ready Event Output 0"]
32pub type Resrdyeo0W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `RESRDYEO1` reader - Result Ready Event Output 1"]
34pub type Resrdyeo1R = crate::BitReader;
35#[doc = "Field `RESRDYEO1` writer - Result Ready Event Output 1"]
36pub type Resrdyeo1W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[doc = "Bit 0 - Start Conversion Event Input DAC 0"]
39 #[inline(always)]
40 pub fn startei0(&self) -> Startei0R {
41 Startei0R::new((self.bits & 1) != 0)
42 }
43 #[doc = "Bit 1 - Start Conversion Event Input DAC 1"]
44 #[inline(always)]
45 pub fn startei1(&self) -> Startei1R {
46 Startei1R::new(((self.bits >> 1) & 1) != 0)
47 }
48 #[doc = "Bit 2 - Data Buffer Empty Event Output DAC 0"]
49 #[inline(always)]
50 pub fn emptyeo0(&self) -> Emptyeo0R {
51 Emptyeo0R::new(((self.bits >> 2) & 1) != 0)
52 }
53 #[doc = "Bit 3 - Data Buffer Empty Event Output DAC 1"]
54 #[inline(always)]
55 pub fn emptyeo1(&self) -> Emptyeo1R {
56 Emptyeo1R::new(((self.bits >> 3) & 1) != 0)
57 }
58 #[doc = "Bit 4 - Enable Invertion of DAC 0 input event"]
59 #[inline(always)]
60 pub fn invei0(&self) -> Invei0R {
61 Invei0R::new(((self.bits >> 4) & 1) != 0)
62 }
63 #[doc = "Bit 5 - Enable Invertion of DAC 1 input event"]
64 #[inline(always)]
65 pub fn invei1(&self) -> Invei1R {
66 Invei1R::new(((self.bits >> 5) & 1) != 0)
67 }
68 #[doc = "Bit 6 - Result Ready Event Output 0"]
69 #[inline(always)]
70 pub fn resrdyeo0(&self) -> Resrdyeo0R {
71 Resrdyeo0R::new(((self.bits >> 6) & 1) != 0)
72 }
73 #[doc = "Bit 7 - Result Ready Event Output 1"]
74 #[inline(always)]
75 pub fn resrdyeo1(&self) -> Resrdyeo1R {
76 Resrdyeo1R::new(((self.bits >> 7) & 1) != 0)
77 }
78}
79impl W {
80 #[doc = "Bit 0 - Start Conversion Event Input DAC 0"]
81 #[inline(always)]
82 #[must_use]
83 pub fn startei0(&mut self) -> Startei0W<EvctrlSpec> {
84 Startei0W::new(self, 0)
85 }
86 #[doc = "Bit 1 - Start Conversion Event Input DAC 1"]
87 #[inline(always)]
88 #[must_use]
89 pub fn startei1(&mut self) -> Startei1W<EvctrlSpec> {
90 Startei1W::new(self, 1)
91 }
92 #[doc = "Bit 2 - Data Buffer Empty Event Output DAC 0"]
93 #[inline(always)]
94 #[must_use]
95 pub fn emptyeo0(&mut self) -> Emptyeo0W<EvctrlSpec> {
96 Emptyeo0W::new(self, 2)
97 }
98 #[doc = "Bit 3 - Data Buffer Empty Event Output DAC 1"]
99 #[inline(always)]
100 #[must_use]
101 pub fn emptyeo1(&mut self) -> Emptyeo1W<EvctrlSpec> {
102 Emptyeo1W::new(self, 3)
103 }
104 #[doc = "Bit 4 - Enable Invertion of DAC 0 input event"]
105 #[inline(always)]
106 #[must_use]
107 pub fn invei0(&mut self) -> Invei0W<EvctrlSpec> {
108 Invei0W::new(self, 4)
109 }
110 #[doc = "Bit 5 - Enable Invertion of DAC 1 input event"]
111 #[inline(always)]
112 #[must_use]
113 pub fn invei1(&mut self) -> Invei1W<EvctrlSpec> {
114 Invei1W::new(self, 5)
115 }
116 #[doc = "Bit 6 - Result Ready Event Output 0"]
117 #[inline(always)]
118 #[must_use]
119 pub fn resrdyeo0(&mut self) -> Resrdyeo0W<EvctrlSpec> {
120 Resrdyeo0W::new(self, 6)
121 }
122 #[doc = "Bit 7 - Result Ready Event Output 1"]
123 #[inline(always)]
124 #[must_use]
125 pub fn resrdyeo1(&mut self) -> Resrdyeo1W<EvctrlSpec> {
126 Resrdyeo1W::new(self, 7)
127 }
128}
129#[doc = "Event Control\n\nYou can [`read`](crate::Reg::read) this register and get [`evctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`evctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
130pub struct EvctrlSpec;
131impl crate::RegisterSpec for EvctrlSpec {
132 type Ux = u8;
133}
134#[doc = "`read()` method returns [`evctrl::R`](R) reader structure"]
135impl crate::Readable for EvctrlSpec {}
136#[doc = "`write(|w| ..)` method takes [`evctrl::W`](W) writer structure"]
137impl crate::Writable for EvctrlSpec {
138 type Safety = crate::Unsafe;
139 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
140 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
141}
142#[doc = "`reset()` method sets EVCTRL to value 0"]
143impl crate::Resettable for EvctrlSpec {
144 const RESET_VALUE: u8 = 0;
145}