Skip to content

Commit 1680829

Browse files
authored
Add methods to enable/disable the entire timer
1 parent 62a5dc6 commit 1680829

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,11 +862,17 @@ pub trait Pwm {
862862
/// (e.g. `0.0 .. 1.0`) or an integer representation (e.g. `0 .. 65535`)
863863
type Duty;
864864

865+
/// Disables a PWM timer (all channels)
866+
fn disable(&mut self);
867+
868+
/// Enables a PWM timer (all channels)
869+
fn enable(&mut self);
870+
865871
/// Disables a PWM `channel`
866-
fn disable(&mut self, channel: Self::Channel);
872+
fn channel_disable(&mut self, channel: Self::Channel);
867873

868874
/// Enables a PWM `channel`
869-
fn enable(&mut self, channel: Self::Channel);
875+
fn channel_enable(&mut self, channel: Self::Channel);
870876

871877
/// Returns the current PWM period
872878
fn get_period(&self) -> Self::Time;

0 commit comments

Comments
 (0)