3 ms·
Simplified Embedded Rust: ESP Standard Library Edition
- deleted 2y ago[deleted]
- atoav 2y agoJust looking at the index I think one thing that I'd really like to see is an example of how to deal with e.g. some I2C peripheral where in c/c++ world you'd just get someones library. Because as much as I like Rust, I probably wont write my own OLED display driver and graphics library of I have the choice to avoid it.
- apollolabsbin 2y agoThis is a great idea. The book is actually subscription-based and will be updated regularly. This could be included in a future version. You can submit a feature request on the GitHub repo of the book to capture it (https://github.com/theembeddedrustacean/ser-std https://github.com/theembeddedrustacean/ser-std). Though to your point, in Rust, achieving what you mentioned is really streamlined devoid of headache. Meaning, all you need to do is find a driver crate on crates.io, include it in your toml configuration file. Then all abstractions are available.
- atoav 2y agoCool if this is easy — Idk why this was my perception — your book could help clearing up such misconceptions by showing that it is in fact not that hard.
- jagged-chisel 2y agoI think this [1] might answer your question. Still curious whether OP’s linked book goes this route. 1 - https://docs.rust-embedded.org/discovery/microbit/04-meet-your-hardware/terminology.html https://docs.rust-embedded.org/discovery/microbit/04-meet-yo...
- f_devd 2y agoHaving written some esp-hal rust, you can also just use crates which use embedded-hal (for the I2C part) and embedded-graphics (for the display driver part). If they don't exist it's usually quite easy to port the C/C++ code to rust which implements those traits
- atoav 2y agoI just thought this would be a good thing to include in such a book.