aboutsummaryrefslogtreecommitdiff
path: root/rtic-monotonics/src/lib.rs
diff options
context:
space:
mode:
authordatdenkikniet <jcdra1@gmail.com>2023-04-13 18:10:29 +0200
committerdatdenkikniet <jcdra1@gmail.com>2023-04-15 19:19:49 +0200
commit401c636215f02e750939e550bc02622ea7834f3c (patch)
tree8e527dc21a2e6c55d8a297cccdaa726172e66f79 /rtic-monotonics/src/lib.rs
parentef8046b060a375fd5e6b23d62c3a9a303bbd6e11 (diff)
rtic-monotonics: Add some docs
Diffstat (limited to 'rtic-monotonics/src/lib.rs')
-rw-r--r--rtic-monotonics/src/lib.rs23
1 files changed, 22 insertions, 1 deletions
diff --git a/rtic-monotonics/src/lib.rs b/rtic-monotonics/src/lib.rs
index 04ce4e2..507ee64 100644
--- a/rtic-monotonics/src/lib.rs
+++ b/rtic-monotonics/src/lib.rs
@@ -1,10 +1,31 @@
-//! Crate
+//! In-tree implementations of the [`rtic_time::Monotonic`] (reexported) trait for
+//! timers & clocks found on commonly used microcontrollers.
+//!
+//! To enable the implementations, you must enable a feature for the specific MCU you're targeting.
+//!
+//! # Cortex-M Systick
+//! The [`systick`] monotonic works on all cortex-M parts, and requires that the feature `cortex-m-systick` is enabled.
+//!
+//! # RP2040
+//! The RP2040 monotonics require that the `rp2040` feature is enabled.
+//!
+//! # nRF
+//! nRF monotonics require that one of the available `nrf52*` features is enabled.
+//!
+//! All implementations of timers for the nRF52 family are documented here. Monotonics that
+//! are not available on all parts in this family will have an `Available on crate features X only`
+//! tag, describing what parts _do_ support that monotonic. Monotonics without an
+//! `Available on crate features X only` tag are available on any `nrf52*` feature.
+//!
+// To build these docs correctly:
+// RUSTFLAGS="--cfg docsrs" cargo doc --featuers cortex-m-systick,rp2040,nrf52840
#![no_std]
#![deny(missing_docs)]
//deny_warnings_placeholder_for_ci
#![allow(incomplete_features)]
#![feature(async_fn_in_trait)]
+#![cfg_attr(docsrs, feature(doc_cfg))]
pub use rtic_time::{Monotonic, TimeoutError, TimerQueue};