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

Update to embedded-hal v1.0.0-alpha.1 #144

Closed
wants to merge 1 commit into from

Conversation

maxekman
Copy link

@maxekman maxekman commented Apr 28, 2020

I needed to have the crate updated to use the new embedded-hal traits for the development of the I2S proposal (rust-embedded/embedded-hal#204).

I'm new to the Rust and Rust embedded eco systems and not familiar with how the updates are usually done to all the HAL crates under stm32-rs, but I'll be glad to provide this if helpful. I'll leave it open for comments and further work until embedded-hal has released its next version (1.0?).

  • Return correct errors where possible. Needs work to understand where we can get statuses from the MCU etc.
  • Decide which error to use for functions that is not expected to fail. Suggestions?
  • Handle ignored return values in a idiomatic way. Suggestions?

@@ -105,7 +107,7 @@ impl Timer<SYST> {
{
syst.set_clock_source(SystClkSource::Core);
let mut timer = Timer { tim: syst, clocks };
timer.start(timeout);
let _ = timer.try_start(timeout);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this way to handle the unused Result, suggestions?

@maxekman maxekman force-pushed the update-to-try-functions branch 3 times, most recently from e31ef63 to f94d109 Compare April 30, 2020 11:05
src/delay.rs Show resolved Hide resolved
@maxekman maxekman changed the title Update to use try_ functions Update to use try_ functions (for embedded-hal v1.x) May 14, 2020
@luojia65
Copy link

luojia65 commented Jul 26, 2020

You may update to version embedded-hal's 1.0.0-alpha.1 and continue with the work now

@maxekman
Copy link
Author

Thanks @luojia65, I’ll do that.

@eldruin
Copy link
Member

eldruin commented Jul 26, 2020

Linking to rust-embedded/embedded-hal#177

@maxekman maxekman changed the title Update to use try_ functions (for embedded-hal v1.x) Update to embedded-hal v1.0.0-alpha.1 Sep 13, 2020
@maxekman
Copy link
Author

I'll close this as it's not updated according to the guidelines for how to support 0.2.x and 1.0.0-alpha: https://github.com/rust-embedded/embedded-hal#adding-support-for-an-embedded-hal--alpha-version-in-a-hal-implementation

@maxekman maxekman closed this May 14, 2021
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.

4 participants