From f2a155a0715cb99cbace2eca7ab5fcfa93d106d2 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 18 Aug 2018 22:45:13 +0200 Subject: turn macros into attributes --- cortex-m-rt/examples/pre_init.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'cortex-m-rt/examples/pre_init.rs') diff --git a/cortex-m-rt/examples/pre_init.rs b/cortex-m-rt/examples/pre_init.rs index 7258936..00e2f2c 100644 --- a/cortex-m-rt/examples/pre_init.rs +++ b/cortex-m-rt/examples/pre_init.rs @@ -4,19 +4,17 @@ #![no_main] #![no_std] -#[macro_use(entry, pre_init)] extern crate cortex_m_rt as rt; extern crate panic_semihosting; -pre_init!(disable_watchdog); +use rt::{entry, pre_init}; +#[pre_init] unsafe fn disable_watchdog() { // Do what you need to disable the watchdog. } -// the program entry point -entry!(main); - +#[entry] fn main() -> ! { loop {} } -- cgit v1.2.3