mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 22:05:37 +01:00
Add setting of priority to interrupts
This commit is contained in:
parent
a2f153249f
commit
aeec8bd41b
6 changed files with 120 additions and 57 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue