Skip to content
Snippets Groups Projects
Commit fe865435 authored by Per Lindgren's avatar Per Lindgren
Browse files

cleanup

parent 56004232
Branches
No related tags found
No related merge requests found
// cargo run --example rtt_rtic_usb_mouse --release
//
// Notice, release build required
#![no_std] #![no_std]
#![no_main] #![no_main]
// extern crate panic_semihosting;
// use panic_rtt_target as _;
use panic_halt as _; use panic_halt as _;
use cortex_m::{asm::delay, peripheral::DWT}; use cortex_m::{asm::delay, peripheral::DWT};
use embedded_hal::digital::v2::OutputPin; use embedded_hal::digital::v2::OutputPin;
use rtic::cyccnt::{Instant, U32Ext as _}; use rtic::cyccnt::{Instant, U32Ext as _};
// use stm32f4xx_hal::usb::{Peripheral, UsbBus, UsbBusType};
use stm32f4xx_hal::{ use stm32f4xx_hal::{
gpio, gpio,
otg_fs::{UsbBus, UsbBusType, USB}, otg_fs::{UsbBus, UsbBusType, USB},
...@@ -273,6 +274,14 @@ const APP: () = { ...@@ -273,6 +274,14 @@ const APP: () = {
} }
} }
#[idle]
fn idle(_cx: idle::Context) -> ! {
// rprintln!("idle");
loop {
continue;
}
}
#[task(schedule = [on_tick], resources = [counter, led, hid])] #[task(schedule = [on_tick], resources = [counter, led, hid])]
fn on_tick(mut cx: on_tick::Context) { fn on_tick(mut cx: on_tick::Context) {
cx.schedule.on_tick(Instant::now() + PERIOD.cycles()).ok(); cx.schedule.on_tick(Instant::now() + PERIOD.cycles()).ok();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment