-
Notifications
You must be signed in to change notification settings - Fork 50
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
Relationship with Embedded-HAL #13
Comments
Through some more research, thanks to the awesome-avr-rust repo, I found my way to https://github.com/Rahix/avr-hal . This seems like the direction I need to go to get embedded-hal driver support. Is there any interest in refactoring this project to be based on avr-hal in the future to reduce duplicate effort? |
I think there's a usecase for both - a simple Arduino-like library, and an embedded-hal implementation. You've noticed @Rahix's avr-hal crate, I'm fairly certain I've seen at least two other ports to AVR on GitHub around the place. It would make sense to have a "blessed", or at least endorsed, AVR-hal implementation, similar to how the The |
So, funny thing @dylanmckay: I was thinking about asking if we should move my crates to avr-rust but was too afraid to ask so far as there is still so little to show. I don't know if you have taken a look at my work so far, so just as a small overview: There are currently three relevant crates:
|
@dylanmckay @Rahix I agree it would make sense to consolidate the projects, I was going to suggest that too 😂
I don't think that's true, you've got demos with full GPIO and Serial support (that I've tested). There's more work to be done, but it's already useful in its current state
In my (poorly informed) opinion, it stands to reason that the Arduino-like library would be an abstraction layer on top of avr-hal (or at least avr-device_, to share the registry definitions). Then we'd benefit from less duplicate code, while offering an optional higher-level interface that's closer to what a user might expect coming from Arduino IDE. |
Neat!
I agree. FWIW, whilst I think there's a need for something like a Most of my time, and if I may be presumptious, fellow avr-rust contributor's time, is focused on the compiler as that is a hard dependency for every Rust AVR project out there and so we are fairly myopic with our focus on Anyone got any good AVR example programs (blink, serial, etc) that use embedded-hal? I think it would be really good to create some kind of wiki page or README that outlines using embedded-hal on AVR, includes examples, and links to resources. |
Offtopic: does anyone have embedded-hal examples for analog IO for posting on #14? |
Data point: I just noticed the ruduino project has 237 stars, 62% of the stars of avr-rust. This means a sizable number of the people engaged on some small level with the project also engaged that same small amount with |
I've got you covered :) |
@dylanmckay: The current state is summarized in the project's README and whats up next can be seen in the issue tracker. I'd love to have a more complete implementation to show you but as this was redesigned from the ground up after my first attempt, there is still a lot missing. Though I hope the new design allows adding those parts much quicker. |
@dylanmckay I can totally understand not wanting to work on maintaining Ruduino. And I feel comfortable in saying that everyone greatly appreciates the work you and others have put into the compiler fork, and would like the focus to remain on getting it to a point where it can be merged upstream. I humbly propose the following timeline:
Expressed as Rust: while !avr_device.supports_features_of(ruduino) {
jonah_and_rahix.work_on(avr_device);
}
while !ruduino.calls_embedded_hal_traits() {
jonah_and_rahix.work_on(ruduino);
}
let is_adopted = embedded_hal.adopt(ruduino);
if let Err(error) = is_adopted {
Project::new().adopt(ruduino);
} |
What is the logical relationship between this project and Embedded-HAL? Would it make sense to modify this code (or fork a portion of the code) and make into an Embedded-HAL implementation for ATMega328p? It seems like that would enable the usage of all the available drivers on the Arduino Uno. But maybe there's more complexity here of which I'm unaware.
The text was updated successfully, but these errors were encountered: