Add setting of priority to interrupts

This commit is contained in:
Emil Fresk 2023-04-02 20:32:10 +02:00
parent a2f153249f
commit aeec8bd41b
6 changed files with 120 additions and 57 deletions

View file

@ -6,19 +6,22 @@
//! ```
//! use rtic_monotonics::systick::*;
//!
//! # async fn usage() {
//! # let systick = unsafe { core::mem::transmute(()) };
//! // Generate the required token
//! let systick_token = rtic_monotonics::create_systick_token!();
//! fn init() {
//! # // This is normally provided by the selected PAC
//! # let systick = unsafe { core::mem::transmute(()) };
//! // Generate the required token
//! let systick_token = rtic_monotonics::create_systick_token!();
//!
//! // Start the monotonic
//! Systick::start(systick, 12_000_000, systick_token);
//!
//! loop {
//! // Use the monotonic
//! Systick::delay(100.millis()).await;
//! // Start the monotonic
//! Systick::start(systick, 12_000_000, systick_token);
//! }
//!
//! async fn usage() {
//! loop {
//! // Use the monotonic
//! Systick::delay(100.millis()).await;
//! }
//! }
//! # }
//! ```
use super::Monotonic;