mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-01 16:04:33 +01:00
document task!
more
This commit is contained in:
parent
4139b47d4b
commit
74daa77fe0
1 changed files with 9 additions and 0 deletions
|
@ -201,6 +201,15 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Binds a task `$handler` to the interrupt / exception `$NAME`
|
/// Binds a task `$handler` to the interrupt / exception `$NAME`
|
||||||
|
///
|
||||||
|
/// This macro takes two arguments: the name of an exception / interrupt and the
|
||||||
|
/// path to the function that will be used as the task handler. That function
|
||||||
|
/// must have signature `fn(&mut Threshold, $NAME::Resources)`.
|
||||||
|
///
|
||||||
|
/// Optionally, a third argument may be used to declare task local data.
|
||||||
|
/// The handler will have exclusive access to these *local* variables on each
|
||||||
|
/// invocation. If the third argument is used then the signature of the handler
|
||||||
|
/// function must be `fn(&mut Threshold, &mut $locals, $NAME::Resources)`.
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! task {
|
macro_rules! task {
|
||||||
($NAME:ident, $handler:path) => {
|
($NAME:ident, $handler:path) => {
|
||||||
|
|
Loading…
Reference in a new issue