Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,8 +834,10 @@ pub trait Capture {
/// # type Channel = Channel;
/// # type Time = KiloHertz;
/// # type Duty = u16;
/// # fn disable(&mut self, _: Channel) { unimplemented!() }
/// # fn enable(&mut self, _: Channel) { unimplemented!() }
/// # fn disable(&mut self) { unimplemented!() }
/// # fn enable(&mut self) { unimplemented!() }
/// # fn channel_disable(&mut self, _: Channel) { unimplemented!() }
/// # fn channel_enable(&mut self, _: Channel) { unimplemented!() }
/// # fn get_duty(&self, _: Channel) -> u16 { unimplemented!() }
/// # fn get_max_duty(&self) -> u16 { 0 }
/// # fn set_duty(&mut self, _: Channel, _: u16) {}
Expand All @@ -862,11 +864,17 @@ pub trait Pwm {
/// (e.g. `0.0 .. 1.0`) or an integer representation (e.g. `0 .. 65535`)
type Duty;

/// Disables a PWM timer (all channels)
fn disable(&mut self);

/// Enables a PWM timer (all channels)
fn enable(&mut self);

/// Disables a PWM `channel`
fn disable(&mut self, channel: Self::Channel);
fn channel_disable(&mut self, channel: Self::Channel);

/// Enables a PWM `channel`
fn enable(&mut self, channel: Self::Channel);
fn channel_enable(&mut self, channel: Self::Channel);

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