Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't own DWT #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Don't own DWT #7

wants to merge 2 commits into from

Conversation

jordens
Copy link
Contributor

@jordens jordens commented Feb 4, 2022

The DWT has a lot of other functionality besides the cycle counter that the user can currently not access safely as DwtSystick owns DWT.
Once set up (new() and reset()) DwtSystick only needs the DWT to read the cycle counter. That could also be done safely without owning the DWT.
If we borrow DWT only for cycle counter configuration, the user could keep and use its other functionality afterwards. The downside is that the user would have to manually ensure that they don't disable or reset cycle counter after reset().
On balance this may be acceptable.

This is fine as long as the user does not change or disable the cycle
counter. It allows the other DWT features to be used freely by the
application.
Cargo.toml Outdated Show resolved Hide resolved
* upstream/master:
  restrict ext pub use
  Update Cargo.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants