aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/examples/alignment.rs
diff options
context:
space:
mode:
authorGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2018-08-03 06:06:54 +0000
committerGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2018-08-03 06:06:54 +0000
commitdf26fc1a301389c0c8a7cba3539d9c6252ec5dec (patch)
tree1a3355408e26bab053c26cb40b94765dc378ffe9 /cortex-m-rt/examples/alignment.rs
parentc76f2a18d982760bdd1d088b9272223af5f30e9b (diff)
parent21c205462686554d0d639834fc7d38e84608f11a (diff)
downloadcortex-m-df26fc1a301389c0c8a7cba3539d9c6252ec5dec.tar.gz
cortex-m-df26fc1a301389c0c8a7cba3539d9c6252ec5dec.tar.zst
cortex-m-df26fc1a301389c0c8a7cba3539d9c6252ec5dec.zip
Merge #78
78: Modified the entry and exception macros to accept a closure. r=japaric a=sjroe This allows: ```rust entry!(|| { let mut x = 1; loop { x = x + 1; } }); ``` as well as allowing the original usage: ```rust entry!(main); fn main() -> ! { let mut x = 1; loop { x = x + 1; } } ``` The same is true for exceptions: ```rust exception!(*, |irqn: i16| { panic!("Unhandled exception (IRQn = {})", irqn); }); ``` Co-authored-by: Stephen Roe <ste.roe@gmail.com>
Diffstat (limited to 'cortex-m-rt/examples/alignment.rs')
0 files changed, 0 insertions, 0 deletions