diff options
author | 2017-07-23 22:35:05 -0500 | |
---|---|---|
committer | 2017-07-23 22:35:05 -0500 | |
commit | 74daa77fe07499df86bca1c0918718b416b35dfc (patch) | |
tree | 96a6d25eda58e2554a9f16d3e2b3b5080784e923 /src | |
parent | 4139b47d4bb63f997ccd6890e61677b073071344 (diff) | |
download | rtic-74daa77fe07499df86bca1c0918718b416b35dfc.tar.gz rtic-74daa77fe07499df86bca1c0918718b416b35dfc.tar.zst rtic-74daa77fe07499df86bca1c0918718b416b35dfc.zip |
document `task!` more
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -201,6 +201,15 @@ where } /// 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_rules! task { ($NAME:ident, $handler:path) => { |