embassy-rs / embassy

Modern embedded framework, using Rust and async.
https://embassy.dev
Apache License 2.0
5.67k stars 791 forks source link

AVR support? #570

Open jeremysalwen opened 2 years ago

jeremysalwen commented 2 years ago

I noticed that this project reserved the crate embassy-avr: https://lib.rs/crates/embassy-avr Does this foretell AVR support in the near future?

wbrickner commented 1 year ago

Bump. Is there a way to do this? I'd love to use embassy for all my arduino projects. I don't know how to set this up myself unfortunately

cherrydev commented 1 year ago

I too would like to see this. Unfortunately I'm pretty much a rust beginner so I'm not going to be much help. That said, the documentation says that you can use a 3rd party HAL with embassy and if you look at the esp-rs/esp-hal repo in the esp-hal-common module you'll see how it's implemented.

niclashoyer commented 1 year ago

I hacked together a working embassy executor and a working time driver with a fixed frequency. Please be aware that this is just a proof of concept, as there are no async driver implementations for other peripherals yet.

Embassy executor: https://github.com/niclashoyer/embassy/blob/avr/embassy-executor/src/arch/avr.rs

Blink/hello world example (using simavr and async delays): https://github.com/niclashoyer/embassy-avr-blink