aboutsummaryrefslogtreecommitdiff
path: root/examples/baseline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/baseline.rs')
-rw-r--r--examples/baseline.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/examples/baseline.rs b/examples/baseline.rs
index fdf36838..d743107d 100644
--- a/examples/baseline.rs
+++ b/examples/baseline.rs
@@ -9,24 +9,23 @@ extern crate panic_semihosting;
use cortex_m_semihosting::{debug, hprintln};
use lm3s6965::Interrupt;
-use rtfm::app;
// NOTE: does NOT properly work on QEMU
-#[app(device = lm3s6965)]
+#[rtfm::app(device = lm3s6965)]
const APP: () = {
#[init(spawn = [foo])]
- fn init() {
- hprintln!("init(baseline = {:?})", start).unwrap();
+ fn init(c: init::Context) {
+ hprintln!("init(baseline = {:?})", c.start).unwrap();
// `foo` inherits the baseline of `init`: `Instant(0)`
- spawn.foo().unwrap();
+ c.spawn.foo().unwrap();
}
#[task(schedule = [foo])]
- fn foo() {
+ fn foo(c: foo::Context) {
static mut ONCE: bool = true;
- hprintln!("foo(baseline = {:?})", scheduled).unwrap();
+ hprintln!("foo(baseline = {:?})", c.scheduled).unwrap();
if *ONCE {
*ONCE = false;
@@ -38,11 +37,11 @@ const APP: () = {
}
#[interrupt(spawn = [foo])]
- fn UART0() {
- hprintln!("UART0(baseline = {:?})", start).unwrap();
+ fn UART0(c: UART0::Context) {
+ hprintln!("UART0(baseline = {:?})", c.start).unwrap();
// `foo` inherits the baseline of `UART0`: its `start` time
- spawn.foo().unwrap();
+ c.spawn.foo().unwrap();
}
extern "C" {
ed/profiled-call Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/bench/snippets/sha512.js (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2023-08-18Implement BigIntStats (#4208)Gravatar dave caruso 14-221/+1874
2023-08-18Remove most C API usages, add debugger pretty printers for `Headers`, `URLSea...Gravatar Jarred Sumner 72-8964/+7324
2023-08-18fix `--bail` testGravatar Dylan Conway 1-1/+1
2023-08-17Add `util.inspect.custom` support to `util.inspect/Bun.inspect/console.log` (...Gravatar dave caruso 15-78/+648
2023-08-17Support Nitro (#4098)Gravatar dave caruso 10-18/+180
2023-08-17Update Astro guideGravatar Colin McDonnell 1-1/+5
2023-08-17Allow IncomingRequest.req to be overwritten. (#4154)Gravatar dave caruso 3-8/+21
2023-08-17Fix(node:fs): add buffer parameter in fs.read callback. (#4191)Gravatar Ai Hoshino 3-5/+151
2023-08-17refactor: move HTMLRewriter to c++ bindings (#4193)Gravatar Brúnó Salomon 16-1127/+4961
2023-08-17Fix description for executables pageGravatar Colin McDonnell 1-1/+1