From 4e154a7eec949877341133c3626d304b1d539bdc Mon Sep 17 00:00:00 2001 From: Raul Victor Trombin Date: Thu, 14 Sep 2023 15:29:35 -0300 Subject: [PATCH] src: lib: pwm: Change pwm_enable to use only OE pin --- src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 84aa42d495..a55bfdaa24 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -378,6 +378,7 @@ impl Navigator { self.pwm.reset_internal_driver_state(); self.pwm.use_external_clock().unwrap(); self.pwm.set_prescale(100).unwrap(); + self.pwm.enable().unwrap(); self.bmp.zero().unwrap(); @@ -404,10 +405,8 @@ impl Navigator { /// Please check [`set_pwm_channel_value`](struct.Navigator.html#method.set_pwm_channel_value). pub fn pwm_enable(&mut self, state: bool) { if state { - self.pwm.enable().unwrap(); self.pwm.oe_pin.set_direction(Direction::Low).unwrap(); } else { - self.pwm.disable().unwrap(); self.pwm.oe_pin.set_direction(Direction::High).unwrap(); } }