stop->sequence_stop
This commit is contained in:
parent
96df2fdb43
commit
78e382c9aa
2 changed files with 3 additions and 3 deletions
|
@ -276,7 +276,7 @@ impl<'d, T: Instance> Pwm<'d, T> {
|
||||||
|
|
||||||
/// Stop playback
|
/// Stop playback
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn stop(&self) {
|
pub fn sequence_stop(&self) {
|
||||||
let r = T::regs();
|
let r = T::regs();
|
||||||
|
|
||||||
r.shorts.write(|w| unsafe { w.bits(0x0) });
|
r.shorts.write(|w| unsafe { w.bits(0x0) });
|
||||||
|
@ -363,7 +363,7 @@ impl<'d, T: Instance> Pwm<'d, T> {
|
||||||
|
|
||||||
impl<'a, T: Instance> Drop for Pwm<'a, T> {
|
impl<'a, T: Instance> Drop for Pwm<'a, T> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
self.stop();
|
self.sequence_stop();
|
||||||
self.disable();
|
self.disable();
|
||||||
|
|
||||||
info!("pwm drop: done");
|
info!("pwm drop: done");
|
||||||
|
|
|
@ -38,7 +38,7 @@ async fn main(_spawner: Spawner, p: Peripherals) {
|
||||||
|
|
||||||
Timer::after(Duration::from_millis(20000)).await;
|
Timer::after(Duration::from_millis(20000)).await;
|
||||||
|
|
||||||
pwm.stop();
|
pwm.sequence_stop();
|
||||||
info!("pwm stopped!");
|
info!("pwm stopped!");
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
|
Loading…
Reference in a new issue