From b1a0287ec5b917515e538b69044171ea76904951 Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Wed, 26 Jun 2024 14:55:11 +0100 Subject: [PATCH] Fix name of trait for embedded-hal 1.0 and add missing import (#2174) --- src/exercises/bare-metal/compass.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/exercises/bare-metal/compass.md b/src/exercises/bare-metal/compass.md index 304be3a0..c4d5291d 100644 --- a/src/exercises/bare-metal/compass.md +++ b/src/exercises/bare-metal/compass.md @@ -12,8 +12,8 @@ Hints: as the [micro:bit hardware](https://tech.microbit.org/hardware/). - The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus. - TWI is another name for I2C, so the I2C master peripheral is called TWIM. -- The LSM303AGR driver needs something implementing the - `embedded_hal::blocking::i2c::WriteRead` trait. The +- The LSM303AGR driver needs something implementing the `embedded_hal::i2c::I2c` + trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this. - You have a @@ -33,7 +33,7 @@ _src/main.rs_: ```rust,compile_fail {{#include compass/src/main.rs:top}} -use microbit::{hal::uarte::{Baudrate, Parity, Uarte}, Board}; +use microbit::{hal::{Delay, uarte::{Baudrate, Parity, Uarte}}, Board}; {{#include compass/src/main.rs:main}} // TODO