Skip to content

Commit 9897970

Browse files
authored
fix: rust syntax typo
1 parent c80b0ba commit 9897970

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

website/lab/05/index.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ To figure out which pins work with SPI and what channels they are associated wit
152152
We also need a `CS` pin, that is simply a GPIO output pin. We will initialize it as such. Any pin can be used. For multiple subs, multiple pins will be initialized.
153153

154154
```rust
155-
let mut cs = Output::new(p.PQa, Level::High, Speed:Low);
155+
let mut cs = Output::new(p.PQa, Level::High, Speed::Low);
156156
```
157157

158158
Now we have set up the SPI, and can use it to communicate with the connected sub. To activate the sub, we need to set the `cs` pin to `low`.
@@ -247,7 +247,7 @@ The STM32 Nucleo-U545RE-Q has three SPI channels. Each channel has a multiple se
247247

248248
![STM32 Nucleo-U545RE-Q Arduino Headers Pinout](images/Arduino_Headers.svg)
249249
![STM32 Nucleo-U545RE-Q CN7 Pinout](images/CN7.svg)
250-
![STM32 Nucleo-U545RE-! CN10 Pinout](images/CN10.svg)
250+
![STM32 Nucleo-U545RE-Q CN10 Pinout](images/CN10.svg)
251251

252252
</TabItem>
253253

@@ -292,7 +292,7 @@ The **MPU-6500** is a *digital* gyroscope and accelerometer designed by InvenSen
292292

293293
### MPU-6500 Memory Map
294294

295-
| address (HEX) | Name | Access
295+
| address (HEX) | Name | Access |
296296
|-|-|-|
297297
| 1B | GYRO_CONFIG | R/W |
298298
| 1C | ACCEL_CONFIG | R/W |
@@ -415,7 +415,7 @@ let clk = p.PZo;
415415
let mut spi = Spi::new(p.SPI1, clk, mosi, miso, p.GPDMA1_CH0, p.GPDMA1_CH1, config);
416416

417417
// make sure to actually choose a pin
418-
let mut cs = Output::new(p.PQa, Level::High, Speed:Low);
418+
let mut cs = Output::new(p.PQa, Level::High, Speed::Low);
419419
```
420420

421421
</TabItem>
@@ -538,7 +538,7 @@ let screen_dc = Output::new(p.PYm, Level::Low, Speed::Low);
538538
let screen_cs = Output::new(p.PZo, Level::High, Speed::Low);
539539

540540
let spi_bus: Mutex<NoopRawMutex, _> = Mutex::new(RefCell::new(spi));
541-
let display_spi = SpiDeviceWithConfig::new(&spi_bus_mutex, screen_cs, screen_spi_config);
541+
let display_spi = SpiDeviceWithConfig::new(&spi_bus, screen_cs, screen_spi_config);
542542

543543
let mut screen_buffer = [0; 10 * 4096];
544544

0 commit comments

Comments
 (0)