|
39 | 39 | /// # type Channel = Channel;
|
40 | 40 | /// # type Time = KiloHertz;
|
41 | 41 | /// # type Duty = u16;
|
42 |
| -/// # fn try_disable(&mut self, _: Channel) -> Result<(), Self::Error> { unimplemented!() } |
43 |
| -/// # fn try_enable(&mut self, _: Channel) -> Result<(), Self::Error> { unimplemented!() } |
| 42 | +/// # fn try_disable(&mut self) -> Result<(), Self::Error> { unimplemented!() } |
| 43 | +/// # fn try_enable(&mut self) -> Result<(), Self::Error> { unimplemented!() } |
| 44 | +/// # fn try_disable_channel(&mut self, _: Channel) -> Result<(), Self::Error> { unimplemented!() } |
| 45 | +/// # fn try_enable_channel(&mut self, _: Channel) -> Result<(), Self::Error> { unimplemented!() } |
44 | 46 | /// # fn try_get_duty(&self, _: Channel) -> Result<u16, Self::Error> { unimplemented!() }
|
45 | 47 | /// # fn try_get_max_duty(&self) -> Result<u16, Self::Error> { Ok(0) }
|
46 | 48 | /// # fn try_set_duty(&mut self, _: Channel, _: u16) -> Result<(), Self::Error> { Ok(()) }
|
@@ -69,11 +71,17 @@ pub trait Pwm {
|
69 | 71 | /// (e.g. `0.0 .. 1.0`) or an integer representation (e.g. `0 .. 65535`)
|
70 | 72 | type Duty;
|
71 | 73 |
|
| 74 | + /// Disables all channels on the timer |
| 75 | + fn try_disable(&mut self) -> Result<(), Self::Error>; |
| 76 | + |
| 77 | + /// Enables all channels on the timer |
| 78 | + fn try_enable(&mut self) -> Result<(), Self::Error>; |
| 79 | + |
72 | 80 | /// Disables a PWM `channel`
|
73 |
| - fn try_disable(&mut self, channel: Self::Channel) -> Result<(), Self::Error>; |
| 81 | + fn try_disable_channel(&mut self, channel: Self::Channel) -> Result<(), Self::Error>; |
74 | 82 |
|
75 | 83 | /// Enables a PWM `channel`
|
76 |
| - fn try_enable(&mut self, channel: Self::Channel) -> Result<(), Self::Error>; |
| 84 | + fn try_enable_channel(&mut self, channel: Self::Channel) -> Result<(), Self::Error>; |
77 | 85 |
|
78 | 86 | /// Returns the current PWM period
|
79 | 87 | fn try_get_period(&self) -> Result<Self::Time, Self::Error>;
|
|
0 commit comments