mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 22:05:37 +01:00
Added nRF monotonics
This commit is contained in:
parent
064cf19265
commit
a2f153249f
11 changed files with 587 additions and 3 deletions
|
|
@ -1,4 +1,25 @@
|
|||
//! ...
|
||||
//! A monotonics based on Cortex-M SysTick. Note that this implementation is inefficient as it
|
||||
//! ticks, and generates interrupts, at a constant rate.
|
||||
//!
|
||||
//! # Example
|
||||
//!
|
||||
//! ```
|
||||
//! 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!();
|
||||
//!
|
||||
//! // Start the monotonic
|
||||
//! Systick::start(systick, 12_000_000, systick_token);
|
||||
//!
|
||||
//! loop {
|
||||
//! // Use the monotonic
|
||||
//! Systick::delay(100.millis()).await;
|
||||
//! }
|
||||
//! # }
|
||||
//! ```
|
||||
|
||||
use super::Monotonic;
|
||||
pub use super::{TimeoutError, TimerQueue};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue