From 8e636f0d1286cf905518022d42adf9624bed44df Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 26 Jun 2020 23:46:09 +0200 Subject: Examples: Clarify extern section Some beginners are confused about the "extern" section, so I added an explanation comment to all examples. Furthermore, using the UARTx interrupts when UART is actually being used in the same example may be confusing, so I changed them all to SSI0/QEI0. --- examples/t-cfg.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/t-cfg.rs') diff --git a/examples/t-cfg.rs b/examples/t-cfg.rs index feb7114..52e6d1c 100644 --- a/examples/t-cfg.rs +++ b/examples/t-cfg.rs @@ -43,8 +43,11 @@ const APP: () = { #[task] fn quux(_: quux::Context) {} + // RTIC requires that unused interrupts are declared in an extern block when + // using software tasks; these free interrupts will be used to dispatch the + // software tasks. extern "C" { - fn UART0(); - fn UART1(); + fn SSI0(); + fn QEI0(); } }; -- cgit v1.2.3