aboutsummaryrefslogtreecommitdiff
path: root/rtic-monotonics/src/rp235x.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rtic-monotonics/src/rp235x.rs')
-rw-r--r--rtic-monotonics/src/rp235x.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/rtic-monotonics/src/rp235x.rs b/rtic-monotonics/src/rp235x.rs
index 7624d1d..d58139a 100644
--- a/rtic-monotonics/src/rp235x.rs
+++ b/rtic-monotonics/src/rp235x.rs
@@ -8,21 +8,25 @@
//! ```
//! use rtic_monotonics::rp235x::prelude::*;
//!
+//! // Create the type `Mono`. It will manage the TIMER0 peripheral,
+//! // which is a 1 MHz, 64-bit timer.
//! rp235x_timer_monotonic!(Mono);
//!
//! fn init() {
//! # // This is normally provided by the selected PAC
-//! # let timer = unsafe { core::mem::transmute(()) };
-//! # let mut resets = unsafe { core::mem::transmute(()) };
+//! # let TIMER = unsafe { core::mem::transmute(()) };
+//! # let mut RESETS = unsafe { core::mem::transmute(()) };
//! #
-//! // Start the monotonic
-//! Mono::start(timer, &mut resets);
+//! // Start the monotonic - passing ownership of an rp235x_pac object for
+//! // TIMER0, and temporary access to one for the RESET peripheral.
+//! Mono::start(TIMER, &mut RESETS);
//! }
//!
//! async fn usage() {
//! loop {
-//! // Use the monotonic
+//! // You can use the monotonic to get the time...
//! let timestamp = Mono::now();
+//! // ...and you can use it to add a delay to this async function
//! Mono::delay(100.millis()).await;
//! }
//! }