atsamd21g/dmac/
swtrigctrl.rs
1#[doc = "Register `SWTRIGCTRL` reader"]
2pub type R = crate::R<SwtrigctrlSpec>;
3#[doc = "Register `SWTRIGCTRL` writer"]
4pub type W = crate::W<SwtrigctrlSpec>;
5#[doc = "Field `SWTRIG0` reader - Channel 0 Software Trigger"]
6pub type Swtrig0R = crate::BitReader;
7#[doc = "Field `SWTRIG0` writer - Channel 0 Software Trigger"]
8pub type Swtrig0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SWTRIG1` reader - Channel 1 Software Trigger"]
10pub type Swtrig1R = crate::BitReader;
11#[doc = "Field `SWTRIG1` writer - Channel 1 Software Trigger"]
12pub type Swtrig1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SWTRIG2` reader - Channel 2 Software Trigger"]
14pub type Swtrig2R = crate::BitReader;
15#[doc = "Field `SWTRIG2` writer - Channel 2 Software Trigger"]
16pub type Swtrig2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `SWTRIG3` reader - Channel 3 Software Trigger"]
18pub type Swtrig3R = crate::BitReader;
19#[doc = "Field `SWTRIG3` writer - Channel 3 Software Trigger"]
20pub type Swtrig3W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `SWTRIG4` reader - Channel 4 Software Trigger"]
22pub type Swtrig4R = crate::BitReader;
23#[doc = "Field `SWTRIG4` writer - Channel 4 Software Trigger"]
24pub type Swtrig4W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `SWTRIG5` reader - Channel 5 Software Trigger"]
26pub type Swtrig5R = crate::BitReader;
27#[doc = "Field `SWTRIG5` writer - Channel 5 Software Trigger"]
28pub type Swtrig5W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `SWTRIG6` reader - Channel 6 Software Trigger"]
30pub type Swtrig6R = crate::BitReader;
31#[doc = "Field `SWTRIG6` writer - Channel 6 Software Trigger"]
32pub type Swtrig6W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `SWTRIG7` reader - Channel 7 Software Trigger"]
34pub type Swtrig7R = crate::BitReader;
35#[doc = "Field `SWTRIG7` writer - Channel 7 Software Trigger"]
36pub type Swtrig7W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `SWTRIG8` reader - Channel 8 Software Trigger"]
38pub type Swtrig8R = crate::BitReader;
39#[doc = "Field `SWTRIG8` writer - Channel 8 Software Trigger"]
40pub type Swtrig8W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `SWTRIG9` reader - Channel 9 Software Trigger"]
42pub type Swtrig9R = crate::BitReader;
43#[doc = "Field `SWTRIG9` writer - Channel 9 Software Trigger"]
44pub type Swtrig9W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `SWTRIG10` reader - Channel 10 Software Trigger"]
46pub type Swtrig10R = crate::BitReader;
47#[doc = "Field `SWTRIG10` writer - Channel 10 Software Trigger"]
48pub type Swtrig10W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `SWTRIG11` reader - Channel 11 Software Trigger"]
50pub type Swtrig11R = crate::BitReader;
51#[doc = "Field `SWTRIG11` writer - Channel 11 Software Trigger"]
52pub type Swtrig11W<'a, REG> = crate::BitWriter<'a, REG>;
53impl R {
54 #[doc = "Bit 0 - Channel 0 Software Trigger"]
55 #[inline(always)]
56 pub fn swtrig0(&self) -> Swtrig0R {
57 Swtrig0R::new((self.bits & 1) != 0)
58 }
59 #[doc = "Bit 1 - Channel 1 Software Trigger"]
60 #[inline(always)]
61 pub fn swtrig1(&self) -> Swtrig1R {
62 Swtrig1R::new(((self.bits >> 1) & 1) != 0)
63 }
64 #[doc = "Bit 2 - Channel 2 Software Trigger"]
65 #[inline(always)]
66 pub fn swtrig2(&self) -> Swtrig2R {
67 Swtrig2R::new(((self.bits >> 2) & 1) != 0)
68 }
69 #[doc = "Bit 3 - Channel 3 Software Trigger"]
70 #[inline(always)]
71 pub fn swtrig3(&self) -> Swtrig3R {
72 Swtrig3R::new(((self.bits >> 3) & 1) != 0)
73 }
74 #[doc = "Bit 4 - Channel 4 Software Trigger"]
75 #[inline(always)]
76 pub fn swtrig4(&self) -> Swtrig4R {
77 Swtrig4R::new(((self.bits >> 4) & 1) != 0)
78 }
79 #[doc = "Bit 5 - Channel 5 Software Trigger"]
80 #[inline(always)]
81 pub fn swtrig5(&self) -> Swtrig5R {
82 Swtrig5R::new(((self.bits >> 5) & 1) != 0)
83 }
84 #[doc = "Bit 6 - Channel 6 Software Trigger"]
85 #[inline(always)]
86 pub fn swtrig6(&self) -> Swtrig6R {
87 Swtrig6R::new(((self.bits >> 6) & 1) != 0)
88 }
89 #[doc = "Bit 7 - Channel 7 Software Trigger"]
90 #[inline(always)]
91 pub fn swtrig7(&self) -> Swtrig7R {
92 Swtrig7R::new(((self.bits >> 7) & 1) != 0)
93 }
94 #[doc = "Bit 8 - Channel 8 Software Trigger"]
95 #[inline(always)]
96 pub fn swtrig8(&self) -> Swtrig8R {
97 Swtrig8R::new(((self.bits >> 8) & 1) != 0)
98 }
99 #[doc = "Bit 9 - Channel 9 Software Trigger"]
100 #[inline(always)]
101 pub fn swtrig9(&self) -> Swtrig9R {
102 Swtrig9R::new(((self.bits >> 9) & 1) != 0)
103 }
104 #[doc = "Bit 10 - Channel 10 Software Trigger"]
105 #[inline(always)]
106 pub fn swtrig10(&self) -> Swtrig10R {
107 Swtrig10R::new(((self.bits >> 10) & 1) != 0)
108 }
109 #[doc = "Bit 11 - Channel 11 Software Trigger"]
110 #[inline(always)]
111 pub fn swtrig11(&self) -> Swtrig11R {
112 Swtrig11R::new(((self.bits >> 11) & 1) != 0)
113 }
114}
115impl W {
116 #[doc = "Bit 0 - Channel 0 Software Trigger"]
117 #[inline(always)]
118 #[must_use]
119 pub fn swtrig0(&mut self) -> Swtrig0W<SwtrigctrlSpec> {
120 Swtrig0W::new(self, 0)
121 }
122 #[doc = "Bit 1 - Channel 1 Software Trigger"]
123 #[inline(always)]
124 #[must_use]
125 pub fn swtrig1(&mut self) -> Swtrig1W<SwtrigctrlSpec> {
126 Swtrig1W::new(self, 1)
127 }
128 #[doc = "Bit 2 - Channel 2 Software Trigger"]
129 #[inline(always)]
130 #[must_use]
131 pub fn swtrig2(&mut self) -> Swtrig2W<SwtrigctrlSpec> {
132 Swtrig2W::new(self, 2)
133 }
134 #[doc = "Bit 3 - Channel 3 Software Trigger"]
135 #[inline(always)]
136 #[must_use]
137 pub fn swtrig3(&mut self) -> Swtrig3W<SwtrigctrlSpec> {
138 Swtrig3W::new(self, 3)
139 }
140 #[doc = "Bit 4 - Channel 4 Software Trigger"]
141 #[inline(always)]
142 #[must_use]
143 pub fn swtrig4(&mut self) -> Swtrig4W<SwtrigctrlSpec> {
144 Swtrig4W::new(self, 4)
145 }
146 #[doc = "Bit 5 - Channel 5 Software Trigger"]
147 #[inline(always)]
148 #[must_use]
149 pub fn swtrig5(&mut self) -> Swtrig5W<SwtrigctrlSpec> {
150 Swtrig5W::new(self, 5)
151 }
152 #[doc = "Bit 6 - Channel 6 Software Trigger"]
153 #[inline(always)]
154 #[must_use]
155 pub fn swtrig6(&mut self) -> Swtrig6W<SwtrigctrlSpec> {
156 Swtrig6W::new(self, 6)
157 }
158 #[doc = "Bit 7 - Channel 7 Software Trigger"]
159 #[inline(always)]
160 #[must_use]
161 pub fn swtrig7(&mut self) -> Swtrig7W<SwtrigctrlSpec> {
162 Swtrig7W::new(self, 7)
163 }
164 #[doc = "Bit 8 - Channel 8 Software Trigger"]
165 #[inline(always)]
166 #[must_use]
167 pub fn swtrig8(&mut self) -> Swtrig8W<SwtrigctrlSpec> {
168 Swtrig8W::new(self, 8)
169 }
170 #[doc = "Bit 9 - Channel 9 Software Trigger"]
171 #[inline(always)]
172 #[must_use]
173 pub fn swtrig9(&mut self) -> Swtrig9W<SwtrigctrlSpec> {
174 Swtrig9W::new(self, 9)
175 }
176 #[doc = "Bit 10 - Channel 10 Software Trigger"]
177 #[inline(always)]
178 #[must_use]
179 pub fn swtrig10(&mut self) -> Swtrig10W<SwtrigctrlSpec> {
180 Swtrig10W::new(self, 10)
181 }
182 #[doc = "Bit 11 - Channel 11 Software Trigger"]
183 #[inline(always)]
184 #[must_use]
185 pub fn swtrig11(&mut self) -> Swtrig11W<SwtrigctrlSpec> {
186 Swtrig11W::new(self, 11)
187 }
188}
189#[doc = "Software Trigger Control\n\nYou can [`read`](crate::Reg::read) this register and get [`swtrigctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`swtrigctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
190pub struct SwtrigctrlSpec;
191impl crate::RegisterSpec for SwtrigctrlSpec {
192 type Ux = u32;
193}
194#[doc = "`read()` method returns [`swtrigctrl::R`](R) reader structure"]
195impl crate::Readable for SwtrigctrlSpec {}
196#[doc = "`write(|w| ..)` method takes [`swtrigctrl::W`](W) writer structure"]
197impl crate::Writable for SwtrigctrlSpec {
198 type Safety = crate::Unsafe;
199 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
200 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
201}
202#[doc = "`reset()` method sets SWTRIGCTRL to value 0"]
203impl crate::Resettable for SwtrigctrlSpec {
204 const RESET_VALUE: u32 = 0;
205}