2 ms·
Embedded-HAL is interesting to me - in principle it's a great concept; writing hardware-agnostic, portable code. I don't use it in my firmwares because: - A
by the__alchemist 3y ago
Embedded-HAL is interesting to me - in principle it's a great concept; writing hardware-agnostic, portable code.
I don't use it in my firmwares because:
- All of the embedded-HAL libs I've found (eg drivers) have had notable limitations or ergonomics problems.
- It appears unsuitable for use with DMA, which I use for all runtime IO
- The APIs tend to be a mess due to heavy use of typestates
- dirbaio 3y ago> It appears unsuitable for use with DMA, which I use for all runtime IO The `embedded-hal-async` traits can be implemented with DMA, the Embassy HALs do so. This is a problem with the `nb` traits only. > The APIs tend to be a mess due to heavy use of typestates This is an issue of some HAL crates implementing the traits, not with the `embedded-hal` traits themselves. I also dislike the heavy use of typestates/generics, Embassy tries to implement the traits while keeping typestates at a minimum. (disclaimer: Embassy maintainer here)