diff --git a/examples/mcu-embassy/Cargo.toml b/examples/mcu-embassy/Cargo.toml index d820301cc1c..f8ff867b9b5 100644 --- a/examples/mcu-embassy/Cargo.toml +++ b/examples/mcu-embassy/Cargo.toml @@ -1,10 +1,15 @@ +# Copyright © 2025 David Haig +# SPDX-License-Identifier: MIT + [package] name = "mcu-embassy" version = "0.1.0" edition = "2021" authors = ["David Haig "] readme = "README.md" +resolver = "2" license = "MIT" +publish = false repository = "https://github.com/slint-ui/slint" homepage = "https://slint.dev" @@ -33,7 +38,7 @@ slint = { version = "=1.9.0", path = "../../api/rs/slint", default-features = fa ] } i-slint-core-macros = { version = "=1.9.0", path = "../../internal/core-macros" } -embassy-stm32 = { git = "https://github.com/embassy-rs/embassy", rev = "72976fe", optional = true, features = [ +embassy-stm32 = { git = "https://github.com/embassy-rs/embassy", rev = "4790f8f", optional = true, features = [ "stm32u5g9zj", "time-driver-tim2", "exti", @@ -42,14 +47,14 @@ embassy-stm32 = { git = "https://github.com/embassy-rs/embassy", rev = "72976fe" "chrono", "time", ] } -embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "72976fe", optional = true } -embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "72976fe", optional = true, features = [ +embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "4790f8f", optional = true } +embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "4790f8f", optional = true, features = [ "task-arena-size-32768", + "arch-cortex-m", "executor-thread", - "integrated-timers", ] } -embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "72976fe", optional = true } -embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "72976fe", optional = true } +embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "4790f8f", optional = true } +embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "4790f8f", optional = true } env_logger = { version = "0.9.0", optional = true } sdl2 = { git = "https://github.com/Rust-SDL2/rust-sdl2", rev = "400e033", optional = true } diff --git a/examples/mcu-embassy/slint_generated/Cargo.toml b/examples/mcu-embassy/slint_generated/Cargo.toml index e938527653d..4c85fe7b5d9 100644 --- a/examples/mcu-embassy/slint_generated/Cargo.toml +++ b/examples/mcu-embassy/slint_generated/Cargo.toml @@ -1,11 +1,16 @@ +# Copyright © 2025 David Haig +# SPDX-License-Identifier: MIT + [package] name = "slint-generated" version = "0.1.0" edition = "2021" build = "build.rs" +authors = ["David Haig "] readme = "README.md" resolver = "2" license = "MIT" +publish = false repository = "https://github.com/slint-ui/slint" homepage = "https://slint.dev" diff --git a/examples/mcu-embassy/slint_generated/README.md b/examples/mcu-embassy/slint_generated/README.md new file mode 100644 index 00000000000..1925b715b52 --- /dev/null +++ b/examples/mcu-embassy/slint_generated/README.md @@ -0,0 +1,3 @@ +# Generated + +This crate is here to separate the `.slint` file compilation from the main application. \ No newline at end of file diff --git a/examples/mcu-embassy/slint_generated/build.rs b/examples/mcu-embassy/slint_generated/build.rs index 959c4d2f8d9..3d3994dd66b 100644 --- a/examples/mcu-embassy/slint_generated/build.rs +++ b/examples/mcu-embassy/slint_generated/build.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + fn main() { let config = slint_build::CompilerConfiguration::new() .embed_resources(slint_build::EmbedResourcesKind::EmbedForSoftwareRenderer); diff --git a/examples/mcu-embassy/slint_generated/src/lib.rs b/examples/mcu-embassy/slint_generated/src/lib.rs index 3107212d8f6..86b23c5a7ba 100644 --- a/examples/mcu-embassy/slint_generated/src/lib.rs +++ b/examples/mcu-embassy/slint_generated/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + #![no_std] slint::include_modules!(); diff --git a/examples/mcu-embassy/src/bin/ui_mcu.rs b/examples/mcu-embassy/src/bin/ui_mcu.rs index ac1b071b354..063082b20f8 100644 --- a/examples/mcu-embassy/src/bin/ui_mcu.rs +++ b/examples/mcu-embassy/src/bin/ui_mcu.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + // A demo for stm32u5g9j-dk2 // The application renders a simple Slint screen to the display and the user can interact with it // by toggling the green led on and off as well as pushing the blue button on the dk which should diff --git a/examples/mcu-embassy/src/bin/ui_simulator.rs b/examples/mcu-embassy/src/bin/ui_simulator.rs index dd482d90bf3..179bce054e9 100644 --- a/examples/mcu-embassy/src/bin/ui_simulator.rs +++ b/examples/mcu-embassy/src/bin/ui_simulator.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + // A simulator for the stm32u5g9j-dk2 // This uses the cross platform sdl2 library to render the application on a PC (see readme for installation instructions) // The LEFTSHIFT key can be used in place of the blue push button on the dk2 (Hardware User Button) diff --git a/examples/mcu-embassy/src/controller.rs b/examples/mcu-embassy/src/controller.rs index af596d74715..e0a5b240d4b 100644 --- a/examples/mcu-embassy/src/controller.rs +++ b/examples/mcu-embassy/src/controller.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + use embassy_sync::channel::Channel; use slint::ComponentHandle; use slint_generated::{Globals, MainWindow}; diff --git a/examples/mcu-embassy/src/lib.rs b/examples/mcu-embassy/src/lib.rs index 05e09f4748d..e77432bda91 100644 --- a/examples/mcu-embassy/src/lib.rs +++ b/examples/mcu-embassy/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + #![cfg_attr(feature = "mcu", no_std)] extern crate alloc; diff --git a/examples/mcu-embassy/src/mcu/double_buffer.rs b/examples/mcu-embassy/src/mcu/double_buffer.rs index 75ee9669b6b..dd354f8959a 100644 --- a/examples/mcu-embassy/src/mcu/double_buffer.rs +++ b/examples/mcu-embassy/src/mcu/double_buffer.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + use embassy_stm32::ltdc::{self, Ltdc, LtdcLayerConfig}; use slint::platform::software_renderer::Rgb565Pixel; diff --git a/examples/mcu-embassy/src/mcu/hardware.rs b/examples/mcu-embassy/src/mcu/hardware.rs index fa0172c550f..a232e4cc2a9 100644 --- a/examples/mcu-embassy/src/mcu/hardware.rs +++ b/examples/mcu-embassy/src/mcu/hardware.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + use crate::controller::Hardware; pub struct HardwareMcu { diff --git a/examples/mcu-embassy/src/mcu/mod.rs b/examples/mcu-embassy/src/mcu/mod.rs index ffce7e7605e..ef8c204616f 100644 --- a/examples/mcu-embassy/src/mcu/mod.rs +++ b/examples/mcu-embassy/src/mcu/mod.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + pub mod double_buffer; pub mod hardware; pub mod rcc_setup; diff --git a/examples/mcu-embassy/src/mcu/rcc_setup.rs b/examples/mcu-embassy/src/mcu/rcc_setup.rs index 670f53e844b..a4ae61f6d20 100644 --- a/examples/mcu-embassy/src/mcu/rcc_setup.rs +++ b/examples/mcu-embassy/src/mcu/rcc_setup.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + use embassy_stm32::time::Hertz; use embassy_stm32::{rcc, Config, Peripherals}; diff --git a/examples/mcu-embassy/src/simulator/hardware.rs b/examples/mcu-embassy/src/simulator/hardware.rs index def7d272e52..3ac17665189 100644 --- a/examples/mcu-embassy/src/simulator/hardware.rs +++ b/examples/mcu-embassy/src/simulator/hardware.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + use crate::controller::Hardware; use crate::info; diff --git a/examples/mcu-embassy/src/simulator/mod.rs b/examples/mcu-embassy/src/simulator/mod.rs index 9c06cff9153..66c47e35c68 100644 --- a/examples/mcu-embassy/src/simulator/mod.rs +++ b/examples/mcu-embassy/src/simulator/mod.rs @@ -1 +1,4 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + pub mod hardware; diff --git a/examples/mcu-embassy/src/slint_backend.rs b/examples/mcu-embassy/src/slint_backend.rs index 31425825ffa..329e4bbafa8 100644 --- a/examples/mcu-embassy/src/slint_backend.rs +++ b/examples/mcu-embassy/src/slint_backend.rs @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + use alloc::rc::Rc; use embassy_time::Instant; use slint::{ diff --git a/examples/mcu-embassy/ui/common.slint b/examples/mcu-embassy/ui/common.slint index 3ba157fcbbf..92a5c1b02b6 100644 --- a/examples/mcu-embassy/ui/common.slint +++ b/examples/mcu-embassy/ui/common.slint @@ -1,3 +1,5 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT export global Globals { in property hardware-user-btn-pressed; diff --git a/examples/mcu-embassy/ui/main.slint b/examples/mcu-embassy/ui/main.slint index 45c62b5cfaf..494ee1d8075 100644 --- a/examples/mcu-embassy/ui/main.slint +++ b/examples/mcu-embassy/ui/main.slint @@ -1,3 +1,6 @@ +// Copyright © 2025 David Haig +// SPDX-License-Identifier: MIT + import { Globals, Button, Theme, Toggle } from "common.slint"; export { Globals }