Skip to content

Commit 9c6151a

Browse files
typo
1 parent 6596e0f commit 9c6151a

10 files changed

Lines changed: 43 additions & 18 deletions

File tree

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,28 @@ target
1919
# and can be added to the global gitignore or merged into this file. For a more nuclear
2020
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
2121
#.idea/
22+
23+
# MacOS
24+
#
25+
## Folder view configuration files
26+
.DS_Store
27+
Desktop.ini
28+
29+
# Thumbnail cache files
30+
._*
31+
Thumbs.db
32+
33+
# Files that might appear on external disks
34+
.Spotlight-V100
35+
.Trashes
36+
37+
# Compiled Python files
38+
*.pyc
39+
40+
# Compiled C++ files
41+
*.out
42+
43+
# Application specific files
44+
venv
45+
node_modules
46+
.sass-cache

lab05/src/bin/ex3.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async fn main(_spawner: Spawner) {
5555
// - MOSI - D11 (PA7)
5656
// - CLK - D13 (PA5)
5757
//
58-
// We use the asynchronous API an we need two free
58+
// We use the asynchronous API and we need two free
5959
// DMA channels. We use GPDMA1_CH0 and GPDMA1_CH1
6060
let mut spi = Spi::new(
6161
peripherals.SPI1,
@@ -107,7 +107,7 @@ async fn main(_spawner: Spawner) {
107107
spi.transfer(&mut rx, &command).await.unwrap();
108108
// End the SPI transmission by setting the CS line HIGH.
109109
mpu6500_cs_pin.set_high();
110-
// Panic if the WHO_AM_I register value if wrong
110+
// Panic if the WHO_AM_I register value is wrong
111111
// This is a quick and dirty trick that is not recommended in production firmware,
112112
// but works for our example. If this happens in production, the firmware
113113
// should gracefully fail.

lab05/src/bin/ex4_v1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async fn main(_spawner: Spawner) {
7676
// - MOSI - D11 (PA7)
7777
// - CLK - D13 (PA5)
7878
//
79-
// We use the asynchronous API an we need two free
79+
// We use the asynchronous API and we need two free
8080
// DMA channels. We use GPDMA1_CH0 and GPDMA1_CH1
8181
let mut spi = Spi::new(
8282
peripherals.SPI1,
@@ -128,7 +128,7 @@ async fn main(_spawner: Spawner) {
128128
spi.transfer(&mut rx, &command).await.unwrap();
129129
// End the SPI transmission by setting the CS line HIGH.
130130
mpu6500_cs_pin.set_high();
131-
// Panic if the WHO_AM_I register value if wrong
131+
// Panic if the WHO_AM_I register value is wrong
132132
// This is a quick and dirty trick that is not recommended in production firmware,
133133
// but works for our example. If this happens in production, the firmware
134134
// should gracefully fail.

lab05/src/bin/ex4_v2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ async fn main(_spawner: Spawner) {
346346
// - MOSI - D11 (PA7)
347347
// - CLK - D13 (PA5)
348348
//
349-
// We use the asynchronous API an we need two free
349+
// We use the asynchronous API and we need two free
350350
// DMA channels. We use GPDMA1_CH0 and GPDMA1_CH1
351351
let mut spi = Spi::new(
352352
peripherals.SPI1,
@@ -398,7 +398,7 @@ async fn main(_spawner: Spawner) {
398398
spi.transfer(&mut rx, &command).await.unwrap();
399399
// End the SPI transmission by setting the CS line HIGH.
400400
mpu6500_cs_pin.set_high();
401-
// Panic if the WHO_AM_I register value if wrong
401+
// Panic if the WHO_AM_I register value is wrong
402402
// This is a quick and dirty trick that is not recommended in production firmware,
403403
// but works for our example. If this happens in production, the firmware
404404
// should gracefully fail.

lab05/src/bin/ex4_v3_bus.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async fn main(_spawner: Spawner) {
3030
// - MOSI - D11 (PA7)
3131
// - CLK - D13 (PA5)
3232
//
33-
// We use the asynchronous API an we need two free
33+
// We use the asynchronous API and we need two free
3434
// DMA channels. We use GPDMA1_CH0 and GPDMA1_CH1
3535
let mut spi = Spi::new(
3636
peripherals.SPI1,

lab05/src/bin/ex4_v3_device.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async fn main(_spawner: Spawner) {
3232
// - MOSI - D11 (PA7)
3333
// - CLK - D13 (PA5)
3434
//
35-
// We use the asynchronous API an we need two free
35+
// We use the asynchronous API and we need two free
3636
// DMA channels. We use GPDMA1_CH0 and GPDMA1_CH1
3737
let spi = Spi::new(
3838
peripherals.SPI1,
@@ -47,7 +47,7 @@ async fn main(_spawner: Spawner) {
4747
// We use the D7 (PA8) pin as CS
4848
let mpu6500_cs_pin = Output::new(peripherals.PA8, Level::High, Speed::Low);
4949

50-
// Create a Mutex that so that we can safely share the SPI bus between devices.
50+
// Create a Mutex so that we can safely share the SPI bus between devices.
5151
//
5252
// Due to the Mutex, only one device will have access to the bus at a time.
5353
let spi_mutex = Mutex::<ThreadModeRawMutex, _>::new(spi);

lab05/src/bin/ex5.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async fn main(_spawner: Spawner) {
6868
// - MOSI - D11 (PA7)
6969
// - CLK - D13 (PA5)
7070
//
71-
// We need a blocking SPI as the `mididsi` display drivers require a blocking SPI device.
71+
// We need a blocking SPI as the `mipidsi` display drivers require a blocking SPI device.
7272
let spi = Spi::new_blocking(
7373
peripherals.SPI1,
7474
peripherals.PA5,
@@ -77,7 +77,7 @@ async fn main(_spawner: Spawner) {
7777
spi::Config::default(),
7878
);
7979

80-
// Create a Mutex that so that we can safely share the SPI bus between devices.
80+
// Create a Mutex so that we can safely share the SPI bus between devices.
8181
//
8282
// Due to the Mutex, only one device will have access to the bus at a time.
8383
let spi_bus_mutex: Mutex<NoopRawMutex, _> = Mutex::new(RefCell::new(spi));
@@ -128,9 +128,9 @@ async fn main(_spawner: Spawner) {
128128
screen.clear(Rgb565::BLACK).unwrap();
129129
let mut style = MonoTextStyle::new(&FONT_6X10, Rgb565::WHITE);
130130

131-
// We set the background color to print the characters with a background, so that we can
132-
// fully overwrite the previous text. Unless we use a background color, the text will
133-
// superpose the letters and digits on the old text.
131+
// We set the background color to print characters with a background, so that we can
132+
// fully overwrite the previous text. Otherwise, the new text will just be drawn
133+
// on top of the old text, making it unreadable.
134134
style.set_background_color(Some(Rgb565::BLACK));
135135

136136
if mpu6500.is_connected() {

lab05/src/mpu6500/bus.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//!
33
//! This driver requires the SPI bus, meaning that the
44
//! SPI bus is not available for other drivers while this
5-
//! driver is available and has not ben dropped. The SPI
5+
//! driver is available and has not been dropped. The SPI
66
//! bus is not available to other drivers even if this
77
//! driver is not transferring anything.
88
//!
@@ -116,7 +116,7 @@ impl<'a, S: SpiBus> Mpu6500<'a, S> {
116116
Ok(()) => {
117117
// If the register's value is the one expected,
118118
// we confirm that the MPU 6500 is connected to
119-
// the SPI by returning `true` other wise we
119+
// the SPI by returning `true` otherwise we
120120
// return `false`.
121121
rx[1] == WHO_AM_I_VALUE
122122
}

lab05/src/mpu6500/device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl<'a, S: SpiDevice> Mpu6500<'a, S> {
108108
Ok(()) => {
109109
// If the register's value is the one expected,
110110
// we confirm that the MPU 6500 is connected to
111-
// the SPI by returning `true` other wise we
111+
// the SPI by returning `true` otherwise we
112112
// return `false`.
113113
rx[1] == WHO_AM_I_VALUE
114114
}

lab05/src/mpu6500/device_blocking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl<'a, S: SpiDevice> Mpu6500<'a, S> {
108108
Ok(()) => {
109109
// If the register's value is the one expected,
110110
// we confirm that the MPU 6500 is connected to
111-
// the SPI by returning `true` other wise we
111+
// the SPI by returning `true` otherwise we
112112
// return `false`.
113113
rx[1] == WHO_AM_I_VALUE
114114
}

0 commit comments

Comments
 (0)