Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wrote a GPIO driver in Rust for STM32. It's macro and DRY soup! Although this is because I wanted a single `Pin` type abstraction, while STM32 register blocks are defined at the port level. (STM32 has ~7 GPIO ports depending on variant) Results in a clean API, but a messy implementation.

Alternatively, I could have written a port-based approach that would have had a cleaner implementation, but a more complex API.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: