aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/examples/main.rs
diff options
context:
space:
mode:
authorGravatar Stephen Roe <ste.roe@gmail.com> 2018-06-13 23:22:12 +0100
committerGravatar Stephen Roe <ste.roe@gmail.com> 2018-06-13 23:22:12 +0100
commit21c205462686554d0d639834fc7d38e84608f11a (patch)
tree6c6025945940f02a604136995f360dd3ef45c2be /cortex-m-rt/examples/main.rs
parentc259cf9522b36b65b91055b03600bb10afc86930 (diff)
downloadcortex-m-21c205462686554d0d639834fc7d38e84608f11a.tar.gz
cortex-m-21c205462686554d0d639834fc7d38e84608f11a.tar.zst
cortex-m-21c205462686554d0d639834fc7d38e84608f11a.zip
Modified the entry and exception macros to accept a closure.
This allows: entry!(|| { let mut x = 1; loop { x = x + 1; } }); as well as allowing the original usage: entry!(main); fn main() -> ! { let mut x = 1; loop { x = x + 1; } } The same is true for exceptions: exception!(*, |irqn: i16| { panic!("Unhandled exception (IRQn = {})", irqn); });
Diffstat (limited to 'cortex-m-rt/examples/main.rs')
0 files changed, 0 insertions, 0 deletions