
Embedded
Migrate a Driver From embedded-hal 0.2 to 1.0
Port a driver from embedded-hal 0.2 to 1.0 with exact trait changes for I2C, SPI, GPIO and delays, plus the embedded-hal-compat bridge for mixed crates.
7 min read
Tag
4 posts

Port a driver from embedded-hal 0.2 to 1.0 with exact trait changes for I2C, SPI, GPIO and delays, plus the embedded-hal-compat bridge for mixed crates.

Build a TMP102 temperature driver generic over the embedded-hal 1.0 I2c trait, with typed errors, a release method and host unit tests using embedded-hal-mock.

Learn the layers of embedded Rust crates, from cortex-m and the PAC through the HAL to a board support crate, with one pin toggle written at each level.

Learn embedded Rust from an empty directory to flashed, logged, interrupt-driven firmware on a Cortex-M board, with the toolchain, crates and mental model.