aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Rosenthal <[email protected]>2021-11-10 18:52:03 -0700
committerJacob Rosenthal <[email protected]>2021-11-10 18:52:03 -0700
commitc6736abf5e0f59c0bd96cf6f57c1f23c50fc54cd (patch)
treecfe921a58ab25cc8e6edc6fc8fd1a75966b5a97e
parent2973ff4cf05458cb80718c35c7fe9fa690d0cf8b (diff)
dont wait seqend for sequencepwm
-rw-r--r--embassy-nrf/src/pwm.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/embassy-nrf/src/pwm.rs b/embassy-nrf/src/pwm.rs
index c8e391133..a53956c6e 100644
--- a/embassy-nrf/src/pwm.rs
+++ b/embassy-nrf/src/pwm.rs
@@ -166,10 +166,6 @@ impl<'d, T: Instance> SequencePwm<'d, T> {
166 r.loop_.write(|w| w.cnt().disabled()); 166 r.loop_.write(|w| w.cnt().disabled());
167 // tasks_seqstart() doesn't exist in all svds so write its bit instead 167 // tasks_seqstart() doesn't exist in all svds so write its bit instead
168 r.tasks_seqstart[0].write(|w| unsafe { w.bits(0x01) }); 168 r.tasks_seqstart[0].write(|w| unsafe { w.bits(0x01) });
169
170 // defensive wait until waveform is loaded after seqstart
171 while r.events_seqend[0].read().bits() == 0 {}
172 r.events_seqend[0].write(|w| w);
173 } 169 }
174 // loop count is how many times to play BOTH sequences 170 // loop count is how many times to play BOTH sequences
175 // 2 total (1 x 2) 171 // 2 total (1 x 2)
@@ -184,17 +180,9 @@ impl<'d, T: Instance> SequencePwm<'d, T> {
184 if odd { 180 if odd {
185 // tasks_seqstart() doesn't exist in all svds so write its bit instead 181 // tasks_seqstart() doesn't exist in all svds so write its bit instead
186 r.tasks_seqstart[1].write(|w| unsafe { w.bits(0x01) }); 182 r.tasks_seqstart[1].write(|w| unsafe { w.bits(0x01) });
187
188 // defensive wait until waveform is loaded after seqstart
189 while r.events_seqend[1].read().bits() == 0 {}
190 r.events_seqend[1].write(|w| w);
191 } else { 183 } else {
192 // tasks_seqstart() doesn't exist in all svds so write its bit instead 184 // tasks_seqstart() doesn't exist in all svds so write its bit instead
193 r.tasks_seqstart[0].write(|w| unsafe { w.bits(0x01) }); 185 r.tasks_seqstart[0].write(|w| unsafe { w.bits(0x01) });
194
195 // defensive wait until waveform is loaded after seqstart
196 while r.events_seqend[0].read().bits() == 0 {}
197 r.events_seqend[0].write(|w| w);
198 } 186 }
199 } 187 }
200 // to play infinitely, repeat the sequence one time, then have loops done self trigger seq0 again 188 // to play infinitely, repeat the sequence one time, then have loops done self trigger seq0 again
@@ -204,10 +192,6 @@ impl<'d, T: Instance> SequencePwm<'d, T> {
204 192
205 // tasks_seqstart() doesn't exist in all svds so write its bit instead 193 // tasks_seqstart() doesn't exist in all svds so write its bit instead
206 r.tasks_seqstart[0].write(|w| unsafe { w.bits(0x01) }); 194 r.tasks_seqstart[0].write(|w| unsafe { w.bits(0x01) });
207
208 // defensive wait until waveform is loaded after seqstart
209 while r.events_seqend[0].read().bits() == 0 {}
210 r.events_seqend[0].write(|w| w);
211 } 195 }
212 } 196 }
213 197