1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-14 14:46:43 +02:00

Fix name of trait for embedded-hal 1.0 and add missing import (#2174)

This commit is contained in:
Andrew Walbran 2024-06-26 14:55:11 +01:00 committed by GitHub
parent 31d1182831
commit b1a0287ec5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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