diff --git a/examples/usb-mouse.rs b/examples/rtt_rtic_usb_mouse.rs similarity index 97% rename from examples/usb-mouse.rs rename to examples/rtt_rtic_usb_mouse.rs index ab458fb2508c7c60ef1a9c3fdd66ab91f3aa1099..7bb3347a607f48c70bc23c468a133d1776c0fcb2 100644 --- a/examples/usb-mouse.rs +++ b/examples/rtt_rtic_usb_mouse.rs @@ -1,14 +1,15 @@ +// cargo run --example rtt_rtic_usb_mouse --release +// +// Notice, release build required + #![no_std] #![no_main] -// extern crate panic_semihosting; -// use panic_rtt_target as _; use panic_halt as _; use cortex_m::{asm::delay, peripheral::DWT}; use embedded_hal::digital::v2::OutputPin; use rtic::cyccnt::{Instant, U32Ext as _}; -// use stm32f4xx_hal::usb::{Peripheral, UsbBus, UsbBusType}; use stm32f4xx_hal::{ gpio, otg_fs::{UsbBus, UsbBusType, USB}, @@ -273,6 +274,14 @@ const APP: () = { } } + #[idle] + fn idle(_cx: idle::Context) -> ! { + // rprintln!("idle"); + loop { + continue; + } + } + #[task(schedule = [on_tick], resources = [counter, led, hid])] fn on_tick(mut cx: on_tick::Context) { cx.schedule.on_tick(Instant::now() + PERIOD.cycles()).ok();