From fe86543556c486bbe5ffa529eaf51bc77cd33c64 Mon Sep 17 00:00:00 2001 From: Per Lindgren <per.lindgren@ltu.se> Date: Tue, 16 Feb 2021 13:49:39 +0100 Subject: [PATCH] cleanup --- examples/{usb-mouse.rs => rtt_rtic_usb_mouse.rs} | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) rename examples/{usb-mouse.rs => rtt_rtic_usb_mouse.rs} (97%) 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 ab458fb..7bb3347 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(); -- GitLab