Skip to content

Commit 2ae78c2

Browse files
committed
Build i2c dma example only for stm32f411,
remove unused transmute from example
1 parent 106f236 commit 2ae78c2

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ required-features = ["tim2"] # stm32f411
406406

407407
[[example]]
408408
name = "stopwatch-with-ssd1306-and-interrupts-and-dma-i2c"
409-
required-features = ["tim2"] # stm32f411
409+
required-features = ["tim2", "stm32f411"] # stm32f411
410410

411411
[[example]]
412412
name = "analog-stopwatch-with-spi-ssd1306"

examples/stopwatch-with-ssd1306-and-interrupts-and-dma-i2c.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ use crate::hal::{
3232
rcc::{Clocks, Rcc},
3333
timer::{CounterUs, Event, Timer},
3434
};
35+
use core::cell::{Cell, RefCell};
3536
use core::fmt::Write;
3637
use core::ops::DerefMut;
3738
use core::sync::atomic::{AtomicBool, Ordering};
38-
use core::{
39-
cell::{Cell, RefCell},
40-
mem::transmute,
41-
};
4239
use cortex_m::interrupt::{free, CriticalSection, Mutex};
4340
use cortex_m_rt::entry;
4441
use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand};

0 commit comments

Comments
 (0)