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

steal() peripherals; update changelog #69

Merged
merged 2 commits into from
Jul 1, 2020
Merged

steal() peripherals; update changelog #69

merged 2 commits into from
Jul 1, 2020

Conversation

mciantyre
Copy link
Member

The PR adds a new function, steal(), to Peripherals. steal() lets users unsafely acquire all of the peripheral objects. It's unsafe, because the peripherals could be used elsewhere.

steal() is used by the RTIC framework to acquire device peripherals. The framework then hands-off the peripherals to the user, who can configure them and wrap them as additional (late) resources.

Users can steal() peripherals in non-RTIC applications. Note that steal() always returns the "uninitialized" types, which require additional setup to be useful. In that regard, it's a round-about, unsafe approach towards #20. However, as of this writing, there's no testing to see if re-initializing works for all peripherals.

@mciantyre mciantyre requested a review from teburd June 30, 2020 22:13
@teburd teburd merged commit 9543809 into imxrt-rs:master Jul 1, 2020
mitchmindtree added a commit to mitchmindtree/teensy4-rs that referenced this pull request Jul 1, 2020
As of imxrt-rs/imxrt-hal#67 and imxrt-rs/imxrt-hal#68 the `ral` workaround
is no longer necessary.

As of imxrt-rs/imxrt-hal#69 `Peripherals::steal` is available on the
master branch.
@mciantyre mciantyre deleted the feature/rtic-steal branch July 1, 2020 21:19
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