diff options
| author | Finomnis <finomnis@gmail.com> | 2023-11-09 00:35:47 +0100 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2023-11-10 20:49:12 +0000 |
| commit | af550483f50b3106a9be0990bd4b579e2da26e6e (patch) | |
| tree | 237bbe0a60469c9c44c92d1daaa08ace0e99e230 /rtic-monotonics/src/imxrt.rs | |
| parent | 413955fb39b72a1c08c6852052b0626a175b1ca8 (diff) | |
Add documentation for imxrt; other doc fixes
Diffstat (limited to 'rtic-monotonics/src/imxrt.rs')
| -rw-r--r-- | rtic-monotonics/src/imxrt.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rtic-monotonics/src/imxrt.rs b/rtic-monotonics/src/imxrt.rs index ee7e2ff..3944829 100644 --- a/rtic-monotonics/src/imxrt.rs +++ b/rtic-monotonics/src/imxrt.rs @@ -1,4 +1,4 @@ -//! [`Monotonic`] impl for the i.MX RT. +//! [`Monotonic`] implementations for i.MX RT's GPT peripherals. //! //! # Example //! @@ -55,7 +55,7 @@ macro_rules! __internal_create_imxrt_timer_interrupt { }}; } -/// Register GPT1 interrupt for the monotonic. +/// Register the GPT1 interrupt for the monotonic. #[cfg(feature = "imxrt_gpt1")] #[macro_export] macro_rules! create_imxrt_gpt1_token { @@ -64,7 +64,7 @@ macro_rules! create_imxrt_gpt1_token { }}; } -/// Register GPT2 interrupt for the monotonic. +/// Register the GPT2 interrupt for the monotonic. #[cfg(feature = "imxrt_gpt2")] #[macro_export] macro_rules! create_imxrt_gpt2_token { @@ -98,7 +98,7 @@ fn calc_now(period: u32, counter: u32) -> u64 { macro_rules! make_timer { ($mono_name:ident, $timer:ident, $period:ident, $tq:ident$(, doc: ($($doc:tt)*))?) => { - /// Monotonic timer queue implementation. + /// Timer implementing [`Monotonic`] which runs at 1 MHz. $( #[cfg_attr(docsrs, doc(cfg($($doc)*)))] )? @@ -113,9 +113,11 @@ macro_rules! make_timer { impl $mono_name { /// Starts the monotonic timer. + /// /// - `tick_freq_hz`: The tick frequency of the given timer. /// - `gpt`: The GPT timer register block instance. /// - `_interrupt_token`: Required for correct timer interrupt handling. + /// /// This method must be called only once. pub fn start(tick_freq_hz: u32, gpt: $timer, _interrupt_token: impl crate::InterruptToken<Self>) { // Find a prescaler that creates our desired tick frequency |
