diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f2208e3..5c986fe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Send stop after acknowledge errors on i2c - Fix i2c interactions after errors +### Changed +- Use `cortex-m-rtic` instead of `cortex-m-rtfm` in the examples + ## [v0.7.0]- 2020-10-17 ### Breaking changes diff --git a/Cargo.toml b/Cargo.toml index a9ed7c28..a82cdd32 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ optional = true panic-halt = "0.2.0" panic-semihosting = "0.5.2" panic-itm = "0.4.1" -cortex-m-rtfm = "0.5" +cortex-m-rtic = "0.5" cortex-m-semihosting = "0.3.3" heapless = "0.4.3" m = "0.1.1" @@ -109,7 +109,7 @@ name = "usb_serial_interrupt" required-features = ["rt", "stm32-usbd"] [[example]] -name = "usb_serial_rtfm" +name = "usb_serial_rtic" required-features = ["rt", "stm32-usbd"] [[example]] @@ -125,7 +125,7 @@ name = "qei" required-features = ["medium"] [[example]] -name = "timer-interrupt-rtfm" +name = "timer-interrupt-rtic" required-features = ["rt", "medium"] [[example]] diff --git a/examples/exti.rs b/examples/exti.rs index c96dce8a..4e6e2883 100644 --- a/examples/exti.rs +++ b/examples/exti.rs @@ -17,7 +17,7 @@ use stm32f1xx_hal::{pac, prelude::*}; // These two are owned by the ISR. main() may only access them during the initialization phase, // where the interrupt is not yet enabled (i.e. no concurrent accesses can occur). // After enabling the interrupt, main() may not have any references to these objects any more. -// For the sake of minimalism, we do not use RTFM here, which would be the better way. +// For the sake of minimalism, we do not use RTIC here, which would be the better way. static mut LED: MaybeUninit>> = MaybeUninit::uninit(); static mut INT_PIN: MaybeUninit>> = diff --git a/examples/timer-interrupt-rtfm.rs b/examples/timer-interrupt-rtic.rs similarity index 96% rename from examples/timer-interrupt-rtfm.rs rename to examples/timer-interrupt-rtic.rs index d4a9892e..acabfcf8 100644 --- a/examples/timer-interrupt-rtfm.rs +++ b/examples/timer-interrupt-rtic.rs @@ -11,7 +11,7 @@ // you can put a breakpoint on `rust_begin_unwind` to catch panics use panic_halt as _; -use rtfm::app; +use rtic::app; use embedded_hal::digital::v2::OutputPin; use stm32f1xx_hal::{ @@ -55,7 +55,7 @@ const APP: () = { Timer::tim1(cx.device.TIM1, &clocks, &mut rcc.apb2).start_count_down(1.hz()); timer.listen(Event::Update); - // Init the static resources to use them later through RTFM + // Init the static resources to use them later through RTIC init::LateResources { led, timer_handler: timer, @@ -64,7 +64,7 @@ const APP: () = { // Optional. // - // https://rtfm.rs/0.5/book/en/by-example/app.html#idle + // https://rtic.rs/0.5/book/en/by-example/app.html#idle // > When no idle function is declared, the runtime sets the SLEEPONEXIT bit and then // > sends the microcontroller to sleep after running init. #[idle] @@ -84,7 +84,7 @@ const APP: () = { static mut COUNT: u8 = 0; if *cx.resources.led_state { - // Uses resources managed by rtfm to turn led off (on bluepill) + // Uses resources managed by rtic to turn led off (on bluepill) cx.resources.led.set_high().unwrap(); *cx.resources.led_state = false; } else { diff --git a/examples/usb_serial_rtfm.rs b/examples/usb_serial_rtic.rs similarity index 97% rename from examples/usb_serial_rtfm.rs rename to examples/usb_serial_rtic.rs index dc8f9053..5735b815 100644 --- a/examples/usb_serial_rtfm.rs +++ b/examples/usb_serial_rtic.rs @@ -1,4 +1,4 @@ -//! CDC-ACM serial port example using cortex-m-rtfm. +//! CDC-ACM serial port example using cortex-m-rtic. //! Target board: Blue Pill #![no_main] #![no_std] @@ -8,7 +8,7 @@ extern crate panic_semihosting; use cortex_m::asm::delay; use embedded_hal::digital::v2::OutputPin; -use rtfm::app; +use rtic::app; use stm32f1xx_hal::prelude::*; use stm32f1xx_hal::usb::{Peripheral, UsbBus, UsbBusType}; use usb_device::bus;