Skip to content

Commit

Permalink
examples: adapt to optional threading
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 committed Jan 11, 2024
1 parent 67fa4e9 commit e27a1c3
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 40 deletions.
56 changes: 55 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions examples/application/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,3 @@ impl Application for MyApplication {
}

riot_rs::embassy::riot_initialize!(MyApplication);

#[no_mangle]
fn riot_main() {
riot_rs::rt::debug::exit(Ok(()))
}
2 changes: 1 addition & 1 deletion examples/benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ edition = "2021"
publish = false

[dependencies]
riot-rs = { path = "../../src/riot-rs" }
riot-rs = { path = "../../src/riot-rs", features = [ "threading" ] }
riot-rs-boards = { path = "../../src/riot-rs-boards" }
2 changes: 1 addition & 1 deletion examples/core-sizes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ edition = "2021"
publish = false

[dependencies]
riot-rs = { path = "../../src/riot-rs" }
riot-rs = { path = "../../src/riot-rs", features = [ "threading" ] }
riot-rs-boards = { path = "../../src/riot-rs-boards" }
10 changes: 0 additions & 10 deletions examples/embassy-http-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,3 @@ impl Application for WebServer {
}

riot_rs::embassy::riot_initialize!(WebServer);

#[no_mangle]
fn riot_main() {
println!(
"Hello from riot_main()! Running on a {} board.",
riot_rs::buildinfo::BOARD
);

loop {}
}
10 changes: 0 additions & 10 deletions examples/embassy-net-tcp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,3 @@ impl Application for TcpEcho {
}

riot_rs::embassy::riot_initialize!(TcpEcho);

#[no_mangle]
fn riot_main() {
println!(
"Hello from riot_main()! Running on a {} board.",
riot_rs::buildinfo::BOARD
);

loop {}
}
10 changes: 0 additions & 10 deletions examples/embassy-net-udp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,3 @@ impl Application for UdpEcho {
}

riot_rs::embassy::riot_initialize!(UdpEcho);

#[no_mangle]
fn riot_main() {
println!(
"Hello from riot_main()! Running on a {} board.",
riot_rs::buildinfo::BOARD
);

loop {}
}
2 changes: 1 addition & 1 deletion examples/embassy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition.workspace = true
publish = false

[dependencies]
riot-rs = { path = "../../src/riot-rs", features = ["time"] }
riot-rs = { path = "../../src/riot-rs", features = [ "threading", "time"] }
riot-rs-boards = { path = "../../src/riot-rs-boards" }
embassy-executor = { workspace = true, default-features = false }
embassy-time = { workspace = true, default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition.workspace = true
publish = false

[dependencies]
riot-rs = { path = "../../src/riot-rs" }
riot-rs = { path = "../../src/riot-rs", features = [ "threading" ] }
riot-rs-boards = { path = "../../src/riot-rs-boards" }
riot-wrappers = { workspace = true, optional = true }

0 comments on commit e27a1c3

Please sign in to comment.