embedded-hal
embedded-hal copied to clipboard
Pwm enable and disable methods only work for channels
In a review of the Pwm trait, I noticed that there is no way to disable a timer completely. The existing enable
and disable
methods are designed for specific channels. I think there ought to be some method to generally disable the entire timer. I think that the current methods should be re-purposed as the generate timer disable/enable and then two new methods could be introduced to support channel enable/disable. These new methods could be called enable_channel
/disable_channel
. The remaining methods would not need to be altered as they are understood by context (ie, one cannot specify the duty for all of the channels at once, it is understood that is a per-channel operation).