Skip to content

Commit

Permalink
Fix name of trait for embedded-hal 1.0 and add missing import (google…
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor authored Jun 26, 2024
1 parent 31d1182 commit b1a0287
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/exercises/bare-metal/compass.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b1a0287

Please sign in to comment.