Skip to content

Commit 1a56cfd

Browse files
authored
Merge pull request #256 from stm32-rs/stm32l4-v0.14
Updated stm32l4 to v0.14
2 parents 84389a5 + 7f01acd commit 1a56cfd

21 files changed

+42
-87
lines changed

Cargo.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ exclude = [
2121
edition = "2018"
2222

2323
[dependencies]
24-
cortex-m = "0.6.3"
24+
cortex-m = "0.7"
2525
nb = "0.1.1"
26-
stm32l4 = "0.13.0"
26+
stm32l4 = "0.14.0"
2727
embedded-dma = "0.1"
2828
bxcan = ">=0.4, <0.6"
2929

@@ -73,11 +73,15 @@ otg_fs = ["synopsys-usb-otg"]
7373
panic-halt = "0.2.0"
7474
panic-semihosting = "0.5.0"
7575
cortex-m-semihosting = "0.3.5"
76-
cortex-m-rt = "0.6.12"
76+
cortex-m-rt = "0.7"
7777
usb-device = "0.2.3"
7878
usbd-serial = "0.1.0"
7979
heapless = "0.5"
80-
cortex-m-rtic = "0.5.5"
80+
81+
[dev-dependencies.cortex-m-rtic]
82+
version = "0.5.9"
83+
default-features = false
84+
features = ["cortex-m-7"]
8185

8286
[dev-dependencies.panic-rtt-target]
8387
version = "0.1.1"

examples/blinky.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! Blinks an LED
22
3-
#![deny(unsafe_code)]
4-
// #![deny(warnings)]
53
#![no_std]
64
#![no_main]
75

@@ -62,6 +60,6 @@ fn main() -> ! {
6260
}
6361

6462
#[exception]
65-
fn HardFault(ef: &ExceptionFrame) -> ! {
63+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
6664
panic!("{:#?}", ef);
6765
}

examples/i2c_write.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! Blinks an LED
22
3-
#![deny(unsafe_code)]
4-
// #![deny(warnings)]
53
#![no_std]
64
#![no_main]
75

@@ -84,6 +82,6 @@ fn main() -> ! {
8482
}
8583

8684
#[exception]
87-
fn HardFault(ef: &ExceptionFrame) -> ! {
85+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
8886
panic!("{:#?}", ef);
8987
}

examples/pll_config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Test the serial interface
22
//!
33
//! This example requires you to short (connect) the TX and RX pins.
4-
#![deny(unsafe_code)]
54
#![deny(warnings)]
65
#![no_main]
76
#![no_std]
@@ -84,6 +83,6 @@ fn main() -> ! {
8483
}
8584

8685
#[exception]
87-
fn HardFault(ef: &ExceptionFrame) -> ! {
86+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
8887
panic!("{:#?}", ef);
8988
}

examples/qspi.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! Test the Quad SPI interface
22
//!
33
//! The example wirtes a command over the QSPI interfaces and recives a 3 byte response.
4-
// #![deny(unsafe_code)]
5-
// #![deny(warnings)]
64
#![no_main]
75
#![no_std]
86

@@ -94,6 +92,6 @@ fn main() -> ! {
9492
}
9593

9694
#[exception]
97-
fn HardFault(ef: &ExceptionFrame) -> ! {
95+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
9896
panic!("{:#?}", ef);
9997
}

examples/rtc.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! Blinks an LED
22
3-
#![deny(unsafe_code)]
4-
// #![deny(warnings)]
53
#![no_std]
64
#![no_main]
75

@@ -73,6 +71,6 @@ fn main() -> ! {
7371
}
7472

7573
#[exception]
76-
fn HardFault(ef: &ExceptionFrame) -> ! {
74+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
7775
panic!("{:#?}", ef);
7876
}

examples/rtc_alarm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@ fn RTC_WKUP() {
9191
}
9292

9393
#[exception]
94-
fn HardFault(ef: &ExceptionFrame) -> ! {
94+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
9595
panic!("{:#?}", ef);
9696
}

examples/serial.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Test the serial interface
22
//!
33
//! This example requires you to short (connect) the TX and RX pins.
4-
#![deny(unsafe_code)]
54
#![deny(warnings)]
65
#![no_main]
76
#![no_std]
@@ -87,6 +86,6 @@ fn main() -> ! {
8786
}
8887

8988
#[exception]
90-
fn HardFault(ef: &ExceptionFrame) -> ! {
89+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
9190
panic!("{:#?}", ef);
9291
}

examples/serial_dma.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! Test the serial interface with the DMA engine
22
//!
33
//! This example requires you to short (connect) the TX and RX pins.
4-
#![deny(unsafe_code)]
5-
// #![deny(warnings)]
64
#![no_main]
75
#![no_std]
86

@@ -146,6 +144,6 @@ fn send(tx: &mut impl embedded_hal::serial::Write<u8>, data: &[u8]) {
146144
}
147145

148146
#[exception]
149-
fn HardFault(ef: &ExceptionFrame) -> ! {
147+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
150148
panic!("{:#?}", ef);
151149
}

examples/serial_dma_us2.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! Test the serial interface with the DMA engine
22
//!
33
//! This example requires you to short (connect) the TX and RX pins.
4-
#![deny(unsafe_code)]
5-
// #![deny(warnings)]
64
#![no_main]
75
#![no_std]
86

@@ -91,6 +89,6 @@ fn main() -> ! {
9189
}
9290

9391
#[exception]
94-
fn HardFault(ef: &ExceptionFrame) -> ! {
92+
unsafe fn HardFault(ef: &ExceptionFrame) -> ! {
9593
panic!("{:#?}", ef);
9694
}

0 commit comments

Comments
 (0)