Skip to content

Commit 68fd3d6

Browse files
authored
Use cortex-m-rtic instead of cortex-m-rtfm (#297)
1 parent b3e2d75 commit 68fd3d6

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1616
- Send stop after acknowledge errors on i2c
1717
- Fix i2c interactions after errors
1818

19+
### Changed
20+
- Use `cortex-m-rtic` instead of `cortex-m-rtfm` in the examples
21+
1922
## [v0.7.0]- 2020-10-17
2023

2124
### Breaking changes

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ optional = true
4343
panic-halt = "0.2.0"
4444
panic-semihosting = "0.5.2"
4545
panic-itm = "0.4.1"
46-
cortex-m-rtfm = "0.5"
46+
cortex-m-rtic = "0.5"
4747
cortex-m-semihosting = "0.3.3"
4848
heapless = "0.4.3"
4949
m = "0.1.1"
@@ -109,7 +109,7 @@ name = "usb_serial_interrupt"
109109
required-features = ["rt", "stm32-usbd"]
110110

111111
[[example]]
112-
name = "usb_serial_rtfm"
112+
name = "usb_serial_rtic"
113113
required-features = ["rt", "stm32-usbd"]
114114

115115
[[example]]
@@ -125,7 +125,7 @@ name = "qei"
125125
required-features = ["medium"]
126126

127127
[[example]]
128-
name = "timer-interrupt-rtfm"
128+
name = "timer-interrupt-rtic"
129129
required-features = ["rt", "medium"]
130130

131131
[[example]]

examples/exti.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use stm32f1xx_hal::{pac, prelude::*};
1717
// These two are owned by the ISR. main() may only access them during the initialization phase,
1818
// where the interrupt is not yet enabled (i.e. no concurrent accesses can occur).
1919
// After enabling the interrupt, main() may not have any references to these objects any more.
20-
// For the sake of minimalism, we do not use RTFM here, which would be the better way.
20+
// For the sake of minimalism, we do not use RTIC here, which would be the better way.
2121
static mut LED: MaybeUninit<stm32f1xx_hal::gpio::gpioc::PC13<Output<PushPull>>> =
2222
MaybeUninit::uninit();
2323
static mut INT_PIN: MaybeUninit<stm32f1xx_hal::gpio::gpioa::PA7<Input<Floating>>> =

examples/timer-interrupt-rtfm.rs renamed to examples/timer-interrupt-rtic.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// you can put a breakpoint on `rust_begin_unwind` to catch panics
1212
use panic_halt as _;
1313

14-
use rtfm::app;
14+
use rtic::app;
1515

1616
use embedded_hal::digital::v2::OutputPin;
1717
use stm32f1xx_hal::{
@@ -55,7 +55,7 @@ const APP: () = {
5555
Timer::tim1(cx.device.TIM1, &clocks, &mut rcc.apb2).start_count_down(1.hz());
5656
timer.listen(Event::Update);
5757

58-
// Init the static resources to use them later through RTFM
58+
// Init the static resources to use them later through RTIC
5959
init::LateResources {
6060
led,
6161
timer_handler: timer,
@@ -64,7 +64,7 @@ const APP: () = {
6464

6565
// Optional.
6666
//
67-
// https://rtfm.rs/0.5/book/en/by-example/app.html#idle
67+
// https://rtic.rs/0.5/book/en/by-example/app.html#idle
6868
// > When no idle function is declared, the runtime sets the SLEEPONEXIT bit and then
6969
// > sends the microcontroller to sleep after running init.
7070
#[idle]
@@ -84,7 +84,7 @@ const APP: () = {
8484
static mut COUNT: u8 = 0;
8585

8686
if *cx.resources.led_state {
87-
// Uses resources managed by rtfm to turn led off (on bluepill)
87+
// Uses resources managed by rtic to turn led off (on bluepill)
8888
cx.resources.led.set_high().unwrap();
8989
*cx.resources.led_state = false;
9090
} else {

examples/usb_serial_rtfm.rs renamed to examples/usb_serial_rtic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! CDC-ACM serial port example using cortex-m-rtfm.
1+
//! CDC-ACM serial port example using cortex-m-rtic.
22
//! Target board: Blue Pill
33
#![no_main]
44
#![no_std]
@@ -8,7 +8,7 @@ extern crate panic_semihosting;
88

99
use cortex_m::asm::delay;
1010
use embedded_hal::digital::v2::OutputPin;
11-
use rtfm::app;
11+
use rtic::app;
1212
use stm32f1xx_hal::prelude::*;
1313
use stm32f1xx_hal::usb::{Peripheral, UsbBus, UsbBusType};
1414
use usb_device::bus;

0 commit comments

Comments
 (0)