macro_rules! systick_monotonic {
($name:ident) => { ... };
($name:ident, $tick_rate_hz:expr) => { ... };
}
Expand description
Create a Systick based monotonic and register the Systick interrupt for it.
This macro expands to produce a new type called $name
, which has a fn start()
function for you to call. The type has an implementation of the
rtic_monotonics::TimerQueueBasedMonotonic
trait, the
embedded_hal::delay::DelayNs
trait and the
embedded_hal_async::delay::DelayNs
trait.
This macro also produces an interrupt handler for the SysTick interrupt, by
creating an extern "C" fn SysTick() { ... }
.
See crate::systick
for more details.
ยงArguments
name
- The name that the monotonic type will have.tick_rate_hz
- The tick rate of the timer peripheral. Can be omitted; defaults to 1kHz.