Working Diag & artnet proto with imported led driver smi lib C

This commit is contained in:
2025-06-23 17:28:04 +00:00
parent 86fbf1670c
commit 535822198b
49 changed files with 3014 additions and 99 deletions
+7
View File
@@ -0,0 +1,7 @@
[package]
name = "rust_sandbox"
version = "0.1.0"
edition = "2024"
[dependencies]
tokio = { version = "1.45.1", features = ["full"] }
+28
View File
@@ -0,0 +1,28 @@
use tokio::{
spawn,
time::{Duration, sleep},
};
async fn say_hello() {
// Wait for a while before printing to make it a more interesting race.
sleep(Duration::from_millis(100)).await;
print!("hello ");
}
async fn say_world() {
sleep(Duration::from_millis(100)).await;
print!("world ");
}
#[tokio::main]
async fn main() {
loop {
let handle1 = spawn(say_hello());
let handle2 = spawn(say_world());
let _ = handle1.await;
let _ = handle2.await;
println!("!");
}
}