Pwm enable and disable methods only work for channels

Open
#182 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
embedded-iot

Research direction

The issue names the Pwm trait but does not identify an implementation file or tests. Start by locating the trait and reviewing the existing enable and disable behavior, then compare the proposed timer-wide and channel-specific API. Done means the API design is agreed and its intended behavior is covered by appropriate tests.

Written by the indexing model from the issue text.

Description

enhancement

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).

Dominant language
Rust
Stars
2.7k
Forks
282
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-embedded/embedded-hal

All issues in rust-embedded/embedded-hal

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.