├── .cargo └── config.toml ├── .envrc ├── .gitignore ├── .vscode ├── extensions.json ├── launch.json ├── settings.json └── tasks.json ├── Cargo.lock ├── Cargo.toml ├── Embed.toml ├── LICENSE.md ├── README.md ├── STM32F429x.svd ├── build.rs ├── docs └── images │ ├── made-with-slint.png │ └── rust-slint-ui-carousel-demo.jpeg ├── flake.lock ├── flake.nix ├── memory.x ├── rust-toolchain.toml ├── src ├── drivers │ ├── bsp.rs │ ├── display.rs │ ├── fmc.rs │ ├── ltdc.rs │ ├── mod.rs │ └── touchscreen.rs └── main.rs └── ui ├── card.slint ├── carousel.slint ├── carousel_demo.slint ├── fonts ├── Roboto-Bold.ttf ├── Roboto-Bold.ttf.license ├── Roboto-Regular.ttf └── Roboto-Regular.ttf.license ├── label.slint ├── svg ├── home_black.svg ├── home_black.svg.license ├── info_black.svg ├── info_black.svg.license ├── settings_black.svg └── settings_black.svg.license ├── theme.slint └── title_label.slint /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [target.'cfg(all(target_arch = "arm", target_os = "none"))'] 2 | runner = "probe-rs run --chip STM32F429ZITx --connect-under-reset" 3 | 4 | rustflags = [ 5 | "-C", "link-arg=--nmagic", 6 | "-C", "link-arg=-Tlink.x", 7 | "-C", "link-arg=-Tdefmt.x", 8 | # "-C", "linker=flip-link", 9 | ] 10 | 11 | [build] 12 | target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU) 13 | 14 | [env] 15 | DEFMT_LOG = "trace" 16 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | use flake -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/*.rs.bk 2 | .#* 3 | .gdb_history 4 | target/ 5 | 6 | .cargo-ok 7 | 8 | .direnv/ -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. 3 | // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp 4 | // List of extensions which should be recommended for users of this workspace. 5 | "recommendations": [ 6 | "rust-lang.rust-analyzer", 7 | "tamasfe.even-better-toml", 8 | "jnoortheen.nix-ide", 9 | "mkhl.direnv", 10 | "probe-rs.probe-rs-debugger", 11 | "Slint.slint" 12 | ], 13 | // List of extensions recommended by VS Code that should not be recommended for users of this workspace. 14 | "unwantedRecommendations": [] 15 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "preLaunchTask": "rust: cargo build", 9 | "type": "probe-rs-debug", 10 | "request": "launch", 11 | "name": "rust: debug", 12 | "cwd": "${workspaceFolder}", 13 | "connectUnderReset": true, 14 | "chip": "STM32F429ZITx", 15 | "flashingConfig": { 16 | "flashingEnabled": true, 17 | "resetAfterFlashing": true, 18 | "haltAfterReset": true 19 | }, 20 | "coreConfigs": [ 21 | { 22 | "coreIndex": 0, 23 | "programBinary": "target/thumbv7em-none-eabihf/debug/rust-on-stm32", 24 | "svdFile": "./STM32F429x.svd" 25 | } 26 | ] 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true, 3 | "[toml]": { 4 | "editor.formatOnSave": false 5 | }, 6 | "rust-analyzer.check.allTargets": false, 7 | "rust-analyzer.check.noDefaultFeatures": true, 8 | "rust-analyzer.cargo.noDefaultFeatures": true, 9 | "rust-analyzer.showUnlinkedFileNotification": false, 10 | // uncomment the target of your chip. 11 | //"rust-analyzer.cargo.target": "thumbv6m-none-eabi", 12 | //"rust-analyzer.cargo.target": "thumbv7m-none-eabi", 13 | //"rust-analyzer.cargo.target": "thumbv7em-none-eabi", 14 | "rust-analyzer.cargo.target": "thumbv7em-none-eabihf", 15 | //"rust-analyzer.cargo.target": "thumbv8m.main-none-eabihf", 16 | "rust-analyzer.cargo.features": [ 17 | // Uncomment if the example has a "nightly" feature. 18 | // "nightly", 19 | ], 20 | "rust-analyzer.linkedProjects": [ 21 | // Uncomment ONE line for the chip you want to work on. 22 | // This makes rust-analyzer work on the example crate and all its dependencies. 23 | // "example/rust-on-stm32f4/Cargo.toml", 24 | // "crates/stm32f4-extra/Cargo.toml" 25 | ], 26 | "lldb.displayFormat": "hex", 27 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "cargo", 6 | "command": "build", 7 | "problemMatcher": [ 8 | "$rustc" 9 | ], 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | }, 14 | "label": "rust: cargo build" 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "adler" 7 | version = "1.0.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 10 | 11 | [[package]] 12 | name = "ahash" 13 | version = "0.8.11" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" 16 | dependencies = [ 17 | "cfg-if", 18 | "once_cell", 19 | "version_check", 20 | "zerocopy", 21 | ] 22 | 23 | [[package]] 24 | name = "allocator-api2" 25 | version = "0.2.18" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" 28 | 29 | [[package]] 30 | name = "android-activity" 31 | version = "0.5.2" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" 34 | dependencies = [ 35 | "android-properties", 36 | "bitflags 2.5.0", 37 | "cc", 38 | "cesu8", 39 | "jni", 40 | "jni-sys", 41 | "libc", 42 | "log", 43 | "ndk", 44 | "ndk-context", 45 | "ndk-sys", 46 | "num_enum", 47 | "thiserror", 48 | ] 49 | 50 | [[package]] 51 | name = "android-properties" 52 | version = "0.2.2" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" 55 | 56 | [[package]] 57 | name = "arrayref" 58 | version = "0.3.7" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" 61 | 62 | [[package]] 63 | name = "arrayvec" 64 | version = "0.7.4" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" 67 | 68 | [[package]] 69 | name = "atomic-waker" 70 | version = "1.1.2" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 73 | 74 | [[package]] 75 | name = "auto_enums" 76 | version = "0.8.5" 77 | source = "registry+https://github.com/rust-lang/crates.io-index" 78 | checksum = "1899bfcfd9340ceea3533ea157360ba8fa864354eccbceab58e1006ecab35393" 79 | dependencies = [ 80 | "derive_utils", 81 | "proc-macro2", 82 | "quote", 83 | "syn 2.0.66", 84 | ] 85 | 86 | [[package]] 87 | name = "autocfg" 88 | version = "1.3.0" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" 91 | 92 | [[package]] 93 | name = "az" 94 | version = "1.2.1" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" 97 | 98 | [[package]] 99 | name = "bare-metal" 100 | version = "0.2.5" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "5deb64efa5bd81e31fcd1938615a6d98c82eafcbcd787162b6f63b91d6bac5b3" 103 | dependencies = [ 104 | "rustc_version 0.2.3", 105 | ] 106 | 107 | [[package]] 108 | name = "bare-metal" 109 | version = "1.0.0" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" 112 | 113 | [[package]] 114 | name = "base64" 115 | version = "0.21.7" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 118 | 119 | [[package]] 120 | name = "bit_field" 121 | version = "0.10.2" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" 124 | 125 | [[package]] 126 | name = "bitfield" 127 | version = "0.13.2" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "46afbd2983a5d5a7bd740ccb198caf5b82f45c40c09c0eed36052d91cb92e719" 130 | 131 | [[package]] 132 | name = "bitflags" 133 | version = "1.3.2" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 136 | 137 | [[package]] 138 | name = "bitflags" 139 | version = "2.5.0" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" 142 | 143 | [[package]] 144 | name = "block" 145 | version = "0.1.6" 146 | source = "registry+https://github.com/rust-lang/crates.io-index" 147 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 148 | 149 | [[package]] 150 | name = "block-sys" 151 | version = "0.2.1" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" 154 | dependencies = [ 155 | "objc-sys", 156 | ] 157 | 158 | [[package]] 159 | name = "block2" 160 | version = "0.3.0" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" 163 | dependencies = [ 164 | "block-sys", 165 | "objc2", 166 | ] 167 | 168 | [[package]] 169 | name = "bumpalo" 170 | version = "3.16.0" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 173 | 174 | [[package]] 175 | name = "by_address" 176 | version = "1.2.1" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" 179 | 180 | [[package]] 181 | name = "bytemuck" 182 | version = "1.16.0" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" 185 | dependencies = [ 186 | "bytemuck_derive", 187 | ] 188 | 189 | [[package]] 190 | name = "bytemuck_derive" 191 | version = "1.7.0" 192 | source = "registry+https://github.com/rust-lang/crates.io-index" 193 | checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" 194 | dependencies = [ 195 | "proc-macro2", 196 | "quote", 197 | "syn 2.0.66", 198 | ] 199 | 200 | [[package]] 201 | name = "byteorder" 202 | version = "1.5.0" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 205 | 206 | [[package]] 207 | name = "bytes" 208 | version = "1.6.0" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" 211 | 212 | [[package]] 213 | name = "calloop" 214 | version = "0.12.4" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" 217 | dependencies = [ 218 | "bitflags 2.5.0", 219 | "log", 220 | "polling", 221 | "rustix", 222 | "slab", 223 | "thiserror", 224 | ] 225 | 226 | [[package]] 227 | name = "cc" 228 | version = "1.0.99" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" 231 | dependencies = [ 232 | "jobserver", 233 | "libc", 234 | "once_cell", 235 | ] 236 | 237 | [[package]] 238 | name = "cesu8" 239 | version = "1.1.0" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 242 | 243 | [[package]] 244 | name = "cfg-if" 245 | version = "1.0.0" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 248 | 249 | [[package]] 250 | name = "cfg_aliases" 251 | version = "0.1.1" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" 254 | 255 | [[package]] 256 | name = "clipboard-win" 257 | version = "3.1.1" 258 | source = "registry+https://github.com/rust-lang/crates.io-index" 259 | checksum = "9fdf5e01086b6be750428ba4a40619f847eb2e95756eee84b18e06e5f0b50342" 260 | dependencies = [ 261 | "lazy-bytes-cast", 262 | "winapi", 263 | ] 264 | 265 | [[package]] 266 | name = "clru" 267 | version = "0.6.2" 268 | source = "registry+https://github.com/rust-lang/crates.io-index" 269 | checksum = "cbd0f76e066e64fdc5631e3bb46381254deab9ef1158292f27c8c57e3bf3fe59" 270 | 271 | [[package]] 272 | name = "cocoa" 273 | version = "0.25.0" 274 | source = "registry+https://github.com/rust-lang/crates.io-index" 275 | checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" 276 | dependencies = [ 277 | "bitflags 1.3.2", 278 | "block", 279 | "cocoa-foundation", 280 | "core-foundation", 281 | "core-graphics", 282 | "foreign-types", 283 | "libc", 284 | "objc", 285 | ] 286 | 287 | [[package]] 288 | name = "cocoa-foundation" 289 | version = "0.1.2" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" 292 | dependencies = [ 293 | "bitflags 1.3.2", 294 | "block", 295 | "core-foundation", 296 | "core-graphics-types", 297 | "libc", 298 | "objc", 299 | ] 300 | 301 | [[package]] 302 | name = "codemap" 303 | version = "0.1.3" 304 | source = "registry+https://github.com/rust-lang/crates.io-index" 305 | checksum = "b9e769b5c8c8283982a987c6e948e540254f1058d5a74b8794914d4ef5fc2a24" 306 | 307 | [[package]] 308 | name = "codemap-diagnostic" 309 | version = "0.1.2" 310 | source = "registry+https://github.com/rust-lang/crates.io-index" 311 | checksum = "cc20770be05b566a963bf91505e60412c4a2d016d1ef95c5512823bb085a8122" 312 | dependencies = [ 313 | "codemap", 314 | "termcolor", 315 | ] 316 | 317 | [[package]] 318 | name = "color_quant" 319 | version = "1.1.0" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" 322 | 323 | [[package]] 324 | name = "combine" 325 | version = "4.6.7" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" 328 | dependencies = [ 329 | "bytes", 330 | "memchr", 331 | ] 332 | 333 | [[package]] 334 | name = "concurrent-queue" 335 | version = "2.5.0" 336 | source = "registry+https://github.com/rust-lang/crates.io-index" 337 | checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" 338 | dependencies = [ 339 | "crossbeam-utils", 340 | ] 341 | 342 | [[package]] 343 | name = "const-field-offset" 344 | version = "0.1.5" 345 | source = "registry+https://github.com/rust-lang/crates.io-index" 346 | checksum = "91fcde4ca1211b5a94b573083c472ee19e86b19a441913f66e1cc5c41daf0255" 347 | dependencies = [ 348 | "const-field-offset-macro", 349 | "field-offset", 350 | ] 351 | 352 | [[package]] 353 | name = "const-field-offset-macro" 354 | version = "0.1.5" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | checksum = "5387f5bbc9e9e6c96436ea125afa12614cebf8ac67f49abc08c1e7a891466c90" 357 | dependencies = [ 358 | "proc-macro2", 359 | "quote", 360 | "syn 2.0.66", 361 | ] 362 | 363 | [[package]] 364 | name = "convert_case" 365 | version = "0.4.0" 366 | source = "registry+https://github.com/rust-lang/crates.io-index" 367 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 368 | 369 | [[package]] 370 | name = "copypasta" 371 | version = "0.10.1" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "deb85422867ca93da58b7f95fb5c0c10f6183ed6e1ef8841568968a896d3a858" 374 | dependencies = [ 375 | "clipboard-win", 376 | "objc", 377 | "objc-foundation", 378 | "objc_id", 379 | ] 380 | 381 | [[package]] 382 | name = "core-foundation" 383 | version = "0.9.4" 384 | source = "registry+https://github.com/rust-lang/crates.io-index" 385 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 386 | dependencies = [ 387 | "core-foundation-sys", 388 | "libc", 389 | ] 390 | 391 | [[package]] 392 | name = "core-foundation-sys" 393 | version = "0.8.6" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 396 | 397 | [[package]] 398 | name = "core-graphics" 399 | version = "0.23.2" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" 402 | dependencies = [ 403 | "bitflags 1.3.2", 404 | "core-foundation", 405 | "core-graphics-types", 406 | "foreign-types", 407 | "libc", 408 | ] 409 | 410 | [[package]] 411 | name = "core-graphics-types" 412 | version = "0.1.3" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" 415 | dependencies = [ 416 | "bitflags 1.3.2", 417 | "core-foundation", 418 | "libc", 419 | ] 420 | 421 | [[package]] 422 | name = "cortex-m" 423 | version = "0.7.7" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "8ec610d8f49840a5b376c69663b6369e71f4b34484b9b2eb29fb918d92516cb9" 426 | dependencies = [ 427 | "bare-metal 0.2.5", 428 | "bitfield", 429 | "critical-section", 430 | "embedded-hal 0.2.7", 431 | "volatile-register", 432 | ] 433 | 434 | [[package]] 435 | name = "cortex-m-rt" 436 | version = "0.7.3" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "ee84e813d593101b1723e13ec38b6ab6abbdbaaa4546553f5395ed274079ddb1" 439 | dependencies = [ 440 | "cortex-m-rt-macros", 441 | ] 442 | 443 | [[package]] 444 | name = "cortex-m-rt-macros" 445 | version = "0.7.0" 446 | source = "registry+https://github.com/rust-lang/crates.io-index" 447 | checksum = "f0f6f3e36f203cfedbc78b357fb28730aa2c6dc1ab060ee5c2405e843988d3c7" 448 | dependencies = [ 449 | "proc-macro2", 450 | "quote", 451 | "syn 1.0.109", 452 | ] 453 | 454 | [[package]] 455 | name = "cortex-m-semihosting" 456 | version = "0.5.0" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | checksum = "c23234600452033cc77e4b761e740e02d2c4168e11dbf36ab14a0f58973592b0" 459 | dependencies = [ 460 | "cortex-m", 461 | ] 462 | 463 | [[package]] 464 | name = "countme" 465 | version = "3.0.1" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636" 468 | 469 | [[package]] 470 | name = "crc32fast" 471 | version = "1.4.2" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 474 | dependencies = [ 475 | "cfg-if", 476 | ] 477 | 478 | [[package]] 479 | name = "critical-section" 480 | version = "1.1.2" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" 483 | 484 | [[package]] 485 | name = "crossbeam-deque" 486 | version = "0.8.5" 487 | source = "registry+https://github.com/rust-lang/crates.io-index" 488 | checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" 489 | dependencies = [ 490 | "crossbeam-epoch", 491 | "crossbeam-utils", 492 | ] 493 | 494 | [[package]] 495 | name = "crossbeam-epoch" 496 | version = "0.9.18" 497 | source = "registry+https://github.com/rust-lang/crates.io-index" 498 | checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 499 | dependencies = [ 500 | "crossbeam-utils", 501 | ] 502 | 503 | [[package]] 504 | name = "crossbeam-utils" 505 | version = "0.8.20" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" 508 | 509 | [[package]] 510 | name = "crunchy" 511 | version = "0.2.2" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 514 | 515 | [[package]] 516 | name = "css-color-parser2" 517 | version = "1.0.1" 518 | source = "registry+https://github.com/rust-lang/crates.io-index" 519 | checksum = "cf8ed1639f4b56ec6f31d007ff66ce4a13099dce5a9995d48368a30d62bf04bd" 520 | dependencies = [ 521 | "lazy_static", 522 | ] 523 | 524 | [[package]] 525 | name = "cursor-icon" 526 | version = "1.1.0" 527 | source = "registry+https://github.com/rust-lang/crates.io-index" 528 | checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" 529 | 530 | [[package]] 531 | name = "data-url" 532 | version = "0.3.1" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" 535 | 536 | [[package]] 537 | name = "defmt" 538 | version = "0.3.8" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "a99dd22262668b887121d4672af5a64b238f026099f1a2a1b322066c9ecfe9e0" 541 | dependencies = [ 542 | "bitflags 1.3.2", 543 | "defmt-macros", 544 | ] 545 | 546 | [[package]] 547 | name = "defmt-macros" 548 | version = "0.3.9" 549 | source = "registry+https://github.com/rust-lang/crates.io-index" 550 | checksum = "e3a9f309eff1f79b3ebdf252954d90ae440599c26c2c553fe87a2d17195f2dcb" 551 | dependencies = [ 552 | "defmt-parser", 553 | "proc-macro-error", 554 | "proc-macro2", 555 | "quote", 556 | "syn 2.0.66", 557 | ] 558 | 559 | [[package]] 560 | name = "defmt-parser" 561 | version = "0.3.4" 562 | source = "registry+https://github.com/rust-lang/crates.io-index" 563 | checksum = "ff4a5fefe330e8d7f31b16a318f9ce81000d8e35e69b93eae154d16d2278f70f" 564 | dependencies = [ 565 | "thiserror", 566 | ] 567 | 568 | [[package]] 569 | name = "defmt-rtt" 570 | version = "0.4.1" 571 | source = "registry+https://github.com/rust-lang/crates.io-index" 572 | checksum = "bab697b3dbbc1750b7c8b821aa6f6e7f2480b47a99bc057a2ed7b170ebef0c51" 573 | dependencies = [ 574 | "critical-section", 575 | "defmt", 576 | ] 577 | 578 | [[package]] 579 | name = "deranged" 580 | version = "0.3.11" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 583 | dependencies = [ 584 | "powerfmt", 585 | ] 586 | 587 | [[package]] 588 | name = "derive_more" 589 | version = "0.99.17" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 592 | dependencies = [ 593 | "convert_case", 594 | "proc-macro2", 595 | "quote", 596 | "rustc_version 0.4.0", 597 | "syn 1.0.109", 598 | ] 599 | 600 | [[package]] 601 | name = "derive_utils" 602 | version = "0.14.1" 603 | source = "registry+https://github.com/rust-lang/crates.io-index" 604 | checksum = "61bb5a1014ce6dfc2a378578509abe775a5aa06bff584a547555d9efdb81b926" 605 | dependencies = [ 606 | "proc-macro2", 607 | "quote", 608 | "syn 2.0.66", 609 | ] 610 | 611 | [[package]] 612 | name = "dispatch" 613 | version = "0.2.0" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" 616 | 617 | [[package]] 618 | name = "dlib" 619 | version = "0.5.2" 620 | source = "registry+https://github.com/rust-lang/crates.io-index" 621 | checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" 622 | dependencies = [ 623 | "libloading", 624 | ] 625 | 626 | [[package]] 627 | name = "either" 628 | version = "1.12.0" 629 | source = "registry+https://github.com/rust-lang/crates.io-index" 630 | checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" 631 | 632 | [[package]] 633 | name = "embedded-alloc" 634 | version = "0.5.1" 635 | source = "registry+https://github.com/rust-lang/crates.io-index" 636 | checksum = "ddae17915accbac2cfbc64ea0ae6e3b330e6ea124ba108dada63646fd3c6f815" 637 | dependencies = [ 638 | "critical-section", 639 | "linked_list_allocator", 640 | ] 641 | 642 | [[package]] 643 | name = "embedded-display-controller" 644 | version = "0.1.0" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "ffc1ad28dd4c343f76efea8db30b156b9ad2ce0fffec8b89d2ff3ba5331494f2" 647 | 648 | [[package]] 649 | name = "embedded-dma" 650 | version = "0.2.0" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | checksum = "994f7e5b5cb23521c22304927195f236813053eb9c065dd2226a32ba64695446" 653 | dependencies = [ 654 | "stable_deref_trait", 655 | ] 656 | 657 | [[package]] 658 | name = "embedded-graphics" 659 | version = "0.8.1" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | checksum = "0649998afacf6d575d126d83e68b78c0ab0e00ca2ac7e9b3db11b4cbe8274ef0" 662 | dependencies = [ 663 | "az", 664 | "byteorder", 665 | "embedded-graphics-core", 666 | "float-cmp", 667 | "micromath", 668 | ] 669 | 670 | [[package]] 671 | name = "embedded-graphics-core" 672 | version = "0.4.0" 673 | source = "registry+https://github.com/rust-lang/crates.io-index" 674 | checksum = "ba9ecd261f991856250d2207f6d8376946cd9f412a2165d3b75bc87a0bc7a044" 675 | dependencies = [ 676 | "az", 677 | "byteorder", 678 | ] 679 | 680 | [[package]] 681 | name = "embedded-hal" 682 | version = "0.2.7" 683 | source = "registry+https://github.com/rust-lang/crates.io-index" 684 | checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff" 685 | dependencies = [ 686 | "nb 0.1.3", 687 | "void", 688 | ] 689 | 690 | [[package]] 691 | name = "embedded-hal" 692 | version = "1.0.0-rc.2" 693 | source = "registry+https://github.com/rust-lang/crates.io-index" 694 | checksum = "3e57ec6ad0bc8eb967cf9c9f144177f5e8f2f6f02dad0b8b683f9f05f6b22def" 695 | 696 | [[package]] 697 | name = "embedded-hal-nb" 698 | version = "1.0.0-rc.2" 699 | source = "registry+https://github.com/rust-lang/crates.io-index" 700 | checksum = "67c4325112d63ff5991e2841960a1320516c33ff7237e924eaab0772b1123703" 701 | dependencies = [ 702 | "embedded-hal 1.0.0-rc.2", 703 | "nb 1.1.0", 704 | ] 705 | 706 | [[package]] 707 | name = "embedded-storage" 708 | version = "0.3.1" 709 | source = "registry+https://github.com/rust-lang/crates.io-index" 710 | checksum = "a21dea9854beb860f3062d10228ce9b976da520a73474aed3171ec276bc0c032" 711 | 712 | [[package]] 713 | name = "embedded-time" 714 | version = "0.12.1" 715 | source = "registry+https://github.com/rust-lang/crates.io-index" 716 | checksum = "d7a4b4d10ac48d08bfe3db7688c402baadb244721f30a77ce360bd24c3dffe58" 717 | dependencies = [ 718 | "num", 719 | ] 720 | 721 | [[package]] 722 | name = "enumflags2" 723 | version = "0.7.10" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" 726 | dependencies = [ 727 | "enumflags2_derive", 728 | ] 729 | 730 | [[package]] 731 | name = "enumflags2_derive" 732 | version = "0.7.10" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" 735 | dependencies = [ 736 | "proc-macro2", 737 | "quote", 738 | "syn 2.0.66", 739 | ] 740 | 741 | [[package]] 742 | name = "equivalent" 743 | version = "1.0.1" 744 | source = "registry+https://github.com/rust-lang/crates.io-index" 745 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 746 | 747 | [[package]] 748 | name = "errno" 749 | version = "0.3.9" 750 | source = "registry+https://github.com/rust-lang/crates.io-index" 751 | checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" 752 | dependencies = [ 753 | "libc", 754 | "windows-sys 0.52.0", 755 | ] 756 | 757 | [[package]] 758 | name = "euclid" 759 | version = "0.22.10" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "e0f0eb73b934648cd7a4a61f1b15391cd95dab0b4da6e2e66c2a072c144b4a20" 762 | dependencies = [ 763 | "num-traits", 764 | ] 765 | 766 | [[package]] 767 | name = "exr" 768 | version = "1.72.0" 769 | source = "registry+https://github.com/rust-lang/crates.io-index" 770 | checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" 771 | dependencies = [ 772 | "bit_field", 773 | "flume", 774 | "half", 775 | "lebe", 776 | "miniz_oxide", 777 | "rayon-core", 778 | "smallvec", 779 | "zune-inflate", 780 | ] 781 | 782 | [[package]] 783 | name = "fdeflate" 784 | version = "0.3.4" 785 | source = "registry+https://github.com/rust-lang/crates.io-index" 786 | checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" 787 | dependencies = [ 788 | "simd-adler32", 789 | ] 790 | 791 | [[package]] 792 | name = "field-offset" 793 | version = "0.3.6" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" 796 | dependencies = [ 797 | "memoffset", 798 | "rustc_version 0.4.0", 799 | ] 800 | 801 | [[package]] 802 | name = "flate2" 803 | version = "1.0.30" 804 | source = "registry+https://github.com/rust-lang/crates.io-index" 805 | checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" 806 | dependencies = [ 807 | "crc32fast", 808 | "miniz_oxide", 809 | ] 810 | 811 | [[package]] 812 | name = "float-cmp" 813 | version = "0.9.0" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" 816 | dependencies = [ 817 | "num-traits", 818 | ] 819 | 820 | [[package]] 821 | name = "flume" 822 | version = "0.11.0" 823 | source = "registry+https://github.com/rust-lang/crates.io-index" 824 | checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" 825 | dependencies = [ 826 | "spin", 827 | ] 828 | 829 | [[package]] 830 | name = "fontconfig-parser" 831 | version = "0.5.6" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | checksum = "6a595cb550439a117696039dfc69830492058211b771a2a165379f2a1a53d84d" 834 | dependencies = [ 835 | "roxmltree 0.19.0", 836 | ] 837 | 838 | [[package]] 839 | name = "fontdb" 840 | version = "0.15.0" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "020e203f177c0fb250fb19455a252e838d2bbbce1f80f25ecc42402aafa8cd38" 843 | dependencies = [ 844 | "fontconfig-parser", 845 | "log", 846 | "memmap2", 847 | "slotmap", 848 | "tinyvec", 849 | "ttf-parser 0.19.2", 850 | ] 851 | 852 | [[package]] 853 | name = "fontdue" 854 | version = "0.8.0" 855 | source = "registry+https://github.com/rust-lang/crates.io-index" 856 | checksum = "9099a2f86b8e674b75d03ff154b3fe4c5208ed249ced8d69cc313a9fa40bb488" 857 | dependencies = [ 858 | "hashbrown", 859 | "ttf-parser 0.20.0", 860 | ] 861 | 862 | [[package]] 863 | name = "foreign-types" 864 | version = "0.5.0" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" 867 | dependencies = [ 868 | "foreign-types-macros", 869 | "foreign-types-shared", 870 | ] 871 | 872 | [[package]] 873 | name = "foreign-types-macros" 874 | version = "0.2.3" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" 877 | dependencies = [ 878 | "proc-macro2", 879 | "quote", 880 | "syn 2.0.66", 881 | ] 882 | 883 | [[package]] 884 | name = "foreign-types-shared" 885 | version = "0.3.1" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" 888 | 889 | [[package]] 890 | name = "form_urlencoded" 891 | version = "1.2.1" 892 | source = "registry+https://github.com/rust-lang/crates.io-index" 893 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 894 | dependencies = [ 895 | "percent-encoding", 896 | ] 897 | 898 | [[package]] 899 | name = "fugit" 900 | version = "0.3.7" 901 | source = "registry+https://github.com/rust-lang/crates.io-index" 902 | checksum = "17186ad64927d5ac8f02c1e77ccefa08ccd9eaa314d5a4772278aa204a22f7e7" 903 | dependencies = [ 904 | "gcd", 905 | ] 906 | 907 | [[package]] 908 | name = "fugit-timer" 909 | version = "0.1.3" 910 | source = "registry+https://github.com/rust-lang/crates.io-index" 911 | checksum = "d9607bfc4c388f9d629704f56ede4a007546cad417b3bcd6fc7c87dc7edce04a" 912 | dependencies = [ 913 | "fugit", 914 | "nb 1.1.0", 915 | ] 916 | 917 | [[package]] 918 | name = "gcd" 919 | version = "2.3.0" 920 | source = "registry+https://github.com/rust-lang/crates.io-index" 921 | checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" 922 | 923 | [[package]] 924 | name = "getrandom" 925 | version = "0.2.15" 926 | source = "registry+https://github.com/rust-lang/crates.io-index" 927 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 928 | dependencies = [ 929 | "cfg-if", 930 | "libc", 931 | "wasi", 932 | ] 933 | 934 | [[package]] 935 | name = "gif" 936 | version = "0.13.1" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" 939 | dependencies = [ 940 | "color_quant", 941 | "weezl", 942 | ] 943 | 944 | [[package]] 945 | name = "half" 946 | version = "2.4.1" 947 | source = "registry+https://github.com/rust-lang/crates.io-index" 948 | checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" 949 | dependencies = [ 950 | "cfg-if", 951 | "crunchy", 952 | ] 953 | 954 | [[package]] 955 | name = "hashbrown" 956 | version = "0.14.5" 957 | source = "registry+https://github.com/rust-lang/crates.io-index" 958 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 959 | dependencies = [ 960 | "ahash", 961 | "allocator-api2", 962 | ] 963 | 964 | [[package]] 965 | name = "heck" 966 | version = "0.4.1" 967 | source = "registry+https://github.com/rust-lang/crates.io-index" 968 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 969 | 970 | [[package]] 971 | name = "hermit-abi" 972 | version = "0.3.9" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 975 | 976 | [[package]] 977 | name = "i-slint-backend-selector" 978 | version = "1.3.2" 979 | source = "registry+https://github.com/rust-lang/crates.io-index" 980 | checksum = "074d3ca24790f1be67e969c86356483cf9bef58ca77ef5d0a8051d25ddddc601" 981 | dependencies = [ 982 | "cfg-if", 983 | "i-slint-backend-winit", 984 | "i-slint-common", 985 | "i-slint-core", 986 | ] 987 | 988 | [[package]] 989 | name = "i-slint-backend-winit" 990 | version = "1.3.2" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "565ece613df99476e516a8a3c853269795fc06b553f66ed0a8f7159d4cb5c975" 993 | dependencies = [ 994 | "bytemuck", 995 | "cfg-if", 996 | "cfg_aliases", 997 | "cocoa", 998 | "const-field-offset", 999 | "copypasta", 1000 | "derive_more", 1001 | "i-slint-common", 1002 | "i-slint-core", 1003 | "i-slint-core-macros", 1004 | "imgref", 1005 | "lyon_path", 1006 | "once_cell", 1007 | "pin-weak", 1008 | "raw-window-handle", 1009 | "rgb", 1010 | "scoped-tls-hkt", 1011 | "scopeguard", 1012 | "send_wrapper", 1013 | "softbuffer", 1014 | "vtable", 1015 | "wasm-bindgen", 1016 | "web-sys", 1017 | "winit", 1018 | ] 1019 | 1020 | [[package]] 1021 | name = "i-slint-common" 1022 | version = "1.3.2" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | checksum = "6666bf1b9c3140d426071dda1af839ce46c0f482f3513eecf700609f0cd43865" 1025 | dependencies = [ 1026 | "cfg-if", 1027 | "derive_more", 1028 | "fontdb", 1029 | "libloading", 1030 | ] 1031 | 1032 | [[package]] 1033 | name = "i-slint-compiler" 1034 | version = "1.3.2" 1035 | source = "registry+https://github.com/rust-lang/crates.io-index" 1036 | checksum = "27248681505254959a803253f3c8539b66412c14654d2dc905be869a7ff20159" 1037 | dependencies = [ 1038 | "by_address", 1039 | "codemap", 1040 | "codemap-diagnostic", 1041 | "css-color-parser2", 1042 | "derive_more", 1043 | "fontdue", 1044 | "i-slint-common", 1045 | "image", 1046 | "itertools", 1047 | "linked_hash_set", 1048 | "lyon_extra", 1049 | "lyon_path", 1050 | "num_enum", 1051 | "once_cell", 1052 | "proc-macro2", 1053 | "quote", 1054 | "resvg", 1055 | "rowan", 1056 | "smol_str", 1057 | "strum", 1058 | "thiserror", 1059 | "url", 1060 | ] 1061 | 1062 | [[package]] 1063 | name = "i-slint-core" 1064 | version = "1.3.2" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "462a3ca4e929f66d39a00436257baa5a4fb3e287c16675f2219757b67b2dad94" 1067 | dependencies = [ 1068 | "auto_enums", 1069 | "bytemuck", 1070 | "cfg-if", 1071 | "clru", 1072 | "const-field-offset", 1073 | "derive_more", 1074 | "euclid", 1075 | "fontdue", 1076 | "i-slint-common", 1077 | "i-slint-core-macros", 1078 | "image", 1079 | "integer-sqrt", 1080 | "lyon_algorithms", 1081 | "lyon_extra", 1082 | "lyon_geom", 1083 | "lyon_path", 1084 | "num-traits", 1085 | "once_cell", 1086 | "pin-project", 1087 | "pin-weak", 1088 | "portable-atomic", 1089 | "resvg", 1090 | "rgb", 1091 | "rustybuzz 0.11.0", 1092 | "scoped-tls-hkt", 1093 | "scopeguard", 1094 | "slab", 1095 | "static_assertions", 1096 | "strum", 1097 | "unicode-linebreak", 1098 | "unicode-script", 1099 | "unicode-segmentation", 1100 | "vtable", 1101 | "wasm-bindgen", 1102 | "web-sys", 1103 | "web-time", 1104 | ] 1105 | 1106 | [[package]] 1107 | name = "i-slint-core-macros" 1108 | version = "1.3.2" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "9148dba9642f055cdda5060f2e82be4a4c1c4a046ea1d08970e9279220b7ed13" 1111 | dependencies = [ 1112 | "quote", 1113 | "syn 2.0.66", 1114 | ] 1115 | 1116 | [[package]] 1117 | name = "icrate" 1118 | version = "0.0.4" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" 1121 | dependencies = [ 1122 | "block2", 1123 | "dispatch", 1124 | "objc2", 1125 | ] 1126 | 1127 | [[package]] 1128 | name = "idna" 1129 | version = "0.5.0" 1130 | source = "registry+https://github.com/rust-lang/crates.io-index" 1131 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 1132 | dependencies = [ 1133 | "unicode-bidi", 1134 | "unicode-normalization", 1135 | ] 1136 | 1137 | [[package]] 1138 | name = "image" 1139 | version = "0.24.9" 1140 | source = "registry+https://github.com/rust-lang/crates.io-index" 1141 | checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" 1142 | dependencies = [ 1143 | "bytemuck", 1144 | "byteorder", 1145 | "color_quant", 1146 | "exr", 1147 | "gif", 1148 | "jpeg-decoder", 1149 | "num-traits", 1150 | "png", 1151 | "qoi", 1152 | "tiff", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "imagesize" 1157 | version = "0.12.0" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" 1160 | 1161 | [[package]] 1162 | name = "imgref" 1163 | version = "1.10.1" 1164 | source = "registry+https://github.com/rust-lang/crates.io-index" 1165 | checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" 1166 | 1167 | [[package]] 1168 | name = "indexmap" 1169 | version = "2.2.6" 1170 | source = "registry+https://github.com/rust-lang/crates.io-index" 1171 | checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" 1172 | dependencies = [ 1173 | "equivalent", 1174 | "hashbrown", 1175 | ] 1176 | 1177 | [[package]] 1178 | name = "integer-sqrt" 1179 | version = "0.1.5" 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" 1181 | checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" 1182 | dependencies = [ 1183 | "num-traits", 1184 | ] 1185 | 1186 | [[package]] 1187 | name = "itertools" 1188 | version = "0.12.1" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" 1191 | dependencies = [ 1192 | "either", 1193 | ] 1194 | 1195 | [[package]] 1196 | name = "jni" 1197 | version = "0.21.1" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 1200 | dependencies = [ 1201 | "cesu8", 1202 | "cfg-if", 1203 | "combine", 1204 | "jni-sys", 1205 | "log", 1206 | "thiserror", 1207 | "walkdir", 1208 | "windows-sys 0.45.0", 1209 | ] 1210 | 1211 | [[package]] 1212 | name = "jni-sys" 1213 | version = "0.3.0" 1214 | source = "registry+https://github.com/rust-lang/crates.io-index" 1215 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 1216 | 1217 | [[package]] 1218 | name = "jobserver" 1219 | version = "0.1.31" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" 1222 | dependencies = [ 1223 | "libc", 1224 | ] 1225 | 1226 | [[package]] 1227 | name = "jpeg-decoder" 1228 | version = "0.3.1" 1229 | source = "registry+https://github.com/rust-lang/crates.io-index" 1230 | checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" 1231 | dependencies = [ 1232 | "rayon", 1233 | ] 1234 | 1235 | [[package]] 1236 | name = "js-sys" 1237 | version = "0.3.69" 1238 | source = "registry+https://github.com/rust-lang/crates.io-index" 1239 | checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" 1240 | dependencies = [ 1241 | "wasm-bindgen", 1242 | ] 1243 | 1244 | [[package]] 1245 | name = "kurbo" 1246 | version = "0.9.5" 1247 | source = "registry+https://github.com/rust-lang/crates.io-index" 1248 | checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" 1249 | dependencies = [ 1250 | "arrayvec", 1251 | ] 1252 | 1253 | [[package]] 1254 | name = "lazy-bytes-cast" 1255 | version = "5.0.1" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | checksum = "10257499f089cd156ad82d0a9cd57d9501fa2c989068992a97eb3c27836f206b" 1258 | 1259 | [[package]] 1260 | name = "lazy_static" 1261 | version = "1.4.0" 1262 | source = "registry+https://github.com/rust-lang/crates.io-index" 1263 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1264 | 1265 | [[package]] 1266 | name = "lebe" 1267 | version = "0.5.2" 1268 | source = "registry+https://github.com/rust-lang/crates.io-index" 1269 | checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" 1270 | 1271 | [[package]] 1272 | name = "libc" 1273 | version = "0.2.155" 1274 | source = "registry+https://github.com/rust-lang/crates.io-index" 1275 | checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" 1276 | 1277 | [[package]] 1278 | name = "libloading" 1279 | version = "0.8.3" 1280 | source = "registry+https://github.com/rust-lang/crates.io-index" 1281 | checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" 1282 | dependencies = [ 1283 | "cfg-if", 1284 | "windows-targets 0.52.5", 1285 | ] 1286 | 1287 | [[package]] 1288 | name = "libm" 1289 | version = "0.2.8" 1290 | source = "registry+https://github.com/rust-lang/crates.io-index" 1291 | checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" 1292 | 1293 | [[package]] 1294 | name = "libredox" 1295 | version = "0.0.2" 1296 | source = "registry+https://github.com/rust-lang/crates.io-index" 1297 | checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" 1298 | dependencies = [ 1299 | "bitflags 2.5.0", 1300 | "libc", 1301 | "redox_syscall 0.4.1", 1302 | ] 1303 | 1304 | [[package]] 1305 | name = "lilos" 1306 | version = "1.0.0-pre.0" 1307 | source = "git+https://github.com/cbiffle/lilos.git?rev=02cf2940149352f1cc6e1c94f178d9071ea14652#02cf2940149352f1cc6e1c94f178d9071ea14652" 1308 | dependencies = [ 1309 | "cfg-if", 1310 | "cortex-m", 1311 | "cortex-m-rt", 1312 | "pin-project-lite", 1313 | ] 1314 | 1315 | [[package]] 1316 | name = "linked-hash-map" 1317 | version = "0.5.6" 1318 | source = "registry+https://github.com/rust-lang/crates.io-index" 1319 | checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 1320 | 1321 | [[package]] 1322 | name = "linked_hash_set" 1323 | version = "0.1.4" 1324 | source = "registry+https://github.com/rust-lang/crates.io-index" 1325 | checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" 1326 | dependencies = [ 1327 | "linked-hash-map", 1328 | ] 1329 | 1330 | [[package]] 1331 | name = "linked_list_allocator" 1332 | version = "0.10.5" 1333 | source = "registry+https://github.com/rust-lang/crates.io-index" 1334 | checksum = "9afa463f5405ee81cdb9cc2baf37e08ec7e4c8209442b5d72c04cfb2cd6e6286" 1335 | 1336 | [[package]] 1337 | name = "linux-raw-sys" 1338 | version = "0.4.14" 1339 | source = "registry+https://github.com/rust-lang/crates.io-index" 1340 | checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 1341 | 1342 | [[package]] 1343 | name = "lock_api" 1344 | version = "0.4.12" 1345 | source = "registry+https://github.com/rust-lang/crates.io-index" 1346 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 1347 | dependencies = [ 1348 | "autocfg", 1349 | "scopeguard", 1350 | ] 1351 | 1352 | [[package]] 1353 | name = "log" 1354 | version = "0.4.21" 1355 | source = "registry+https://github.com/rust-lang/crates.io-index" 1356 | checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" 1357 | 1358 | [[package]] 1359 | name = "lyon_algorithms" 1360 | version = "1.0.4" 1361 | source = "registry+https://github.com/rust-lang/crates.io-index" 1362 | checksum = "a3bca95f9a4955b3e4a821fbbcd5edfbd9be2a9a50bb5758173e5358bfb4c623" 1363 | dependencies = [ 1364 | "lyon_path", 1365 | "num-traits", 1366 | ] 1367 | 1368 | [[package]] 1369 | name = "lyon_extra" 1370 | version = "1.0.2" 1371 | source = "registry+https://github.com/rust-lang/crates.io-index" 1372 | checksum = "8c4a243ce61e7e5f3ae6c72a88d8fb081b6c69f13500c15e99cfd1159a833b20" 1373 | dependencies = [ 1374 | "lyon_path", 1375 | "thiserror", 1376 | ] 1377 | 1378 | [[package]] 1379 | name = "lyon_geom" 1380 | version = "1.0.5" 1381 | source = "registry+https://github.com/rust-lang/crates.io-index" 1382 | checksum = "edecfb8d234a2b0be031ab02ebcdd9f3b9ee418fb35e265f7a540a48d197bff9" 1383 | dependencies = [ 1384 | "arrayvec", 1385 | "euclid", 1386 | "num-traits", 1387 | ] 1388 | 1389 | [[package]] 1390 | name = "lyon_path" 1391 | version = "1.0.5" 1392 | source = "registry+https://github.com/rust-lang/crates.io-index" 1393 | checksum = "9c08a606c7a59638d6c6aa18ac91a06aa9fb5f765a7efb27e6a4da58700740d7" 1394 | dependencies = [ 1395 | "lyon_geom", 1396 | "num-traits", 1397 | ] 1398 | 1399 | [[package]] 1400 | name = "malloc_buf" 1401 | version = "0.0.6" 1402 | source = "registry+https://github.com/rust-lang/crates.io-index" 1403 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" 1404 | dependencies = [ 1405 | "libc", 1406 | ] 1407 | 1408 | [[package]] 1409 | name = "memchr" 1410 | version = "2.7.2" 1411 | source = "registry+https://github.com/rust-lang/crates.io-index" 1412 | checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" 1413 | 1414 | [[package]] 1415 | name = "memmap2" 1416 | version = "0.8.0" 1417 | source = "registry+https://github.com/rust-lang/crates.io-index" 1418 | checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" 1419 | dependencies = [ 1420 | "libc", 1421 | ] 1422 | 1423 | [[package]] 1424 | name = "memoffset" 1425 | version = "0.9.1" 1426 | source = "registry+https://github.com/rust-lang/crates.io-index" 1427 | checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" 1428 | dependencies = [ 1429 | "autocfg", 1430 | ] 1431 | 1432 | [[package]] 1433 | name = "micromath" 1434 | version = "2.1.0" 1435 | source = "registry+https://github.com/rust-lang/crates.io-index" 1436 | checksum = "c3c8dda44ff03a2f238717214da50f65d5a53b45cd213a7370424ffdb6fae815" 1437 | 1438 | [[package]] 1439 | name = "miniz_oxide" 1440 | version = "0.7.3" 1441 | source = "registry+https://github.com/rust-lang/crates.io-index" 1442 | checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" 1443 | dependencies = [ 1444 | "adler", 1445 | "simd-adler32", 1446 | ] 1447 | 1448 | [[package]] 1449 | name = "nb" 1450 | version = "0.1.3" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" 1453 | dependencies = [ 1454 | "nb 1.1.0", 1455 | ] 1456 | 1457 | [[package]] 1458 | name = "nb" 1459 | version = "1.1.0" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d" 1462 | 1463 | [[package]] 1464 | name = "ndk" 1465 | version = "0.8.0" 1466 | source = "registry+https://github.com/rust-lang/crates.io-index" 1467 | checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" 1468 | dependencies = [ 1469 | "bitflags 2.5.0", 1470 | "jni-sys", 1471 | "log", 1472 | "ndk-sys", 1473 | "num_enum", 1474 | "raw-window-handle", 1475 | "thiserror", 1476 | ] 1477 | 1478 | [[package]] 1479 | name = "ndk-context" 1480 | version = "0.1.1" 1481 | source = "registry+https://github.com/rust-lang/crates.io-index" 1482 | checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 1483 | 1484 | [[package]] 1485 | name = "ndk-sys" 1486 | version = "0.5.0+25.2.9519653" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" 1489 | dependencies = [ 1490 | "jni-sys", 1491 | ] 1492 | 1493 | [[package]] 1494 | name = "num" 1495 | version = "0.3.1" 1496 | source = "registry+https://github.com/rust-lang/crates.io-index" 1497 | checksum = "8b7a8e9be5e039e2ff869df49155f1c06bd01ade2117ec783e56ab0932b67a8f" 1498 | dependencies = [ 1499 | "num-complex", 1500 | "num-integer", 1501 | "num-iter", 1502 | "num-rational", 1503 | "num-traits", 1504 | ] 1505 | 1506 | [[package]] 1507 | name = "num-complex" 1508 | version = "0.3.1" 1509 | source = "registry+https://github.com/rust-lang/crates.io-index" 1510 | checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" 1511 | dependencies = [ 1512 | "num-traits", 1513 | ] 1514 | 1515 | [[package]] 1516 | name = "num-conv" 1517 | version = "0.1.0" 1518 | source = "registry+https://github.com/rust-lang/crates.io-index" 1519 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 1520 | 1521 | [[package]] 1522 | name = "num-integer" 1523 | version = "0.1.46" 1524 | source = "registry+https://github.com/rust-lang/crates.io-index" 1525 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1526 | dependencies = [ 1527 | "num-traits", 1528 | ] 1529 | 1530 | [[package]] 1531 | name = "num-iter" 1532 | version = "0.1.45" 1533 | source = "registry+https://github.com/rust-lang/crates.io-index" 1534 | checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" 1535 | dependencies = [ 1536 | "autocfg", 1537 | "num-integer", 1538 | "num-traits", 1539 | ] 1540 | 1541 | [[package]] 1542 | name = "num-rational" 1543 | version = "0.3.2" 1544 | source = "registry+https://github.com/rust-lang/crates.io-index" 1545 | checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" 1546 | dependencies = [ 1547 | "autocfg", 1548 | "num-integer", 1549 | "num-traits", 1550 | ] 1551 | 1552 | [[package]] 1553 | name = "num-traits" 1554 | version = "0.2.19" 1555 | source = "registry+https://github.com/rust-lang/crates.io-index" 1556 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1557 | dependencies = [ 1558 | "autocfg", 1559 | "libm", 1560 | ] 1561 | 1562 | [[package]] 1563 | name = "num_enum" 1564 | version = "0.7.2" 1565 | source = "registry+https://github.com/rust-lang/crates.io-index" 1566 | checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" 1567 | dependencies = [ 1568 | "num_enum_derive", 1569 | ] 1570 | 1571 | [[package]] 1572 | name = "num_enum_derive" 1573 | version = "0.7.2" 1574 | source = "registry+https://github.com/rust-lang/crates.io-index" 1575 | checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" 1576 | dependencies = [ 1577 | "proc-macro-crate", 1578 | "proc-macro2", 1579 | "quote", 1580 | "syn 2.0.66", 1581 | ] 1582 | 1583 | [[package]] 1584 | name = "objc" 1585 | version = "0.2.7" 1586 | source = "registry+https://github.com/rust-lang/crates.io-index" 1587 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" 1588 | dependencies = [ 1589 | "malloc_buf", 1590 | ] 1591 | 1592 | [[package]] 1593 | name = "objc-foundation" 1594 | version = "0.1.1" 1595 | source = "registry+https://github.com/rust-lang/crates.io-index" 1596 | checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" 1597 | dependencies = [ 1598 | "block", 1599 | "objc", 1600 | "objc_id", 1601 | ] 1602 | 1603 | [[package]] 1604 | name = "objc-sys" 1605 | version = "0.3.5" 1606 | source = "registry+https://github.com/rust-lang/crates.io-index" 1607 | checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" 1608 | 1609 | [[package]] 1610 | name = "objc2" 1611 | version = "0.4.1" 1612 | source = "registry+https://github.com/rust-lang/crates.io-index" 1613 | checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" 1614 | dependencies = [ 1615 | "objc-sys", 1616 | "objc2-encode", 1617 | ] 1618 | 1619 | [[package]] 1620 | name = "objc2-encode" 1621 | version = "3.0.0" 1622 | source = "registry+https://github.com/rust-lang/crates.io-index" 1623 | checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" 1624 | 1625 | [[package]] 1626 | name = "objc_id" 1627 | version = "0.1.1" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" 1630 | dependencies = [ 1631 | "objc", 1632 | ] 1633 | 1634 | [[package]] 1635 | name = "once_cell" 1636 | version = "1.19.0" 1637 | source = "registry+https://github.com/rust-lang/crates.io-index" 1638 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 1639 | dependencies = [ 1640 | "critical-section", 1641 | "portable-atomic", 1642 | ] 1643 | 1644 | [[package]] 1645 | name = "orbclient" 1646 | version = "0.3.47" 1647 | source = "registry+https://github.com/rust-lang/crates.io-index" 1648 | checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" 1649 | dependencies = [ 1650 | "libredox", 1651 | ] 1652 | 1653 | [[package]] 1654 | name = "panic-probe" 1655 | version = "0.3.2" 1656 | source = "registry+https://github.com/rust-lang/crates.io-index" 1657 | checksum = "4047d9235d1423d66cc97da7d07eddb54d4f154d6c13805c6d0793956f4f25b0" 1658 | dependencies = [ 1659 | "cortex-m", 1660 | "defmt", 1661 | ] 1662 | 1663 | [[package]] 1664 | name = "percent-encoding" 1665 | version = "2.3.1" 1666 | source = "registry+https://github.com/rust-lang/crates.io-index" 1667 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1668 | 1669 | [[package]] 1670 | name = "pico-args" 1671 | version = "0.5.0" 1672 | source = "registry+https://github.com/rust-lang/crates.io-index" 1673 | checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" 1674 | 1675 | [[package]] 1676 | name = "pin-project" 1677 | version = "1.1.5" 1678 | source = "registry+https://github.com/rust-lang/crates.io-index" 1679 | checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" 1680 | dependencies = [ 1681 | "pin-project-internal", 1682 | ] 1683 | 1684 | [[package]] 1685 | name = "pin-project-internal" 1686 | version = "1.1.5" 1687 | source = "registry+https://github.com/rust-lang/crates.io-index" 1688 | checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" 1689 | dependencies = [ 1690 | "proc-macro2", 1691 | "quote", 1692 | "syn 2.0.66", 1693 | ] 1694 | 1695 | [[package]] 1696 | name = "pin-project-lite" 1697 | version = "0.2.14" 1698 | source = "registry+https://github.com/rust-lang/crates.io-index" 1699 | checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" 1700 | 1701 | [[package]] 1702 | name = "pin-utils" 1703 | version = "0.1.0" 1704 | source = "registry+https://github.com/rust-lang/crates.io-index" 1705 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1706 | 1707 | [[package]] 1708 | name = "pin-weak" 1709 | version = "1.1.0" 1710 | source = "registry+https://github.com/rust-lang/crates.io-index" 1711 | checksum = "b330c9d1b92dfe68442ca20b009c717d5f0b1e3cf4965e62f704c3c6e95a1305" 1712 | 1713 | [[package]] 1714 | name = "pkg-config" 1715 | version = "0.3.30" 1716 | source = "registry+https://github.com/rust-lang/crates.io-index" 1717 | checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" 1718 | 1719 | [[package]] 1720 | name = "png" 1721 | version = "0.17.13" 1722 | source = "registry+https://github.com/rust-lang/crates.io-index" 1723 | checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" 1724 | dependencies = [ 1725 | "bitflags 1.3.2", 1726 | "crc32fast", 1727 | "fdeflate", 1728 | "flate2", 1729 | "miniz_oxide", 1730 | ] 1731 | 1732 | [[package]] 1733 | name = "polling" 1734 | version = "3.7.1" 1735 | source = "registry+https://github.com/rust-lang/crates.io-index" 1736 | checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" 1737 | dependencies = [ 1738 | "cfg-if", 1739 | "concurrent-queue", 1740 | "hermit-abi", 1741 | "pin-project-lite", 1742 | "rustix", 1743 | "tracing", 1744 | "windows-sys 0.52.0", 1745 | ] 1746 | 1747 | [[package]] 1748 | name = "portable-atomic" 1749 | version = "1.6.0" 1750 | source = "registry+https://github.com/rust-lang/crates.io-index" 1751 | checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" 1752 | dependencies = [ 1753 | "critical-section", 1754 | ] 1755 | 1756 | [[package]] 1757 | name = "powerfmt" 1758 | version = "0.2.0" 1759 | source = "registry+https://github.com/rust-lang/crates.io-index" 1760 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 1761 | 1762 | [[package]] 1763 | name = "proc-macro-crate" 1764 | version = "3.1.0" 1765 | source = "registry+https://github.com/rust-lang/crates.io-index" 1766 | checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" 1767 | dependencies = [ 1768 | "toml_edit", 1769 | ] 1770 | 1771 | [[package]] 1772 | name = "proc-macro-error" 1773 | version = "1.0.4" 1774 | source = "registry+https://github.com/rust-lang/crates.io-index" 1775 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 1776 | dependencies = [ 1777 | "proc-macro-error-attr", 1778 | "proc-macro2", 1779 | "quote", 1780 | "syn 1.0.109", 1781 | "version_check", 1782 | ] 1783 | 1784 | [[package]] 1785 | name = "proc-macro-error-attr" 1786 | version = "1.0.4" 1787 | source = "registry+https://github.com/rust-lang/crates.io-index" 1788 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 1789 | dependencies = [ 1790 | "proc-macro2", 1791 | "quote", 1792 | "version_check", 1793 | ] 1794 | 1795 | [[package]] 1796 | name = "proc-macro2" 1797 | version = "1.0.85" 1798 | source = "registry+https://github.com/rust-lang/crates.io-index" 1799 | checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" 1800 | dependencies = [ 1801 | "unicode-ident", 1802 | ] 1803 | 1804 | [[package]] 1805 | name = "qoi" 1806 | version = "0.4.1" 1807 | source = "registry+https://github.com/rust-lang/crates.io-index" 1808 | checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" 1809 | dependencies = [ 1810 | "bytemuck", 1811 | ] 1812 | 1813 | [[package]] 1814 | name = "quote" 1815 | version = "1.0.36" 1816 | source = "registry+https://github.com/rust-lang/crates.io-index" 1817 | checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 1818 | dependencies = [ 1819 | "proc-macro2", 1820 | ] 1821 | 1822 | [[package]] 1823 | name = "rand_core" 1824 | version = "0.6.4" 1825 | source = "registry+https://github.com/rust-lang/crates.io-index" 1826 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1827 | 1828 | [[package]] 1829 | name = "raw-window-handle" 1830 | version = "0.5.2" 1831 | source = "registry+https://github.com/rust-lang/crates.io-index" 1832 | checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" 1833 | 1834 | [[package]] 1835 | name = "rayon" 1836 | version = "1.10.0" 1837 | source = "registry+https://github.com/rust-lang/crates.io-index" 1838 | checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" 1839 | dependencies = [ 1840 | "either", 1841 | "rayon-core", 1842 | ] 1843 | 1844 | [[package]] 1845 | name = "rayon-core" 1846 | version = "1.12.1" 1847 | source = "registry+https://github.com/rust-lang/crates.io-index" 1848 | checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" 1849 | dependencies = [ 1850 | "crossbeam-deque", 1851 | "crossbeam-utils", 1852 | ] 1853 | 1854 | [[package]] 1855 | name = "rctree" 1856 | version = "0.5.0" 1857 | source = "registry+https://github.com/rust-lang/crates.io-index" 1858 | checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" 1859 | 1860 | [[package]] 1861 | name = "redox_syscall" 1862 | version = "0.3.5" 1863 | source = "registry+https://github.com/rust-lang/crates.io-index" 1864 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 1865 | dependencies = [ 1866 | "bitflags 1.3.2", 1867 | ] 1868 | 1869 | [[package]] 1870 | name = "redox_syscall" 1871 | version = "0.4.1" 1872 | source = "registry+https://github.com/rust-lang/crates.io-index" 1873 | checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 1874 | dependencies = [ 1875 | "bitflags 1.3.2", 1876 | ] 1877 | 1878 | [[package]] 1879 | name = "resvg" 1880 | version = "0.36.0" 1881 | source = "registry+https://github.com/rust-lang/crates.io-index" 1882 | checksum = "cc7980f653f9a7db31acff916a262c3b78c562919263edea29bf41a056e20497" 1883 | dependencies = [ 1884 | "log", 1885 | "pico-args", 1886 | "rgb", 1887 | "svgtypes", 1888 | "tiny-skia", 1889 | "usvg", 1890 | ] 1891 | 1892 | [[package]] 1893 | name = "rgb" 1894 | version = "0.8.37" 1895 | source = "registry+https://github.com/rust-lang/crates.io-index" 1896 | checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8" 1897 | dependencies = [ 1898 | "bytemuck", 1899 | ] 1900 | 1901 | [[package]] 1902 | name = "rowan" 1903 | version = "0.15.15" 1904 | source = "registry+https://github.com/rust-lang/crates.io-index" 1905 | checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49" 1906 | dependencies = [ 1907 | "countme", 1908 | "hashbrown", 1909 | "memoffset", 1910 | "rustc-hash", 1911 | "text-size", 1912 | ] 1913 | 1914 | [[package]] 1915 | name = "roxmltree" 1916 | version = "0.18.1" 1917 | source = "registry+https://github.com/rust-lang/crates.io-index" 1918 | checksum = "862340e351ce1b271a378ec53f304a5558f7db87f3769dc655a8f6ecbb68b302" 1919 | dependencies = [ 1920 | "xmlparser", 1921 | ] 1922 | 1923 | [[package]] 1924 | name = "roxmltree" 1925 | version = "0.19.0" 1926 | source = "registry+https://github.com/rust-lang/crates.io-index" 1927 | checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" 1928 | 1929 | [[package]] 1930 | name = "rust-on-stm32" 1931 | version = "0.2.0" 1932 | dependencies = [ 1933 | "cortex-m", 1934 | "cortex-m-rt", 1935 | "cortex-m-semihosting", 1936 | "defmt", 1937 | "defmt-rtt", 1938 | "embedded-alloc", 1939 | "embedded-display-controller", 1940 | "embedded-graphics", 1941 | "embedded-graphics-core", 1942 | "embedded-hal 0.2.7", 1943 | "embedded-time", 1944 | "getrandom", 1945 | "i-slint-core", 1946 | "lilos", 1947 | "panic-probe", 1948 | "slint", 1949 | "slint-build", 1950 | "stm32f4xx-hal", 1951 | ] 1952 | 1953 | [[package]] 1954 | name = "rustc-hash" 1955 | version = "1.1.0" 1956 | source = "registry+https://github.com/rust-lang/crates.io-index" 1957 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1958 | 1959 | [[package]] 1960 | name = "rustc_version" 1961 | version = "0.2.3" 1962 | source = "registry+https://github.com/rust-lang/crates.io-index" 1963 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1964 | dependencies = [ 1965 | "semver 0.9.0", 1966 | ] 1967 | 1968 | [[package]] 1969 | name = "rustc_version" 1970 | version = "0.4.0" 1971 | source = "registry+https://github.com/rust-lang/crates.io-index" 1972 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 1973 | dependencies = [ 1974 | "semver 1.0.23", 1975 | ] 1976 | 1977 | [[package]] 1978 | name = "rustix" 1979 | version = "0.38.34" 1980 | source = "registry+https://github.com/rust-lang/crates.io-index" 1981 | checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" 1982 | dependencies = [ 1983 | "bitflags 2.5.0", 1984 | "errno", 1985 | "libc", 1986 | "linux-raw-sys", 1987 | "windows-sys 0.52.0", 1988 | ] 1989 | 1990 | [[package]] 1991 | name = "rustversion" 1992 | version = "1.0.17" 1993 | source = "registry+https://github.com/rust-lang/crates.io-index" 1994 | checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" 1995 | 1996 | [[package]] 1997 | name = "rustybuzz" 1998 | version = "0.10.0" 1999 | source = "registry+https://github.com/rust-lang/crates.io-index" 2000 | checksum = "71cd15fef9112a1f94ac64b58d1e4628192631ad6af4dc69997f995459c874e7" 2001 | dependencies = [ 2002 | "bitflags 1.3.2", 2003 | "bytemuck", 2004 | "smallvec", 2005 | "ttf-parser 0.19.2", 2006 | "unicode-bidi-mirroring", 2007 | "unicode-ccc", 2008 | "unicode-properties", 2009 | "unicode-script", 2010 | ] 2011 | 2012 | [[package]] 2013 | name = "rustybuzz" 2014 | version = "0.11.0" 2015 | source = "registry+https://github.com/rust-lang/crates.io-index" 2016 | checksum = "2ee8fe2a8461a0854a37101fe7a1b13998d0cfa987e43248e81d2a5f4570f6fa" 2017 | dependencies = [ 2018 | "bitflags 1.3.2", 2019 | "bytemuck", 2020 | "smallvec", 2021 | "ttf-parser 0.20.0", 2022 | "unicode-bidi-mirroring", 2023 | "unicode-ccc", 2024 | "unicode-properties", 2025 | "unicode-script", 2026 | ] 2027 | 2028 | [[package]] 2029 | name = "same-file" 2030 | version = "1.0.6" 2031 | source = "registry+https://github.com/rust-lang/crates.io-index" 2032 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 2033 | dependencies = [ 2034 | "winapi-util", 2035 | ] 2036 | 2037 | [[package]] 2038 | name = "scoped-tls-hkt" 2039 | version = "0.1.4" 2040 | source = "registry+https://github.com/rust-lang/crates.io-index" 2041 | checksum = "3ddc765d3410d9f6c6ca071bf0b67f6b01e3ec4595dc3892f02677e75819dddc" 2042 | 2043 | [[package]] 2044 | name = "scopeguard" 2045 | version = "1.2.0" 2046 | source = "registry+https://github.com/rust-lang/crates.io-index" 2047 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 2048 | 2049 | [[package]] 2050 | name = "semver" 2051 | version = "0.9.0" 2052 | source = "registry+https://github.com/rust-lang/crates.io-index" 2053 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 2054 | dependencies = [ 2055 | "semver-parser", 2056 | ] 2057 | 2058 | [[package]] 2059 | name = "semver" 2060 | version = "1.0.23" 2061 | source = "registry+https://github.com/rust-lang/crates.io-index" 2062 | checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" 2063 | 2064 | [[package]] 2065 | name = "semver-parser" 2066 | version = "0.7.0" 2067 | source = "registry+https://github.com/rust-lang/crates.io-index" 2068 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 2069 | 2070 | [[package]] 2071 | name = "send_wrapper" 2072 | version = "0.6.0" 2073 | source = "registry+https://github.com/rust-lang/crates.io-index" 2074 | checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" 2075 | 2076 | [[package]] 2077 | name = "serde" 2078 | version = "1.0.203" 2079 | source = "registry+https://github.com/rust-lang/crates.io-index" 2080 | checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" 2081 | dependencies = [ 2082 | "serde_derive", 2083 | ] 2084 | 2085 | [[package]] 2086 | name = "serde_derive" 2087 | version = "1.0.203" 2088 | source = "registry+https://github.com/rust-lang/crates.io-index" 2089 | checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" 2090 | dependencies = [ 2091 | "proc-macro2", 2092 | "quote", 2093 | "syn 2.0.66", 2094 | ] 2095 | 2096 | [[package]] 2097 | name = "simd-adler32" 2098 | version = "0.3.7" 2099 | source = "registry+https://github.com/rust-lang/crates.io-index" 2100 | checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" 2101 | 2102 | [[package]] 2103 | name = "simplecss" 2104 | version = "0.2.1" 2105 | source = "registry+https://github.com/rust-lang/crates.io-index" 2106 | checksum = "a11be7c62927d9427e9f40f3444d5499d868648e2edbc4e2116de69e7ec0e89d" 2107 | dependencies = [ 2108 | "log", 2109 | ] 2110 | 2111 | [[package]] 2112 | name = "siphasher" 2113 | version = "0.3.11" 2114 | source = "registry+https://github.com/rust-lang/crates.io-index" 2115 | checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" 2116 | 2117 | [[package]] 2118 | name = "slab" 2119 | version = "0.4.9" 2120 | source = "registry+https://github.com/rust-lang/crates.io-index" 2121 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 2122 | dependencies = [ 2123 | "autocfg", 2124 | ] 2125 | 2126 | [[package]] 2127 | name = "slint" 2128 | version = "1.3.2" 2129 | source = "registry+https://github.com/rust-lang/crates.io-index" 2130 | checksum = "39bf2b4e9a979d7a191d5e71728c1d15f8af8049f44208cb337126c17474f166" 2131 | dependencies = [ 2132 | "const-field-offset", 2133 | "i-slint-backend-selector", 2134 | "i-slint-core", 2135 | "num-traits", 2136 | "once_cell", 2137 | "pin-weak", 2138 | "slint-macros", 2139 | "vtable", 2140 | ] 2141 | 2142 | [[package]] 2143 | name = "slint-build" 2144 | version = "1.3.2" 2145 | source = "registry+https://github.com/rust-lang/crates.io-index" 2146 | checksum = "dc96ba4cee939fb4015c213309fcdfe83178730766dbb5fb643d5938030d63e7" 2147 | dependencies = [ 2148 | "i-slint-compiler", 2149 | "spin_on", 2150 | "thiserror", 2151 | "toml_edit", 2152 | ] 2153 | 2154 | [[package]] 2155 | name = "slint-macros" 2156 | version = "1.3.2" 2157 | source = "registry+https://github.com/rust-lang/crates.io-index" 2158 | checksum = "2f6e88032ed51af2445d1b317af16778348566ddc5b397fc4e5bb1bb6b358976" 2159 | dependencies = [ 2160 | "i-slint-compiler", 2161 | "proc-macro2", 2162 | "quote", 2163 | "spin_on", 2164 | ] 2165 | 2166 | [[package]] 2167 | name = "slotmap" 2168 | version = "1.0.7" 2169 | source = "registry+https://github.com/rust-lang/crates.io-index" 2170 | checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" 2171 | dependencies = [ 2172 | "version_check", 2173 | ] 2174 | 2175 | [[package]] 2176 | name = "smallvec" 2177 | version = "1.13.2" 2178 | source = "registry+https://github.com/rust-lang/crates.io-index" 2179 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 2180 | 2181 | [[package]] 2182 | name = "smol_str" 2183 | version = "0.2.2" 2184 | source = "registry+https://github.com/rust-lang/crates.io-index" 2185 | checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" 2186 | dependencies = [ 2187 | "serde", 2188 | ] 2189 | 2190 | [[package]] 2191 | name = "softbuffer" 2192 | version = "0.3.4" 2193 | source = "registry+https://github.com/rust-lang/crates.io-index" 2194 | checksum = "f266ce2aa23eaaaa4e758ed44495d505d00fb79f359d46f6c1900cb053123b62" 2195 | dependencies = [ 2196 | "bytemuck", 2197 | "cfg_aliases", 2198 | "cocoa", 2199 | "core-graphics", 2200 | "foreign-types", 2201 | "js-sys", 2202 | "log", 2203 | "objc", 2204 | "raw-window-handle", 2205 | "redox_syscall 0.4.1", 2206 | "wasm-bindgen", 2207 | "wayland-sys", 2208 | "web-sys", 2209 | "windows-sys 0.48.0", 2210 | ] 2211 | 2212 | [[package]] 2213 | name = "spin" 2214 | version = "0.9.8" 2215 | source = "registry+https://github.com/rust-lang/crates.io-index" 2216 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 2217 | dependencies = [ 2218 | "lock_api", 2219 | ] 2220 | 2221 | [[package]] 2222 | name = "spin_on" 2223 | version = "0.1.1" 2224 | source = "registry+https://github.com/rust-lang/crates.io-index" 2225 | checksum = "076e103ed41b9864aa838287efe5f4e3a7a0362dd00671ae62a212e5e4612da2" 2226 | dependencies = [ 2227 | "pin-utils", 2228 | ] 2229 | 2230 | [[package]] 2231 | name = "stable_deref_trait" 2232 | version = "1.2.0" 2233 | source = "registry+https://github.com/rust-lang/crates.io-index" 2234 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 2235 | 2236 | [[package]] 2237 | name = "static_assertions" 2238 | version = "1.1.0" 2239 | source = "registry+https://github.com/rust-lang/crates.io-index" 2240 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 2241 | 2242 | [[package]] 2243 | name = "stm32f4" 2244 | version = "0.15.1" 2245 | source = "registry+https://github.com/rust-lang/crates.io-index" 2246 | checksum = "fb94729242cd1aebe6dab42a2ca0131985ae93bc3ab2751b680df724bb35528d" 2247 | dependencies = [ 2248 | "bare-metal 1.0.0", 2249 | "cortex-m", 2250 | "cortex-m-rt", 2251 | "vcell", 2252 | ] 2253 | 2254 | [[package]] 2255 | name = "stm32f4xx-hal" 2256 | version = "0.19.0" 2257 | source = "registry+https://github.com/rust-lang/crates.io-index" 2258 | checksum = "1222fa6040ffe9a753f1d4471def4e8cbbc8621a530b606de87c26fdc794e411" 2259 | dependencies = [ 2260 | "bare-metal 1.0.0", 2261 | "cortex-m", 2262 | "cortex-m-rt", 2263 | "embedded-dma", 2264 | "embedded-hal 0.2.7", 2265 | "embedded-hal 1.0.0-rc.2", 2266 | "embedded-hal-nb", 2267 | "embedded-storage", 2268 | "enumflags2", 2269 | "fugit", 2270 | "fugit-timer", 2271 | "nb 1.1.0", 2272 | "rand_core", 2273 | "stm32f4", 2274 | "time", 2275 | "vcell", 2276 | "void", 2277 | ] 2278 | 2279 | [[package]] 2280 | name = "strict-num" 2281 | version = "0.1.1" 2282 | source = "registry+https://github.com/rust-lang/crates.io-index" 2283 | checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" 2284 | dependencies = [ 2285 | "float-cmp", 2286 | ] 2287 | 2288 | [[package]] 2289 | name = "strum" 2290 | version = "0.25.0" 2291 | source = "registry+https://github.com/rust-lang/crates.io-index" 2292 | checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" 2293 | dependencies = [ 2294 | "strum_macros", 2295 | ] 2296 | 2297 | [[package]] 2298 | name = "strum_macros" 2299 | version = "0.25.3" 2300 | source = "registry+https://github.com/rust-lang/crates.io-index" 2301 | checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" 2302 | dependencies = [ 2303 | "heck", 2304 | "proc-macro2", 2305 | "quote", 2306 | "rustversion", 2307 | "syn 2.0.66", 2308 | ] 2309 | 2310 | [[package]] 2311 | name = "svgtypes" 2312 | version = "0.12.0" 2313 | source = "registry+https://github.com/rust-lang/crates.io-index" 2314 | checksum = "d71499ff2d42f59d26edb21369a308ede691421f79ebc0f001e2b1fd3a7c9e52" 2315 | dependencies = [ 2316 | "kurbo", 2317 | "siphasher", 2318 | ] 2319 | 2320 | [[package]] 2321 | name = "syn" 2322 | version = "1.0.109" 2323 | source = "registry+https://github.com/rust-lang/crates.io-index" 2324 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 2325 | dependencies = [ 2326 | "proc-macro2", 2327 | "quote", 2328 | "unicode-ident", 2329 | ] 2330 | 2331 | [[package]] 2332 | name = "syn" 2333 | version = "2.0.66" 2334 | source = "registry+https://github.com/rust-lang/crates.io-index" 2335 | checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" 2336 | dependencies = [ 2337 | "proc-macro2", 2338 | "quote", 2339 | "unicode-ident", 2340 | ] 2341 | 2342 | [[package]] 2343 | name = "termcolor" 2344 | version = "1.4.1" 2345 | source = "registry+https://github.com/rust-lang/crates.io-index" 2346 | checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" 2347 | dependencies = [ 2348 | "winapi-util", 2349 | ] 2350 | 2351 | [[package]] 2352 | name = "text-size" 2353 | version = "1.1.1" 2354 | source = "registry+https://github.com/rust-lang/crates.io-index" 2355 | checksum = "f18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233" 2356 | 2357 | [[package]] 2358 | name = "thiserror" 2359 | version = "1.0.61" 2360 | source = "registry+https://github.com/rust-lang/crates.io-index" 2361 | checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" 2362 | dependencies = [ 2363 | "thiserror-impl", 2364 | ] 2365 | 2366 | [[package]] 2367 | name = "thiserror-impl" 2368 | version = "1.0.61" 2369 | source = "registry+https://github.com/rust-lang/crates.io-index" 2370 | checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" 2371 | dependencies = [ 2372 | "proc-macro2", 2373 | "quote", 2374 | "syn 2.0.66", 2375 | ] 2376 | 2377 | [[package]] 2378 | name = "tiff" 2379 | version = "0.9.1" 2380 | source = "registry+https://github.com/rust-lang/crates.io-index" 2381 | checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" 2382 | dependencies = [ 2383 | "flate2", 2384 | "jpeg-decoder", 2385 | "weezl", 2386 | ] 2387 | 2388 | [[package]] 2389 | name = "time" 2390 | version = "0.3.36" 2391 | source = "registry+https://github.com/rust-lang/crates.io-index" 2392 | checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" 2393 | dependencies = [ 2394 | "deranged", 2395 | "num-conv", 2396 | "powerfmt", 2397 | "time-core", 2398 | ] 2399 | 2400 | [[package]] 2401 | name = "time-core" 2402 | version = "0.1.2" 2403 | source = "registry+https://github.com/rust-lang/crates.io-index" 2404 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 2405 | 2406 | [[package]] 2407 | name = "tiny-skia" 2408 | version = "0.11.4" 2409 | source = "registry+https://github.com/rust-lang/crates.io-index" 2410 | checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" 2411 | dependencies = [ 2412 | "arrayref", 2413 | "arrayvec", 2414 | "bytemuck", 2415 | "cfg-if", 2416 | "log", 2417 | "png", 2418 | "tiny-skia-path", 2419 | ] 2420 | 2421 | [[package]] 2422 | name = "tiny-skia-path" 2423 | version = "0.11.4" 2424 | source = "registry+https://github.com/rust-lang/crates.io-index" 2425 | checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" 2426 | dependencies = [ 2427 | "arrayref", 2428 | "bytemuck", 2429 | "strict-num", 2430 | ] 2431 | 2432 | [[package]] 2433 | name = "tinyvec" 2434 | version = "1.6.0" 2435 | source = "registry+https://github.com/rust-lang/crates.io-index" 2436 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2437 | dependencies = [ 2438 | "tinyvec_macros", 2439 | ] 2440 | 2441 | [[package]] 2442 | name = "tinyvec_macros" 2443 | version = "0.1.1" 2444 | source = "registry+https://github.com/rust-lang/crates.io-index" 2445 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2446 | 2447 | [[package]] 2448 | name = "toml_datetime" 2449 | version = "0.6.6" 2450 | source = "registry+https://github.com/rust-lang/crates.io-index" 2451 | checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" 2452 | 2453 | [[package]] 2454 | name = "toml_edit" 2455 | version = "0.21.1" 2456 | source = "registry+https://github.com/rust-lang/crates.io-index" 2457 | checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" 2458 | dependencies = [ 2459 | "indexmap", 2460 | "toml_datetime", 2461 | "winnow", 2462 | ] 2463 | 2464 | [[package]] 2465 | name = "tracing" 2466 | version = "0.1.40" 2467 | source = "registry+https://github.com/rust-lang/crates.io-index" 2468 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 2469 | dependencies = [ 2470 | "pin-project-lite", 2471 | "tracing-core", 2472 | ] 2473 | 2474 | [[package]] 2475 | name = "tracing-core" 2476 | version = "0.1.32" 2477 | source = "registry+https://github.com/rust-lang/crates.io-index" 2478 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 2479 | 2480 | [[package]] 2481 | name = "ttf-parser" 2482 | version = "0.19.2" 2483 | source = "registry+https://github.com/rust-lang/crates.io-index" 2484 | checksum = "49d64318d8311fc2668e48b63969f4343e0a85c4a109aa8460d6672e364b8bd1" 2485 | 2486 | [[package]] 2487 | name = "ttf-parser" 2488 | version = "0.20.0" 2489 | source = "registry+https://github.com/rust-lang/crates.io-index" 2490 | checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" 2491 | 2492 | [[package]] 2493 | name = "unicode-bidi" 2494 | version = "0.3.15" 2495 | source = "registry+https://github.com/rust-lang/crates.io-index" 2496 | checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" 2497 | 2498 | [[package]] 2499 | name = "unicode-bidi-mirroring" 2500 | version = "0.1.0" 2501 | source = "registry+https://github.com/rust-lang/crates.io-index" 2502 | checksum = "56d12260fb92d52f9008be7e4bca09f584780eb2266dc8fecc6a192bec561694" 2503 | 2504 | [[package]] 2505 | name = "unicode-ccc" 2506 | version = "0.1.2" 2507 | source = "registry+https://github.com/rust-lang/crates.io-index" 2508 | checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" 2509 | 2510 | [[package]] 2511 | name = "unicode-ident" 2512 | version = "1.0.12" 2513 | source = "registry+https://github.com/rust-lang/crates.io-index" 2514 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 2515 | 2516 | [[package]] 2517 | name = "unicode-linebreak" 2518 | version = "0.1.5" 2519 | source = "registry+https://github.com/rust-lang/crates.io-index" 2520 | checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" 2521 | 2522 | [[package]] 2523 | name = "unicode-normalization" 2524 | version = "0.1.23" 2525 | source = "registry+https://github.com/rust-lang/crates.io-index" 2526 | checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" 2527 | dependencies = [ 2528 | "tinyvec", 2529 | ] 2530 | 2531 | [[package]] 2532 | name = "unicode-properties" 2533 | version = "0.1.1" 2534 | source = "registry+https://github.com/rust-lang/crates.io-index" 2535 | checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" 2536 | 2537 | [[package]] 2538 | name = "unicode-script" 2539 | version = "0.5.6" 2540 | source = "registry+https://github.com/rust-lang/crates.io-index" 2541 | checksum = "ad8d71f5726e5f285a935e9fe8edfd53f0491eb6e9a5774097fdabee7cd8c9cd" 2542 | 2543 | [[package]] 2544 | name = "unicode-segmentation" 2545 | version = "1.11.0" 2546 | source = "registry+https://github.com/rust-lang/crates.io-index" 2547 | checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" 2548 | 2549 | [[package]] 2550 | name = "unicode-vo" 2551 | version = "0.1.0" 2552 | source = "registry+https://github.com/rust-lang/crates.io-index" 2553 | checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" 2554 | 2555 | [[package]] 2556 | name = "url" 2557 | version = "2.5.0" 2558 | source = "registry+https://github.com/rust-lang/crates.io-index" 2559 | checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" 2560 | dependencies = [ 2561 | "form_urlencoded", 2562 | "idna", 2563 | "percent-encoding", 2564 | ] 2565 | 2566 | [[package]] 2567 | name = "usvg" 2568 | version = "0.36.0" 2569 | source = "registry+https://github.com/rust-lang/crates.io-index" 2570 | checksum = "c51daa774fe9ee5efcf7b4fec13019b8119cda764d9a8b5b06df02bb1445c656" 2571 | dependencies = [ 2572 | "base64", 2573 | "log", 2574 | "pico-args", 2575 | "usvg-parser", 2576 | "usvg-text-layout", 2577 | "usvg-tree", 2578 | "xmlwriter", 2579 | ] 2580 | 2581 | [[package]] 2582 | name = "usvg-parser" 2583 | version = "0.36.0" 2584 | source = "registry+https://github.com/rust-lang/crates.io-index" 2585 | checksum = "45c88a5ffaa338f0e978ecf3d4e00d8f9f493e29bed0752e1a808a1db16afc40" 2586 | dependencies = [ 2587 | "data-url", 2588 | "flate2", 2589 | "imagesize", 2590 | "kurbo", 2591 | "log", 2592 | "roxmltree 0.18.1", 2593 | "simplecss", 2594 | "siphasher", 2595 | "svgtypes", 2596 | "usvg-tree", 2597 | ] 2598 | 2599 | [[package]] 2600 | name = "usvg-text-layout" 2601 | version = "0.36.0" 2602 | source = "registry+https://github.com/rust-lang/crates.io-index" 2603 | checksum = "4d2374378cb7a3fb8f33894e0fdb8625e1bbc4f25312db8d91f862130b541593" 2604 | dependencies = [ 2605 | "fontdb", 2606 | "kurbo", 2607 | "log", 2608 | "rustybuzz 0.10.0", 2609 | "unicode-bidi", 2610 | "unicode-script", 2611 | "unicode-vo", 2612 | "usvg-tree", 2613 | ] 2614 | 2615 | [[package]] 2616 | name = "usvg-tree" 2617 | version = "0.36.0" 2618 | source = "registry+https://github.com/rust-lang/crates.io-index" 2619 | checksum = "6cacb0c5edeaf3e80e5afcf5b0d4004cc1d36318befc9a7c6606507e5d0f4062" 2620 | dependencies = [ 2621 | "rctree", 2622 | "strict-num", 2623 | "svgtypes", 2624 | "tiny-skia-path", 2625 | ] 2626 | 2627 | [[package]] 2628 | name = "vcell" 2629 | version = "0.1.3" 2630 | source = "registry+https://github.com/rust-lang/crates.io-index" 2631 | checksum = "77439c1b53d2303b20d9459b1ade71a83c716e3f9c34f3228c00e6f185d6c002" 2632 | 2633 | [[package]] 2634 | name = "version_check" 2635 | version = "0.9.4" 2636 | source = "registry+https://github.com/rust-lang/crates.io-index" 2637 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2638 | 2639 | [[package]] 2640 | name = "void" 2641 | version = "1.0.2" 2642 | source = "registry+https://github.com/rust-lang/crates.io-index" 2643 | checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" 2644 | 2645 | [[package]] 2646 | name = "volatile-register" 2647 | version = "0.2.2" 2648 | source = "registry+https://github.com/rust-lang/crates.io-index" 2649 | checksum = "de437e2a6208b014ab52972a27e59b33fa2920d3e00fe05026167a1c509d19cc" 2650 | dependencies = [ 2651 | "vcell", 2652 | ] 2653 | 2654 | [[package]] 2655 | name = "vtable" 2656 | version = "0.1.12" 2657 | source = "registry+https://github.com/rust-lang/crates.io-index" 2658 | checksum = "cdb73981d329ade331e3c1e2bdfc23bb9ed81fbf1fcc1d1025bbbd6b66f67f0d" 2659 | dependencies = [ 2660 | "const-field-offset", 2661 | "portable-atomic", 2662 | "stable_deref_trait", 2663 | "vtable-macro", 2664 | ] 2665 | 2666 | [[package]] 2667 | name = "vtable-macro" 2668 | version = "0.1.12" 2669 | source = "registry+https://github.com/rust-lang/crates.io-index" 2670 | checksum = "88bc24de6c2849906b6452bd6d849ea6d9578f5139546c6e262410a8144e7384" 2671 | dependencies = [ 2672 | "proc-macro2", 2673 | "quote", 2674 | "syn 2.0.66", 2675 | ] 2676 | 2677 | [[package]] 2678 | name = "walkdir" 2679 | version = "2.5.0" 2680 | source = "registry+https://github.com/rust-lang/crates.io-index" 2681 | checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 2682 | dependencies = [ 2683 | "same-file", 2684 | "winapi-util", 2685 | ] 2686 | 2687 | [[package]] 2688 | name = "wasi" 2689 | version = "0.11.0+wasi-snapshot-preview1" 2690 | source = "registry+https://github.com/rust-lang/crates.io-index" 2691 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2692 | 2693 | [[package]] 2694 | name = "wasm-bindgen" 2695 | version = "0.2.92" 2696 | source = "registry+https://github.com/rust-lang/crates.io-index" 2697 | checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" 2698 | dependencies = [ 2699 | "cfg-if", 2700 | "wasm-bindgen-macro", 2701 | ] 2702 | 2703 | [[package]] 2704 | name = "wasm-bindgen-backend" 2705 | version = "0.2.92" 2706 | source = "registry+https://github.com/rust-lang/crates.io-index" 2707 | checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" 2708 | dependencies = [ 2709 | "bumpalo", 2710 | "log", 2711 | "once_cell", 2712 | "proc-macro2", 2713 | "quote", 2714 | "syn 2.0.66", 2715 | "wasm-bindgen-shared", 2716 | ] 2717 | 2718 | [[package]] 2719 | name = "wasm-bindgen-futures" 2720 | version = "0.4.42" 2721 | source = "registry+https://github.com/rust-lang/crates.io-index" 2722 | checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" 2723 | dependencies = [ 2724 | "cfg-if", 2725 | "js-sys", 2726 | "wasm-bindgen", 2727 | "web-sys", 2728 | ] 2729 | 2730 | [[package]] 2731 | name = "wasm-bindgen-macro" 2732 | version = "0.2.92" 2733 | source = "registry+https://github.com/rust-lang/crates.io-index" 2734 | checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" 2735 | dependencies = [ 2736 | "quote", 2737 | "wasm-bindgen-macro-support", 2738 | ] 2739 | 2740 | [[package]] 2741 | name = "wasm-bindgen-macro-support" 2742 | version = "0.2.92" 2743 | source = "registry+https://github.com/rust-lang/crates.io-index" 2744 | checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" 2745 | dependencies = [ 2746 | "proc-macro2", 2747 | "quote", 2748 | "syn 2.0.66", 2749 | "wasm-bindgen-backend", 2750 | "wasm-bindgen-shared", 2751 | ] 2752 | 2753 | [[package]] 2754 | name = "wasm-bindgen-shared" 2755 | version = "0.2.92" 2756 | source = "registry+https://github.com/rust-lang/crates.io-index" 2757 | checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" 2758 | 2759 | [[package]] 2760 | name = "wayland-sys" 2761 | version = "0.31.2" 2762 | source = "registry+https://github.com/rust-lang/crates.io-index" 2763 | checksum = "105b1842da6554f91526c14a2a2172897b7f745a805d62af4ce698706be79c12" 2764 | dependencies = [ 2765 | "dlib", 2766 | "log", 2767 | "pkg-config", 2768 | ] 2769 | 2770 | [[package]] 2771 | name = "web-sys" 2772 | version = "0.3.69" 2773 | source = "registry+https://github.com/rust-lang/crates.io-index" 2774 | checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" 2775 | dependencies = [ 2776 | "js-sys", 2777 | "wasm-bindgen", 2778 | ] 2779 | 2780 | [[package]] 2781 | name = "web-time" 2782 | version = "0.2.4" 2783 | source = "registry+https://github.com/rust-lang/crates.io-index" 2784 | checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" 2785 | dependencies = [ 2786 | "js-sys", 2787 | "wasm-bindgen", 2788 | ] 2789 | 2790 | [[package]] 2791 | name = "weezl" 2792 | version = "0.1.8" 2793 | source = "registry+https://github.com/rust-lang/crates.io-index" 2794 | checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" 2795 | 2796 | [[package]] 2797 | name = "winapi" 2798 | version = "0.3.9" 2799 | source = "registry+https://github.com/rust-lang/crates.io-index" 2800 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2801 | dependencies = [ 2802 | "winapi-i686-pc-windows-gnu", 2803 | "winapi-x86_64-pc-windows-gnu", 2804 | ] 2805 | 2806 | [[package]] 2807 | name = "winapi-i686-pc-windows-gnu" 2808 | version = "0.4.0" 2809 | source = "registry+https://github.com/rust-lang/crates.io-index" 2810 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2811 | 2812 | [[package]] 2813 | name = "winapi-util" 2814 | version = "0.1.8" 2815 | source = "registry+https://github.com/rust-lang/crates.io-index" 2816 | checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" 2817 | dependencies = [ 2818 | "windows-sys 0.52.0", 2819 | ] 2820 | 2821 | [[package]] 2822 | name = "winapi-x86_64-pc-windows-gnu" 2823 | version = "0.4.0" 2824 | source = "registry+https://github.com/rust-lang/crates.io-index" 2825 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2826 | 2827 | [[package]] 2828 | name = "windows-sys" 2829 | version = "0.45.0" 2830 | source = "registry+https://github.com/rust-lang/crates.io-index" 2831 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 2832 | dependencies = [ 2833 | "windows-targets 0.42.2", 2834 | ] 2835 | 2836 | [[package]] 2837 | name = "windows-sys" 2838 | version = "0.48.0" 2839 | source = "registry+https://github.com/rust-lang/crates.io-index" 2840 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2841 | dependencies = [ 2842 | "windows-targets 0.48.5", 2843 | ] 2844 | 2845 | [[package]] 2846 | name = "windows-sys" 2847 | version = "0.52.0" 2848 | source = "registry+https://github.com/rust-lang/crates.io-index" 2849 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2850 | dependencies = [ 2851 | "windows-targets 0.52.5", 2852 | ] 2853 | 2854 | [[package]] 2855 | name = "windows-targets" 2856 | version = "0.42.2" 2857 | source = "registry+https://github.com/rust-lang/crates.io-index" 2858 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 2859 | dependencies = [ 2860 | "windows_aarch64_gnullvm 0.42.2", 2861 | "windows_aarch64_msvc 0.42.2", 2862 | "windows_i686_gnu 0.42.2", 2863 | "windows_i686_msvc 0.42.2", 2864 | "windows_x86_64_gnu 0.42.2", 2865 | "windows_x86_64_gnullvm 0.42.2", 2866 | "windows_x86_64_msvc 0.42.2", 2867 | ] 2868 | 2869 | [[package]] 2870 | name = "windows-targets" 2871 | version = "0.48.5" 2872 | source = "registry+https://github.com/rust-lang/crates.io-index" 2873 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 2874 | dependencies = [ 2875 | "windows_aarch64_gnullvm 0.48.5", 2876 | "windows_aarch64_msvc 0.48.5", 2877 | "windows_i686_gnu 0.48.5", 2878 | "windows_i686_msvc 0.48.5", 2879 | "windows_x86_64_gnu 0.48.5", 2880 | "windows_x86_64_gnullvm 0.48.5", 2881 | "windows_x86_64_msvc 0.48.5", 2882 | ] 2883 | 2884 | [[package]] 2885 | name = "windows-targets" 2886 | version = "0.52.5" 2887 | source = "registry+https://github.com/rust-lang/crates.io-index" 2888 | checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" 2889 | dependencies = [ 2890 | "windows_aarch64_gnullvm 0.52.5", 2891 | "windows_aarch64_msvc 0.52.5", 2892 | "windows_i686_gnu 0.52.5", 2893 | "windows_i686_gnullvm", 2894 | "windows_i686_msvc 0.52.5", 2895 | "windows_x86_64_gnu 0.52.5", 2896 | "windows_x86_64_gnullvm 0.52.5", 2897 | "windows_x86_64_msvc 0.52.5", 2898 | ] 2899 | 2900 | [[package]] 2901 | name = "windows_aarch64_gnullvm" 2902 | version = "0.42.2" 2903 | source = "registry+https://github.com/rust-lang/crates.io-index" 2904 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 2905 | 2906 | [[package]] 2907 | name = "windows_aarch64_gnullvm" 2908 | version = "0.48.5" 2909 | source = "registry+https://github.com/rust-lang/crates.io-index" 2910 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2911 | 2912 | [[package]] 2913 | name = "windows_aarch64_gnullvm" 2914 | version = "0.52.5" 2915 | source = "registry+https://github.com/rust-lang/crates.io-index" 2916 | checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" 2917 | 2918 | [[package]] 2919 | name = "windows_aarch64_msvc" 2920 | version = "0.42.2" 2921 | source = "registry+https://github.com/rust-lang/crates.io-index" 2922 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 2923 | 2924 | [[package]] 2925 | name = "windows_aarch64_msvc" 2926 | version = "0.48.5" 2927 | source = "registry+https://github.com/rust-lang/crates.io-index" 2928 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2929 | 2930 | [[package]] 2931 | name = "windows_aarch64_msvc" 2932 | version = "0.52.5" 2933 | source = "registry+https://github.com/rust-lang/crates.io-index" 2934 | checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" 2935 | 2936 | [[package]] 2937 | name = "windows_i686_gnu" 2938 | version = "0.42.2" 2939 | source = "registry+https://github.com/rust-lang/crates.io-index" 2940 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 2941 | 2942 | [[package]] 2943 | name = "windows_i686_gnu" 2944 | version = "0.48.5" 2945 | source = "registry+https://github.com/rust-lang/crates.io-index" 2946 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2947 | 2948 | [[package]] 2949 | name = "windows_i686_gnu" 2950 | version = "0.52.5" 2951 | source = "registry+https://github.com/rust-lang/crates.io-index" 2952 | checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" 2953 | 2954 | [[package]] 2955 | name = "windows_i686_gnullvm" 2956 | version = "0.52.5" 2957 | source = "registry+https://github.com/rust-lang/crates.io-index" 2958 | checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" 2959 | 2960 | [[package]] 2961 | name = "windows_i686_msvc" 2962 | version = "0.42.2" 2963 | source = "registry+https://github.com/rust-lang/crates.io-index" 2964 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 2965 | 2966 | [[package]] 2967 | name = "windows_i686_msvc" 2968 | version = "0.48.5" 2969 | source = "registry+https://github.com/rust-lang/crates.io-index" 2970 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2971 | 2972 | [[package]] 2973 | name = "windows_i686_msvc" 2974 | version = "0.52.5" 2975 | source = "registry+https://github.com/rust-lang/crates.io-index" 2976 | checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" 2977 | 2978 | [[package]] 2979 | name = "windows_x86_64_gnu" 2980 | version = "0.42.2" 2981 | source = "registry+https://github.com/rust-lang/crates.io-index" 2982 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 2983 | 2984 | [[package]] 2985 | name = "windows_x86_64_gnu" 2986 | version = "0.48.5" 2987 | source = "registry+https://github.com/rust-lang/crates.io-index" 2988 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2989 | 2990 | [[package]] 2991 | name = "windows_x86_64_gnu" 2992 | version = "0.52.5" 2993 | source = "registry+https://github.com/rust-lang/crates.io-index" 2994 | checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" 2995 | 2996 | [[package]] 2997 | name = "windows_x86_64_gnullvm" 2998 | version = "0.42.2" 2999 | source = "registry+https://github.com/rust-lang/crates.io-index" 3000 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 3001 | 3002 | [[package]] 3003 | name = "windows_x86_64_gnullvm" 3004 | version = "0.48.5" 3005 | source = "registry+https://github.com/rust-lang/crates.io-index" 3006 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 3007 | 3008 | [[package]] 3009 | name = "windows_x86_64_gnullvm" 3010 | version = "0.52.5" 3011 | source = "registry+https://github.com/rust-lang/crates.io-index" 3012 | checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" 3013 | 3014 | [[package]] 3015 | name = "windows_x86_64_msvc" 3016 | version = "0.42.2" 3017 | source = "registry+https://github.com/rust-lang/crates.io-index" 3018 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 3019 | 3020 | [[package]] 3021 | name = "windows_x86_64_msvc" 3022 | version = "0.48.5" 3023 | source = "registry+https://github.com/rust-lang/crates.io-index" 3024 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 3025 | 3026 | [[package]] 3027 | name = "windows_x86_64_msvc" 3028 | version = "0.52.5" 3029 | source = "registry+https://github.com/rust-lang/crates.io-index" 3030 | checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" 3031 | 3032 | [[package]] 3033 | name = "winit" 3034 | version = "0.29.15" 3035 | source = "registry+https://github.com/rust-lang/crates.io-index" 3036 | checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca" 3037 | dependencies = [ 3038 | "android-activity", 3039 | "atomic-waker", 3040 | "bitflags 2.5.0", 3041 | "calloop", 3042 | "cfg_aliases", 3043 | "core-foundation", 3044 | "core-graphics", 3045 | "cursor-icon", 3046 | "icrate", 3047 | "js-sys", 3048 | "libc", 3049 | "log", 3050 | "ndk", 3051 | "ndk-sys", 3052 | "objc2", 3053 | "once_cell", 3054 | "orbclient", 3055 | "raw-window-handle", 3056 | "redox_syscall 0.3.5", 3057 | "rustix", 3058 | "smol_str", 3059 | "unicode-segmentation", 3060 | "wasm-bindgen", 3061 | "wasm-bindgen-futures", 3062 | "web-sys", 3063 | "web-time", 3064 | "windows-sys 0.48.0", 3065 | "xkbcommon-dl", 3066 | ] 3067 | 3068 | [[package]] 3069 | name = "winnow" 3070 | version = "0.5.40" 3071 | source = "registry+https://github.com/rust-lang/crates.io-index" 3072 | checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" 3073 | dependencies = [ 3074 | "memchr", 3075 | ] 3076 | 3077 | [[package]] 3078 | name = "xkbcommon-dl" 3079 | version = "0.4.2" 3080 | source = "registry+https://github.com/rust-lang/crates.io-index" 3081 | checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" 3082 | dependencies = [ 3083 | "bitflags 2.5.0", 3084 | "dlib", 3085 | "log", 3086 | "once_cell", 3087 | "xkeysym", 3088 | ] 3089 | 3090 | [[package]] 3091 | name = "xkeysym" 3092 | version = "0.2.1" 3093 | source = "registry+https://github.com/rust-lang/crates.io-index" 3094 | checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" 3095 | 3096 | [[package]] 3097 | name = "xmlparser" 3098 | version = "0.13.6" 3099 | source = "registry+https://github.com/rust-lang/crates.io-index" 3100 | checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" 3101 | 3102 | [[package]] 3103 | name = "xmlwriter" 3104 | version = "0.1.0" 3105 | source = "registry+https://github.com/rust-lang/crates.io-index" 3106 | checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" 3107 | 3108 | [[package]] 3109 | name = "zerocopy" 3110 | version = "0.7.34" 3111 | source = "registry+https://github.com/rust-lang/crates.io-index" 3112 | checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" 3113 | dependencies = [ 3114 | "zerocopy-derive", 3115 | ] 3116 | 3117 | [[package]] 3118 | name = "zerocopy-derive" 3119 | version = "0.7.34" 3120 | source = "registry+https://github.com/rust-lang/crates.io-index" 3121 | checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" 3122 | dependencies = [ 3123 | "proc-macro2", 3124 | "quote", 3125 | "syn 2.0.66", 3126 | ] 3127 | 3128 | [[package]] 3129 | name = "zune-inflate" 3130 | version = "0.2.54" 3131 | source = "registry+https://github.com/rust-lang/crates.io-index" 3132 | checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" 3133 | dependencies = [ 3134 | "simd-adler32", 3135 | ] 3136 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | authors = ["ierturk me@erturk.me>"] 3 | edition = "2021" 4 | readme = "README.md" 5 | name = "rust-on-stm32" 6 | version = "0.2.0" 7 | build = "build.rs" 8 | 9 | [package.metadata.docs.rs] 10 | default-target = "thumbv7em-none-eabihf" 11 | 12 | [dependencies] 13 | cortex-m = { version = "0.7.4", features = ["critical-section-single-core"] } 14 | cortex-m-rt = "0.7.1" 15 | 16 | defmt = "0.3" 17 | defmt-rtt = "0.4" 18 | panic-probe = { version = "0.3", features = ["print-defmt"] } 19 | cortex-m-semihosting = "0.5.0" 20 | 21 | embedded-hal = "0.2.7" 22 | 23 | embedded-graphics = "0.8.1" 24 | embedded-graphics-core = "0.4.0" 25 | 26 | embedded-alloc = "0.5.1" 27 | 28 | embedded-display-controller = "0.1.0" 29 | getrandom = { version = "0.2.11", features = ["custom"] } 30 | embedded-time = "0.12.1" 31 | 32 | i-slint-core = { version = "=1.3.2", default-features = false, features = ["software-renderer-rotation"] } 33 | [dependencies.slint] 34 | version = "1.3.2" 35 | default-features = false 36 | features = ["compat-1-2", "renderer-software", "unsafe-single-threaded", "libm"] 37 | 38 | [dependencies.stm32f4xx-hal] 39 | version = "0.19.0" 40 | features = ["stm32f429", "ltdc", "rt"] 41 | 42 | [dependencies.lilos] 43 | git = "https://github.com/cbiffle/lilos.git" 44 | rev = "02cf2940149352f1cc6e1c94f178d9071ea14652" 45 | 46 | [build-dependencies] 47 | slint-build = "1.3.2" 48 | 49 | [[bin]] 50 | name = "rust-on-stm32" 51 | test = false 52 | bench = false 53 | 54 | [profile.release] 55 | codegen-units = 1 # better optimizations 56 | debug = true # symbols are nice and they don't increase the size on Flash 57 | lto = true # better optimizations 58 | opt-level = "z" -------------------------------------------------------------------------------- /Embed.toml: -------------------------------------------------------------------------------- 1 | [default.general] 2 | chip = "stm32f303re" 3 | 4 | 5 | [default.rtt] 6 | enabled = true 7 | 8 | [default.gdb] 9 | enabled = false 10 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A Rust Board Support Package (BSP) and Example Slint Application for STM32F429-Discovery Kit 2 | [Associated post](https://erturk.me/projects/a-rust-bsp-package-for-stm32f4-discovery-kit/) 3 | 4 | ![Made with Slint](docs/images/made-with-slint.png) 5 | #made-with-slint 6 | ___ 7 | ### The Tools that Used within this Post 8 | - [Rust Toolchain](https://www.rust-lang.org/learn/get-started) 9 | - [usbpid-win](https://github.com/dorssel/usbipd-win) 10 | - [probe-rs](https://probe.rs/docs/getting-started/installation/) 11 | - [VSCode](https://code.visualstudio.com/) 12 | - [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) 13 | - [rust-analyzer plugin for VSCode](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) 14 | - [probe-rs plugin for VSCode](https://marketplace.visualstudio.com/items?itemName=probe-rs.probe-rs-debugger) 15 | - [WSL plugin for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) 16 | - [GitHUB repository](https://github.com/ierturk/rust-on-stm32) 17 | - [STM32F429ZI Discovery Board](https://www.st.com/en/evaluation-tools/32f429idiscovery.html) 18 | - [WSL - Windows Subsystem for Linux](https://apps.microsoft.com/detail/windows-subsystem-for-linux/9P9TQF7MRM4R?hl=en-gb&gl=US) 19 | [Ubuntu 22.04.2 LTS](https://apps.microsoft.com/detail/9PN20MSR04DW?hl=en-gb&gl=US) 20 | - [Slint](https://slint.dev/) 21 | - [Slint Plugin for VSCode](https://marketplace.visualstudio.com/items?itemName=Slint.slint) 22 | - [lilos Async RTOS](https://github.com/cbiffle/lilos) 23 | ___ 24 | ### Setup 25 | For setup the whole development system on WSL and VSCode please refer to [this post](https://erturk.me/projects/working-with-rust-embedded-on-wsl/) 26 | ___ 27 | ### Running and Debugging 28 | - Clone [the repository](https://github.com/ierturk/rust-on-stm32) 29 | - Open the folder in VSCode 30 | - In terminal 31 | ``` 32 | ierturk@DESKTOP-JC8L4M1:~$ cargo run -release 33 | ``` 34 | Or 35 | - It can be run through VSCode menus 36 | ___ 37 | ### Added Nix Flakes and DirEnv Support 38 | Everything will be set by just typing following command 39 | ``` 40 | me@localhost:~$ nix develop 41 | ``` 42 | It needs to be installed `nix` package manager with enabled `nix-command` and `flake` support. 43 | ___ 44 | ### Conclusion 45 | This is the Slint Carousel Demo running on the F4 MCU 46 | 47 | ![Slint UI Carousel Demo](docs/images/rust-slint-ui-carousel-demo.jpeg) 48 | 49 | Happy reading and coding! 50 | 51 | -------------------------------------------------------------------------------- /build.rs: -------------------------------------------------------------------------------- 1 | use std::env; 2 | use std::fs::File; 3 | use std::io::Write; 4 | use std::path::PathBuf; 5 | 6 | fn main() { 7 | let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); 8 | File::create(out.join("memory.x")) 9 | .unwrap() 10 | .write_all(include_bytes!("memory.x")) 11 | .unwrap(); 12 | println!("cargo:rustc-link-search={}", out.display()); 13 | println!("cargo:rerun-if-changed=memory.x"); 14 | 15 | let config = slint_build::CompilerConfiguration::new() 16 | .embed_resources(slint_build::EmbedResourcesKind::EmbedForSoftwareRenderer); 17 | slint_build::compile_with_config("ui/carousel_demo.slint", config).unwrap(); 18 | slint_build::print_rustc_flags().unwrap(); 19 | } 20 | -------------------------------------------------------------------------------- /docs/images/made-with-slint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ierturk/rust-on-stm32/37b62d02a116a3b12e6d8c967f07437adb6bed94/docs/images/made-with-slint.png -------------------------------------------------------------------------------- /docs/images/rust-slint-ui-carousel-demo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ierturk/rust-on-stm32/37b62d02a116a3b12e6d8c967f07437adb6bed94/docs/images/rust-slint-ui-carousel-demo.jpeg -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "flake-utils": { 4 | "inputs": { 5 | "systems": "systems" 6 | }, 7 | "locked": { 8 | "lastModified": 1710146030, 9 | "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", 10 | "owner": "numtide", 11 | "repo": "flake-utils", 12 | "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", 13 | "type": "github" 14 | }, 15 | "original": { 16 | "owner": "numtide", 17 | "repo": "flake-utils", 18 | "type": "github" 19 | } 20 | }, 21 | "flake-utils_2": { 22 | "inputs": { 23 | "systems": "systems_2" 24 | }, 25 | "locked": { 26 | "lastModified": 1705309234, 27 | "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", 28 | "owner": "numtide", 29 | "repo": "flake-utils", 30 | "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", 31 | "type": "github" 32 | }, 33 | "original": { 34 | "owner": "numtide", 35 | "repo": "flake-utils", 36 | "type": "github" 37 | } 38 | }, 39 | "nixpkgs": { 40 | "locked": { 41 | "lastModified": 1717786204, 42 | "narHash": "sha256-4q0s6m0GUcN7q+Y2DqD27iLvbcd1G50T2lv08kKxkSI=", 43 | "owner": "NixOS", 44 | "repo": "nixpkgs", 45 | "rev": "051f920625ab5aabe37c920346e3e69d7d34400e", 46 | "type": "github" 47 | }, 48 | "original": { 49 | "owner": "NixOS", 50 | "ref": "nixos-unstable", 51 | "repo": "nixpkgs", 52 | "type": "github" 53 | } 54 | }, 55 | "nixpkgs_2": { 56 | "locked": { 57 | "lastModified": 1706487304, 58 | "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", 59 | "owner": "NixOS", 60 | "repo": "nixpkgs", 61 | "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", 62 | "type": "github" 63 | }, 64 | "original": { 65 | "owner": "NixOS", 66 | "ref": "nixpkgs-unstable", 67 | "repo": "nixpkgs", 68 | "type": "github" 69 | } 70 | }, 71 | "root": { 72 | "inputs": { 73 | "flake-utils": "flake-utils", 74 | "nixpkgs": "nixpkgs", 75 | "rust-overlay": "rust-overlay" 76 | } 77 | }, 78 | "rust-overlay": { 79 | "inputs": { 80 | "flake-utils": "flake-utils_2", 81 | "nixpkgs": "nixpkgs_2" 82 | }, 83 | "locked": { 84 | "lastModified": 1717899611, 85 | "narHash": "sha256-9Z95F8lnY/5sOf7Z4IdABKz1ulB0ueNrZU864rQj280=", 86 | "owner": "oxalica", 87 | "repo": "rust-overlay", 88 | "rev": "1f536afad5c18ea4ae6bb592c3fef038e1e33568", 89 | "type": "github" 90 | }, 91 | "original": { 92 | "owner": "oxalica", 93 | "repo": "rust-overlay", 94 | "type": "github" 95 | } 96 | }, 97 | "systems": { 98 | "locked": { 99 | "lastModified": 1681028828, 100 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 101 | "owner": "nix-systems", 102 | "repo": "default", 103 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 104 | "type": "github" 105 | }, 106 | "original": { 107 | "owner": "nix-systems", 108 | "repo": "default", 109 | "type": "github" 110 | } 111 | }, 112 | "systems_2": { 113 | "locked": { 114 | "lastModified": 1681028828, 115 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 116 | "owner": "nix-systems", 117 | "repo": "default", 118 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 119 | "type": "github" 120 | }, 121 | "original": { 122 | "owner": "nix-systems", 123 | "repo": "default", 124 | "type": "github" 125 | } 126 | } 127 | }, 128 | "root": "root", 129 | "version": 7 130 | } 131 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "test"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 | rust-overlay.url = "github:oxalica/rust-overlay"; 7 | flake-utils.url = "github:numtide/flake-utils"; 8 | }; 9 | 10 | outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: 11 | flake-utils.lib.eachDefaultSystem (system: 12 | let 13 | overlays = [ (import rust-overlay) ]; 14 | pkgs = import nixpkgs { 15 | inherit system overlays; 16 | }; 17 | in 18 | with pkgs; 19 | { 20 | devShells.default = mkShell { 21 | buildInputs = [ 22 | probe-rs 23 | flip-link 24 | (rust-bin.fromRustupToolchainFile ./rust-toolchain.toml) 25 | ]; 26 | 27 | shellHook = '' 28 | alias flash="cargo run --release" 29 | ''; 30 | }; 31 | } 32 | ); 33 | } -------------------------------------------------------------------------------- /memory.x: -------------------------------------------------------------------------------- 1 | /* Linker script for the STM32F429ZIT6 on STM32F429i Discover Kit */ 2 | MEMORY 3 | { 4 | /* NOTE 1 K = 1 KiBi = 1024 bytes */ 5 | FLASH : ORIGIN = 0x08000000, LENGTH = 2048K 6 | RAM : ORIGIN = 0x20000000, LENGTH = 192K 7 | SDRAM : ORIGIN = 0xd0000000, LENGTH = 8192K 8 | } 9 | 10 | /* This is where the call stack will be allocated. */ 11 | /* The stack is of the full descending type. */ 12 | /* NOTE Do NOT modify `_stack_start` unless you know what you are doing */ 13 | _stack_start = ORIGIN(RAM) + LENGTH(RAM); 14 | 15 | SECTIONS { 16 | .frame_buffer (NOLOAD) : { 17 | . = ALIGN(4); 18 | *(.frame_buffer); 19 | . = ALIGN(4); 20 | } > SDRAM 21 | .embedded_alloc_heap (NOLOAD) : { 22 | . = ALIGN(4); 23 | *(.embedded_alloc_heap); 24 | . = ALIGN(4); 25 | } > SDRAM 26 | .slint_assets (NOLOAD) : { 27 | . = ALIGN(4); 28 | __s_slint_assets = .; 29 | *(.slint_assets); 30 | . = ALIGN(4); 31 | } > SDRAM 32 | 33 | __e_slint_assets = .; 34 | __si_slint_assets = LOADADDR(.slint_assets); 35 | } -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "1.78" 3 | components = [ "rust-src", "rustfmt", "llvm-tools" ] 4 | targets = [ 5 | "thumbv7em-none-eabihf" 6 | ] 7 | profile = "complete" 8 | -------------------------------------------------------------------------------- /src/drivers/bsp.rs: -------------------------------------------------------------------------------- 1 | extern crate alloc; 2 | 3 | use alloc::{boxed::Box, rc::Rc}; 4 | use core::cell::RefCell; 5 | use defmt::info; 6 | 7 | use embedded_alloc::Heap; 8 | 9 | use i_slint_core::software_renderer::MinimalSoftwareWindow; 10 | 11 | // use defmt::*; 12 | use {defmt_rtt as _, panic_probe as _}; 13 | 14 | use hal::i2c::Mode; 15 | use hal::pac::Peripherals as device; 16 | use stm32f4xx_hal as hal; 17 | 18 | use super::fmc::Sdram; 19 | use super::ltdc::Ltdc; 20 | use super::touchscreen::TouchScreen; 21 | 22 | use slint::platform::software_renderer; 23 | 24 | use stm32f4xx_hal::{ 25 | gpio::{GpioExt, Speed}, 26 | prelude::*, 27 | spi::{Mode as SpiMode, Phase, Polarity}, 28 | }; 29 | 30 | slint::include_modules!(); 31 | 32 | const HEAP_SIZE: usize = 200 * 1024; 33 | #[link_section = ".embedded_alloc_heap"] 34 | static mut HEAP: [u8; HEAP_SIZE] = [0; HEAP_SIZE]; 35 | 36 | #[global_allocator] 37 | static ALLOCATOR: Heap = Heap::empty(); 38 | 39 | const DISPLAY_WIDTH: usize = 320; 40 | const DISPLAY_HEIGHT: usize = 240; 41 | const FRAME_BUFFER_SIZE: usize = DISPLAY_WIDTH * DISPLAY_HEIGHT; 42 | 43 | pub type TargetPixel = software_renderer::Rgb565Pixel; 44 | 45 | #[link_section = ".frame_buffer"] 46 | static mut FB1: [TargetPixel; FRAME_BUFFER_SIZE] = 47 | [software_renderer::Rgb565Pixel(0); FRAME_BUFFER_SIZE]; 48 | #[link_section = ".frame_buffer"] 49 | static mut FB2: [TargetPixel; FRAME_BUFFER_SIZE] = 50 | [software_renderer::Rgb565Pixel(0); FRAME_BUFFER_SIZE]; 51 | 52 | macro_rules! fmc_pins { 53 | ($($pin:expr),*) => { 54 | ( 55 | $( 56 | $pin.into_push_pull_output() 57 | .speed(Speed::VeryHigh) 58 | .into_alternate::<12>() 59 | .internal_pull_up(false) 60 | ),* 61 | ) 62 | }; 63 | } 64 | 65 | macro_rules! ltdc_pins_af14 { 66 | ($($pin:expr),*) => { 67 | ( 68 | $( 69 | $pin.into_push_pull_output() 70 | .speed(Speed::VeryHigh) 71 | .into_alternate::<14>() 72 | .internal_pull_up(false) 73 | ),* 74 | ) 75 | }; 76 | } 77 | 78 | macro_rules! ltdc_pins_af9 { 79 | ($($pin:expr),*) => { 80 | ( 81 | $( 82 | $pin.into_push_pull_output() 83 | .speed(Speed::VeryHigh) 84 | .into_alternate::<9>() 85 | .internal_pull_up(false) 86 | ),* 87 | ) 88 | }; 89 | } 90 | 91 | pub struct StmBackendInner { 92 | pub delay: stm32f4xx_hal::timer::DelayUs, 93 | pub ts_dev: TouchScreen, 94 | } 95 | 96 | impl Default for StmBackendInner { 97 | fn default() -> Self { 98 | let dp = device::take().unwrap(); 99 | 100 | // Debug probe fix for RTT 101 | dp.RCC.apb2enr.write(|w| w.syscfgen().enabled()); 102 | dp.DBGMCU.cr.modify(|_, w| { 103 | w.dbg_sleep().set_bit(); 104 | w.dbg_standby().set_bit(); 105 | w.dbg_stop().set_bit() 106 | }); 107 | dp.RCC.ahb1enr.modify(|_, w| w.dma1en().enabled()); 108 | dp.RCC.ahb1enr.modify(|_, w| w.gpiogen().enabled()); 109 | 110 | let rcc = dp.RCC.constrain(); 111 | let clocks = rcc 112 | .cfgr 113 | .use_hse(8.MHz()) 114 | .sysclk(168.MHz()) 115 | .hclk(168.MHz()) 116 | .pclk1(42.MHz()) 117 | .pclk2(84.MHz()) 118 | // .require_pll48clk() 119 | .freeze(); 120 | 121 | let mut delay = dp.TIM6.delay_us(&clocks); 122 | 123 | let gpio_a = dp.GPIOA.split(); 124 | let gpio_b = dp.GPIOB.split(); 125 | let gpio_c = dp.GPIOC.split(); 126 | let gpio_d = dp.GPIOD.split(); 127 | let gpio_e = dp.GPIOE.split(); 128 | let gpio_f = dp.GPIOF.split(); 129 | let gpio_g = dp.GPIOG.split(); 130 | 131 | // Init FMC/SDRAM that start at 0xD000_0000 132 | // GPIO Config 133 | #[rustfmt::skip] 134 | let _ = fmc_pins!( 135 | // A0-A11 136 | gpio_f.pf0, 137 | gpio_f.pf1, 138 | gpio_f.pf2, 139 | gpio_f.pf3, 140 | gpio_f.pf4, 141 | gpio_f.pf5, 142 | gpio_f.pf12, 143 | gpio_f.pf13, 144 | gpio_f.pf14, 145 | gpio_f.pf15, 146 | gpio_g.pg0, 147 | gpio_g.pg1, 148 | // BA0-BA1 149 | gpio_g.pg4, 150 | gpio_g.pg5, 151 | // D0-D15 152 | gpio_d.pd14, 153 | gpio_d.pd15, 154 | gpio_d.pd0, 155 | gpio_d.pd1, 156 | gpio_e.pe7, 157 | gpio_e.pe8, 158 | gpio_e.pe9, 159 | gpio_e.pe10, 160 | gpio_e.pe11, 161 | gpio_e.pe12, 162 | gpio_e.pe13, 163 | gpio_e.pe14, 164 | gpio_e.pe15, 165 | gpio_d.pd8, 166 | gpio_d.pd9, 167 | gpio_d.pd10, 168 | // NBL0 - NBL1 169 | gpio_e.pe0, 170 | gpio_e.pe1, 171 | // SDCKE1 172 | gpio_b.pb5, 173 | // SDCLK 174 | gpio_g.pg8, 175 | // SDNCAS 176 | gpio_g.pg15, 177 | // SDNE1 178 | gpio_b.pb6, 179 | // SDNRAS 180 | gpio_f.pf11, 181 | // SDNWE 182 | gpio_c.pc0 183 | ); 184 | 185 | let _sdram_ptr = Sdram::new(&mut delay); 186 | /* 187 | // SDRAM Test 188 | let sdram_size = 8 * 1024 * 1024; // 8MiB 189 | let sdram = unsafe { 190 | core::slice::from_raw_parts_mut(_sdram_ptr, sdram_size / core::mem::size_of::()) 191 | }; 192 | 193 | sdram.fill(0x0000); 194 | 195 | for n in 0..240 { 196 | sdram[n + 20 * 240] = 0x1f; 197 | sdram[n + 300 * 240] = 0x1f; 198 | } 199 | 200 | for n in 0..320 { 201 | sdram[n * 240 + 20] = 0x1f; 202 | sdram[n * 240 + 220] = 0x1f; 203 | } 204 | */ 205 | 206 | unsafe { 207 | ALLOCATOR.init( 208 | &mut HEAP as *const u8 as usize, 209 | core::mem::size_of_val(&HEAP), 210 | ) 211 | } 212 | 213 | // Init LCD/LTDC Display 214 | // GPIO Config 215 | // LTDC_AF14 216 | #[rustfmt::skip] 217 | let _ = ltdc_pins_af14!( 218 | // R2-R7 219 | gpio_c.pc10, 220 | // gpio_b.pb0, 221 | gpio_a.pa11, 222 | gpio_a.pa12, 223 | // gpio_b.pb1, 224 | gpio_g.pg6, 225 | // G2-G7 226 | gpio_a.pa6, 227 | // gpio_g.pg10, 228 | gpio_b.pb10, 229 | gpio_b.pb11, 230 | gpio_c.pc7, 231 | gpio_d.pd3, 232 | // B2-B7 233 | gpio_d.pd6, 234 | gpio_g.pg11, 235 | // gpio_g.pg12, 236 | gpio_a.pa3, 237 | gpio_b.pb8, 238 | gpio_b.pb9, 239 | // LCD_TFT HSYNC 240 | gpio_c.pc6, 241 | // LCDTFT VSYNC 242 | gpio_a.pa4, 243 | // LCD_TFT CLK 244 | gpio_g.pg7, 245 | // LCD_TFT DE 246 | gpio_f.pf10 247 | ); 248 | 249 | // LTDC_AF9 250 | #[rustfmt::skip] 251 | let _ = ltdc_pins_af9!( 252 | gpio_b.pb0, // R3 253 | gpio_b.pb1, // R6 254 | gpio_g.pg10, // G3 255 | gpio_g.pg12 // B4 256 | ); 257 | 258 | // SPI Config 259 | // ILI931 LCD IO init 260 | // GPIO init 261 | // GPIOD is already enabled 262 | // LCD RDX PD12 263 | // LCD WRX PD 13 264 | // LCD NCS PC2 265 | 266 | // LCD SPI init 267 | /* SPI baudrate is set to 5.6 MHz (PCLK2/SPI_BaudRatePrescaler = 84/16 = 5.25 MHz) 268 | to verify these constraints: 269 | - ILI9341 LCD SPI interface max baudrate is 10MHz for write and 6.66MHz for read 270 | - l3gd20 SPI interface max baudrate is 10MHz for write/read 271 | - PCLK2 frequency is set to 84 MHz 272 | */ 273 | // GPIO SPI5 CLK PF7, SPI5 MISO PF8, SPI5 MOSI PF9 274 | 275 | let mut lcd_rdx = gpio_d.pd12.into_push_pull_output().speed(Speed::VeryHigh); 276 | let mut lcd_wrx = gpio_d.pd13.into_push_pull_output().speed(Speed::VeryHigh); 277 | let mut lcd_ncs = gpio_c.pc2.into_push_pull_output().speed(Speed::VeryHigh); 278 | 279 | lcd_rdx.set_high(); 280 | lcd_wrx.set_high(); 281 | lcd_ncs.set_high(); 282 | 283 | let lcd_clk = gpio_f 284 | .pf7 285 | .into_push_pull_output() 286 | .speed(Speed::VeryHigh) 287 | .into_alternate::<5>() 288 | .internal_pull_up(false); 289 | 290 | let lcd_miso = gpio_f 291 | .pf8 292 | .into_push_pull_output() 293 | .speed(Speed::VeryHigh) 294 | .into_alternate::<5>() 295 | .internal_pull_up(false); 296 | 297 | let lcd_mosi = gpio_f 298 | .pf9 299 | .into_push_pull_output() 300 | .speed(Speed::VeryHigh) 301 | .into_alternate::<5>() 302 | .internal_pull_up(false); 303 | 304 | let lcd_mode = SpiMode { 305 | polarity: Polarity::IdleLow, 306 | phase: Phase::CaptureOnFirstTransition, 307 | }; 308 | let lcd_spi = dp 309 | .SPI5 310 | .spi((lcd_clk, lcd_miso, lcd_mosi), lcd_mode, 2.MHz(), &clocks); 311 | 312 | let (fb1, fb2) = unsafe { (&mut FB1, &mut FB2) }; 313 | 314 | let mut ltdc_dev = Ltdc { spi_dev: lcd_spi }; 315 | let _ = Ltdc::new( 316 | &mut ltdc_dev, 317 | fb1.as_ptr() as *const u16, 318 | fb2.as_ptr() as *const u16, 319 | &mut delay, 320 | ); 321 | 322 | // Init Touch Screen 323 | let i2c3_scl = gpio_a.pa8.into_alternate_open_drain::<4>(); 324 | let i2c3_sda = gpio_c.pc9.into_alternate_open_drain::<4>(); 325 | 326 | let i2c3_dev = dp.I2C3.i2c( 327 | (i2c3_scl, i2c3_sda), 328 | Mode::Standard { 329 | frequency: 100.kHz(), 330 | }, 331 | &clocks, 332 | ); 333 | 334 | let mut ts_dev = TouchScreen { i2c_dev: i2c3_dev }; 335 | let _ = TouchScreen::init(&mut ts_dev, &mut delay); 336 | 337 | // LEDsinit 338 | let _led_green = gpio_g.pg13.into_push_pull_output(); 339 | let _led_red = gpio_g.pg14.into_push_pull_output(); 340 | 341 | // Init RNG 342 | 343 | StmBackendInner { delay, ts_dev } 344 | } 345 | } 346 | 347 | pub struct StmBackend { 348 | window: RefCell>>, 349 | inner: RefCell>, 350 | } 351 | 352 | impl Default for StmBackend { 353 | fn default() -> Self { 354 | Self { 355 | window: RefCell::new(None), 356 | inner: RefCell::new(None), 357 | } 358 | } 359 | } 360 | 361 | impl slint::platform::Platform for StmBackend { 362 | fn create_window_adapter( 363 | &self, 364 | ) -> Result, slint::PlatformError> { 365 | if self.window.borrow().as_ref().is_none() { 366 | let window = slint::platform::software_renderer::MinimalSoftwareWindow::new( 367 | slint::platform::software_renderer::RepaintBufferType::SwappedBuffers, 368 | ); 369 | self.window.replace(Some(window.clone())); 370 | Ok(window) 371 | } else { 372 | Ok(self.window.take().unwrap().clone()) 373 | } 374 | } 375 | 376 | fn run_event_loop(&self) -> Result<(), slint::PlatformError> { 377 | let mut inner = self.inner.take().unwrap(); 378 | 379 | let (fb1, fb2) = unsafe { (&mut FB1, &mut FB2) }; 380 | let mut work_fb: &mut [TargetPixel] = fb2; 381 | let mut display_refreshed = false; 382 | let mut last_touch = None; 383 | 384 | self.window 385 | .borrow() 386 | .as_ref() 387 | .unwrap() 388 | .set_size(slint::PhysicalSize::new( 389 | DISPLAY_WIDTH as u32, 390 | DISPLAY_HEIGHT as u32, 391 | )); 392 | 393 | let ltd_dev = unsafe { &*stm32f4xx_hal::pac::LTDC::ptr() }; 394 | 395 | loop { 396 | slint::platform::update_timers_and_animations(); 397 | 398 | if let Some(window) = self.window.borrow().clone() { 399 | window.draw_if_needed(|renderer| { 400 | while ltd_dev.srcr.read().vbr().bit_is_set() {} 401 | renderer.set_window_rotation(software_renderer::WindowRotation::Rotate270); 402 | renderer.render(work_fb, DISPLAY_HEIGHT); 403 | renderer.set_window_rotation(software_renderer::WindowRotation::NoRotation); 404 | display_refreshed = true; 405 | }); 406 | 407 | // Swap FrameBuffer 408 | if display_refreshed { 409 | if work_fb.as_ptr() == fb2.as_ptr() { 410 | ltd_dev 411 | .layer1 412 | .cfbar 413 | .modify(|_, w| w.cfbadd().bits(fb2.as_ptr() as u32)); 414 | work_fb = fb1; 415 | } else { 416 | ltd_dev 417 | .layer1 418 | .cfbar 419 | .modify(|_, w| w.cfbadd().bits(fb1.as_ptr() as u32)); 420 | work_fb = fb2; 421 | } 422 | display_refreshed = false; 423 | ltd_dev.srcr.modify(|_, w| w.vbr().set_bit()); 424 | } 425 | 426 | // handle touch event 427 | let ts_data_xyz = inner.ts_dev.get_xyz(); 428 | let _x = (ts_data_xyz >> 20) & 0x00000FFF; 429 | let _y = (ts_data_xyz >> 8) & 0x00000FFF; 430 | let z = ts_data_xyz & 0xff; 431 | 432 | let button = slint::platform::PointerEventButton::Left; 433 | let event = if z > 0 { 434 | // Calibration 435 | let x = ((_y as f64 - 640_f64) * 280_f64 / 3100_f64 + 20_f64) as i32; 436 | let y = ((_x as f64 - 500_f64) * 200_f64 / 3000_f64 + 20_f64) as i32; 437 | 438 | let position = slint::PhysicalPosition::new(x as i32, y as i32) 439 | .to_logical(window.scale_factor()); 440 | Some(match last_touch.replace(position) { 441 | Some(_) => slint::platform::WindowEvent::PointerMoved { position }, 442 | None => slint::platform::WindowEvent::PointerPressed { position, button }, 443 | }) 444 | } else { 445 | last_touch.take().map(|position| { 446 | slint::platform::WindowEvent::PointerReleased { position, button } 447 | }) 448 | }; 449 | 450 | if let Some(event) = event { 451 | let is_pointer_release_event = 452 | matches!(event, slint::platform::WindowEvent::PointerReleased { .. }); 453 | 454 | window.dispatch_event(event); 455 | 456 | // removes hover state on widgets 457 | if is_pointer_release_event { 458 | window.dispatch_event(slint::platform::WindowEvent::PointerExited); 459 | } 460 | } 461 | } 462 | inner.delay.delay_us(5_000_u16); 463 | } 464 | } 465 | 466 | fn duration_since_start(&self) -> core::time::Duration { 467 | core::time::Duration::from_millis(lilos::time::TickTime::now().into()) 468 | } 469 | 470 | fn debug_log(&self, arguments: core::fmt::Arguments) { 471 | use alloc::string::ToString; 472 | info!("{=str}", arguments.to_string()); 473 | } 474 | } 475 | 476 | pub async fn slint_async_run_event_loop(mut inner: StmBackendInner) { 477 | let backend = StmBackend::default(); 478 | 479 | let window = MinimalSoftwareWindow::new(Default::default()); 480 | backend.window.replace(Some(window.clone())); 481 | slint::platform::set_platform(Box::new(backend)).unwrap(); 482 | 483 | let ui = MainWindow::new(); 484 | ui.unwrap().show().unwrap(); 485 | 486 | let (fb1, fb2) = unsafe { (&mut FB1, &mut FB2) }; 487 | let mut work_fb: &mut [TargetPixel] = fb2; 488 | let mut display_refreshed = false; 489 | 490 | let mut last_touch = None; 491 | 492 | window.set_size(slint::PhysicalSize::new( 493 | DISPLAY_WIDTH as u32, 494 | DISPLAY_HEIGHT as u32, 495 | )); 496 | 497 | window.show().unwrap(); 498 | 499 | let ltd_dev = unsafe { &*stm32f4xx_hal::pac::LTDC::ptr() }; 500 | 501 | loop { 502 | slint::platform::update_timers_and_animations(); 503 | 504 | window.draw_if_needed(|renderer| { 505 | while ltd_dev.srcr.read().vbr().bit_is_set() {} 506 | renderer.set_window_rotation(software_renderer::WindowRotation::Rotate270); 507 | renderer.render(work_fb, DISPLAY_HEIGHT); 508 | renderer.set_window_rotation(software_renderer::WindowRotation::NoRotation); 509 | display_refreshed = true; 510 | }); 511 | 512 | // Swap FrameBuffer 513 | if display_refreshed { 514 | if work_fb.as_ptr() == fb2.as_ptr() { 515 | ltd_dev 516 | .layer1 517 | .cfbar 518 | .modify(|_, w| w.cfbadd().bits(fb2.as_ptr() as u32)); 519 | work_fb = fb1; 520 | } else { 521 | ltd_dev 522 | .layer1 523 | .cfbar 524 | .modify(|_, w| w.cfbadd().bits(fb1.as_ptr() as u32)); 525 | work_fb = fb2; 526 | } 527 | display_refreshed = false; 528 | ltd_dev.srcr.modify(|_, w| w.vbr().set_bit()); 529 | } 530 | 531 | // handle touch event 532 | let ts_data_xyz = inner.ts_dev.get_xyz(); 533 | let _x = (ts_data_xyz >> 20) & 0x00000FFF; 534 | let _y = (ts_data_xyz >> 8) & 0x00000FFF; 535 | let z = ts_data_xyz & 0xff; 536 | 537 | let button = slint::platform::PointerEventButton::Left; 538 | let event = if z > 0 { 539 | // Calibration 540 | let x = ((_y as f64 - 640_f64) * 280_f64 / 3100_f64 + 20_f64) as i32; 541 | let y = ((_x as f64 - 500_f64) * 200_f64 / 3000_f64 + 20_f64) as i32; 542 | 543 | let position = 544 | slint::PhysicalPosition::new(x as i32, y as i32).to_logical(window.scale_factor()); 545 | Some(match last_touch.replace(position) { 546 | Some(_) => slint::platform::WindowEvent::PointerMoved { position }, 547 | None => slint::platform::WindowEvent::PointerPressed { position, button }, 548 | }) 549 | } else { 550 | last_touch 551 | .take() 552 | .map(|position| slint::platform::WindowEvent::PointerReleased { position, button }) 553 | }; 554 | 555 | if let Some(event) = event { 556 | let is_pointer_release_event = 557 | matches!(event, slint::platform::WindowEvent::PointerReleased { .. }); 558 | 559 | window.dispatch_event(event); 560 | 561 | // removes hover state on widgets 562 | if is_pointer_release_event { 563 | window.dispatch_event(slint::platform::WindowEvent::PointerExited); 564 | } 565 | } 566 | 567 | lilos::exec::yield_cpu().await; 568 | } 569 | } 570 | -------------------------------------------------------------------------------- /src/drivers/display.rs: -------------------------------------------------------------------------------- 1 | use embedded_graphics_core::{pixelcolor::Rgb565, prelude::*, primitives::Rectangle}; 2 | 3 | pub struct LtdcDisplay { 4 | pub fb_ptr: *const u16, 5 | pub width: usize, 6 | pub height: usize, 7 | } 8 | 9 | impl OriginDimensions for LtdcDisplay { 10 | fn size(&self) -> Size { 11 | Size::new(self.width as u32, self.height as u32) 12 | } 13 | } 14 | 15 | impl DrawTarget for LtdcDisplay { 16 | type Error = core::convert::Infallible; 17 | type Color = Rgb565; 18 | 19 | fn draw_iter(&mut self, pixels: I) -> Result<(), Self::Error> 20 | where 21 | I: IntoIterator>, 22 | { 23 | let fb = unsafe { 24 | core::slice::from_raw_parts_mut(self.fb_ptr as *mut u16, self.width * self.height + 3) 25 | }; 26 | 27 | for Pixel(point, color) in pixels { 28 | if self.bounding_box().contains(point) { 29 | let x = point.x as usize; 30 | let y = point.y as usize; 31 | 32 | let addr: usize = (self.height - y) + self.height * x; 33 | fb[addr] = color.into_storage(); 34 | } 35 | } 36 | Ok(()) 37 | } 38 | 39 | fn fill_solid(&mut self, area: &Rectangle, color: Self::Color) -> Result<(), Self::Error> { 40 | self.fill_contiguous(area, core::iter::repeat(color)) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/drivers/fmc.rs: -------------------------------------------------------------------------------- 1 | use hal::interrupt; 2 | use hal::pac::Interrupt; 3 | use hal::pac::Peripherals as device; 4 | use hal::pac::NVIC; 5 | use stm32f4xx_hal as hal; 6 | 7 | use embedded_hal::blocking::delay::DelayUs; 8 | 9 | pub struct Sdram {} 10 | impl Sdram { 11 | pub fn new(delay: &mut D) -> *mut u16 12 | where 13 | D: DelayUs, 14 | { 15 | let dp = unsafe { device::steal() }; 16 | dp.RCC.ahb3enr.modify(|_, w| w.fmcen().enabled()); 17 | dp.RCC.ahb1enr.modify(|_, w| w.dma2den().enabled()); 18 | 19 | // SDRAM DMA Init 20 | // Deinit 21 | let dma2_stream0 = dp.DMA2.st.get(0).unwrap(); 22 | dma2_stream0.cr.modify(|_, w| w.en().clear_bit()); 23 | dma2_stream0.cr.modify(|_, w| unsafe { w.bits(0x00) }); 24 | dma2_stream0.ndtr.modify(|_, w| unsafe { w.bits(0x00) }); 25 | dma2_stream0.par.modify(|_, w| unsafe { w.bits(0x00) }); 26 | dma2_stream0.m0ar.modify(|_, w| unsafe { w.bits(0x00) }); 27 | dma2_stream0.m1ar.modify(|_, w| unsafe { w.bits(0x00) }); 28 | dma2_stream0.fcr.modify(|_, w| unsafe { w.bits(0x21) }); 29 | 30 | // Init 31 | // Check if the DMA Stream is effectively disabled 32 | while dma2_stream0.cr.read().en().bit_is_set() {} 33 | 34 | dma2_stream0.cr.modify(|_, w| { 35 | w.chsel() 36 | .bits(0) 37 | .dir() 38 | .memory_to_memory() 39 | .pinc() 40 | .set_bit() 41 | .minc() 42 | .set_bit() 43 | .psize() 44 | .bits16() 45 | .msize() 46 | .bits16() 47 | .circ() 48 | .clear_bit() 49 | .pfctrl() 50 | .clear_bit() 51 | }); 52 | 53 | dp.DMA2.lifcr.write(|w| { 54 | w.cdmeif0() 55 | .clear_bit() 56 | .cfeif0() 57 | .clear_bit() 58 | .chtif0() 59 | .clear_bit() 60 | .ctcif0() 61 | .clear_bit() 62 | .cteif0() 63 | .clear_bit() 64 | }); 65 | 66 | // TODO: calculate priority for 67 | // Device : DMA2 Stream0 68 | // PreemptPriority : 0x0f 69 | // SubPriority : 0x00 70 | // NVIC::set_priority(&mut self, interrupt, prio); 71 | unsafe { NVIC::unmask(Interrupt::DMA2_STREAM0) }; 72 | 73 | // SDRAM FMC Init 74 | dp.FMC 75 | .sdcr1() 76 | .modify(|_, w| w.rpipe().clocks1().rburst().disabled().sdclk().div2()); 77 | 78 | dp.FMC.sdcr2().modify(|_, w| { 79 | w.rpipe() 80 | .no_delay() 81 | .rburst() 82 | .disabled() 83 | .sdclk() 84 | .disabled() 85 | .wp() 86 | .disabled() 87 | .cas() 88 | .clocks3() 89 | .nb() 90 | .nb4() 91 | .mwid() 92 | .bits16() 93 | .nr() 94 | .bits12() 95 | .nc() 96 | .bits8() 97 | }); 98 | 99 | dp.FMC.sdtr1().modify(|_, w| w.trc().bits(7).trp().bits(2)); 100 | 101 | dp.FMC.sdtr2().modify(|_, w| { 102 | w.trcd() 103 | .bits(2) 104 | .trp() 105 | .bits(0) 106 | .twr() 107 | .bits(2) 108 | .trc() 109 | .bits(0) 110 | .tras() 111 | .bits(4) 112 | .txsr() 113 | .bits(7) 114 | .tmrd() 115 | .bits(2) 116 | }); 117 | 118 | // Wait for SDRAM module is ready 119 | while dp.FMC.sdsr.read().busy().bit_is_set() {} 120 | 121 | let _ = &dp.FMC.sdcmr.modify(|_, w| { 122 | w.mode() 123 | .clock_configuration_enable() 124 | .ctb2() 125 | .set_bit() 126 | .ctb1() 127 | .clear_bit() 128 | .nrfs() 129 | .bits(1) 130 | .mrd() 131 | .bits(0) 132 | }); 133 | 134 | delay.delay_us(1); 135 | 136 | // Wait for SDRAM module is ready 137 | while dp.FMC.sdsr.read().busy().bit_is_set() {} 138 | 139 | let _ = &dp.FMC.sdcmr.modify(|_, w| { 140 | w.mode() 141 | .pall() 142 | .ctb2() 143 | .set_bit() 144 | .ctb1() 145 | .clear_bit() 146 | .nrfs() 147 | .bits(1) 148 | .mrd() 149 | .bits(0) 150 | }); 151 | 152 | // Wait for SDRAM module is ready 153 | while dp.FMC.sdsr.read().busy().bit_is_set() {} 154 | 155 | let _ = &dp.FMC.sdcmr.modify(|_, w| { 156 | w.mode() 157 | .load_mode_register() 158 | .ctb2() 159 | .set_bit() 160 | .ctb1() 161 | .clear_bit() 162 | .nrfs() 163 | .bits(4) 164 | .mrd() 165 | .bits(0x0230) 166 | }); 167 | 168 | // Wait for SDRAM module is ready 169 | while dp.FMC.sdsr.read().busy().bit_is_set() {} 170 | 171 | let _ = &dp.FMC.sdrtr.modify(|_, w| w.count().bits(1386)); 172 | 173 | // Wait for SDRAM module is ready 174 | while dp.FMC.sdsr.read().busy().bit_is_set() {} 175 | 176 | return 0xd000_0000 as *mut u16; 177 | } 178 | } 179 | 180 | // DMA2 Stream0 Interrupt 181 | #[interrupt] 182 | fn DMA2_STREAM0() { 183 | cortex_m::interrupt::free(|_| { 184 | let dma2 = unsafe { &*stm32f4xx_hal::pac::DMA2::ptr() }; 185 | 186 | dma2.lifcr.write(|w| { 187 | w.cdmeif0() 188 | .clear_bit() 189 | .cfeif0() 190 | .clear_bit() 191 | .chtif0() 192 | .clear_bit() 193 | .ctcif0() 194 | .clear_bit() 195 | .cteif0() 196 | .clear_bit() 197 | }); 198 | }); 199 | } 200 | -------------------------------------------------------------------------------- /src/drivers/ltdc.rs: -------------------------------------------------------------------------------- 1 | // use defmt::*; 2 | use {defmt_rtt as _, panic_probe as _}; 3 | 4 | use hal::interrupt; 5 | use hal::pac::Interrupt; 6 | use hal::pac::NVIC; 7 | use hal::spi::Spi5; 8 | use stm32f4xx_hal as hal; 9 | 10 | use embedded_hal::blocking::delay::DelayUs; 11 | 12 | // const LCD_SWRESET: u32 = 0x01; 13 | const LCD_SLEEP_OUT: u8 = 0x11; 14 | // const LCD_WRITE_MEM_CONTINUE: u8 = 0x3c; 15 | // const LCD_PIXEL_FORMAT: u8 = 0x3a; 16 | const LCD_DISPLAY_ON: u8 = 0x29; 17 | 18 | const LCD_INTERFACE: u8 = 0xf6; 19 | const LCD_COLUMN_ADDR: u8 = 0x2a; 20 | const LCD_PAGE_ADDR: u8 = 0x2b; 21 | const LCD_POWERB: u8 = 0xCF; 22 | const LCD_POWER_SEQ: u8 = 0xED; 23 | const LCD_DTCA: u8 = 0xE8; 24 | const LCD_POWERA: u8 = 0xCB; 25 | const LCD_PRC: u8 = 0xF7; 26 | const LCD_DTCB: u8 = 0xEA; 27 | const LCD_FRMCTR1: u8 = 0xb1; 28 | const LCD_POWER1: u8 = 0xC0; 29 | const LCD_POWER2: u8 = 0xC1; 30 | const LCD_VCOM1: u8 = 0xC5; 31 | const LCD_VCOM2: u8 = 0xC7; 32 | const LCD_MAC: u8 = 0x36; 33 | const LCD_3GAMMA_EN: u8 = 0xF2; 34 | const LCD_RGB_INTERFACE: u8 = 0xb0; 35 | const LCD_DFC: u8 = 0xb6; 36 | const LCD_GRAM: u8 = 0x2C; 37 | const LCD_GAMMA: u8 = 0x26; 38 | const LCD_PGAMMA: u8 = 0xE0; 39 | const LCD_NGAMMA: u8 = 0xE1; 40 | 41 | macro_rules! lcd_wrx_high { 42 | () => { 43 | let gpiod = unsafe { &*stm32f4xx_hal::pac::GPIOD::ptr() }; 44 | gpiod.bsrr.write(|w| w.bs13().set_bit()); 45 | }; 46 | } 47 | 48 | macro_rules! lcd_wrx_low { 49 | () => { 50 | let gpiod = unsafe { &*stm32f4xx_hal::pac::GPIOD::ptr() }; 51 | gpiod.bsrr.write(|w| w.br13().set_bit()); 52 | }; 53 | } 54 | 55 | macro_rules! lcd_cs_high { 56 | () => { 57 | let gpioc = unsafe { &*stm32f4xx_hal::pac::GPIOC::ptr() }; 58 | gpioc.bsrr.write(|w| w.bs2().set_bit()); 59 | }; 60 | } 61 | 62 | macro_rules! lcd_cs_low { 63 | () => { 64 | let gpioc = unsafe { &*stm32f4xx_hal::pac::GPIOC::ptr() }; 65 | gpioc.bsrr.write(|w| w.br2().set_bit()); 66 | }; 67 | } 68 | 69 | macro_rules! spi_tx { 70 | ($device:expr, $data:expr) => { 71 | lcd_cs_low!(); 72 | while $device.is_busy() || $device.is_tx_empty() == false {} 73 | $device.write(&[$data]).unwrap(); 74 | lcd_cs_high!(); 75 | }; 76 | } 77 | 78 | macro_rules! LCD_IO_WriteData { 79 | ($device:expr, $data:expr) => { 80 | lcd_wrx_high!(); 81 | spi_tx!($device, $data); 82 | }; 83 | } 84 | 85 | macro_rules! LCD_IO_WriteReg { 86 | ($device:expr, $data:expr) => { 87 | lcd_wrx_low!(); 88 | spi_tx!($device, $data); 89 | }; 90 | } 91 | 92 | pub struct Ltdc { 93 | pub spi_dev: Spi5, 94 | } 95 | impl Ltdc { 96 | pub fn new(&mut self, fb_ptr_l1: *const u16, _fb_ptr_l2: *const u16, delay: &mut D) -> bool 97 | where 98 | D: DelayUs, 99 | { 100 | let _ = self.spi_dev.write(&[0x00]); 101 | 102 | let rcc = unsafe { &*stm32f4xx_hal::pac::RCC::ptr() }; 103 | rcc.apb2enr.modify(|_, w| w.ltdcen().set_bit()); 104 | 105 | // Clock config 106 | // PLLSAI_VCO Input = HSE_VALUE/PLL_M = 2 Mhz 107 | // PLLSAI_VCO Output = PLLSAI_VCO Input * PLLSAIN = 190 Mhz 108 | // PLLLCDCLK = PLLSAI_VCO Output/PLLSAIR = 190/5 = 38 Mhz */ 109 | // LTDC clock frequency = PLLLCDCLK / LTDC_PLLSAI_DIVR_4 = 38/4 = 9.5Mhz 110 | rcc.cr.modify(|_, w| w.pllsaion().clear_bit()); 111 | while rcc.cr.read().pllsairdy().bit_is_set() {} 112 | // rcc.cr.modify(|_, w| w.pllsaion().clear_bit()); 113 | rcc.pllsaicfgr 114 | .modify(|_, w| unsafe { w.pllsain().bits(95).pllsair().bits(5) }); 115 | rcc.dckcfgr.modify(|_, w| w.pllsaidivr().div4()); 116 | rcc.cr.modify(|_, w| w.pllsaion().set_bit()); 117 | while rcc.cr.read().pllsairdy().bit_is_clear() {} 118 | 119 | // LTDC config 120 | let ltd_dev = unsafe { &*stm32f4xx_hal::pac::LTDC::ptr() }; 121 | 122 | ltd_dev.gcr.modify(|_, w| { 123 | w.hspol() 124 | .active_low() 125 | .vspol() 126 | .active_low() 127 | .depol() 128 | .active_low() 129 | .pcpol() 130 | .rising_edge() 131 | }); 132 | 133 | ltd_dev.sscr.modify(|_, w| w.hsw().bits(9).vsh().bits(1)); 134 | ltd_dev.bpcr.modify(|_, w| w.ahbp().bits(29).avbp().bits(3)); 135 | ltd_dev 136 | .awcr 137 | .modify(|_, w| w.aaw().bits(269).aah().bits(323)); 138 | ltd_dev 139 | .twcr 140 | .modify(|_, w| w.totalw().bits(279).totalh().bits(327)); 141 | ltd_dev 142 | .bccr 143 | .modify(|_, w| w.bcred().bits(0).bcgreen().bits(0).bcblue().bits(0)); 144 | 145 | ltd_dev 146 | .gcr 147 | .modify(|r, w| unsafe { w.bits(r.bits() | 0x2220) }); 148 | 149 | ltd_dev.gcr.modify(|_, w| w.den().enabled()); 150 | 151 | ltd_dev.gcr.modify(|_, w| w.ltdcen().enabled()); 152 | 153 | unsafe { NVIC::unmask(Interrupt::LCD_TFT) }; 154 | unsafe { NVIC::unmask(Interrupt::LCD_TFT_1) }; 155 | // unsafe { NVIC::unmask(Interrupt::DMA2D) }; 156 | 157 | // Configure LCD 158 | LCD_IO_WriteReg!(self.spi_dev, 0xCA); //??? 159 | LCD_IO_WriteData!(self.spi_dev, 0xC3); 160 | LCD_IO_WriteData!(self.spi_dev, 0x08); 161 | LCD_IO_WriteData!(self.spi_dev, 0x50); 162 | 163 | LCD_IO_WriteReg!(self.spi_dev, LCD_POWERB); 164 | LCD_IO_WriteData!(self.spi_dev, 0x00); 165 | LCD_IO_WriteData!(self.spi_dev, 0xC1); 166 | LCD_IO_WriteData!(self.spi_dev, 0x30); 167 | 168 | LCD_IO_WriteReg!(self.spi_dev, LCD_POWER_SEQ); 169 | LCD_IO_WriteData!(self.spi_dev, 0x64); 170 | LCD_IO_WriteData!(self.spi_dev, 0x03); 171 | LCD_IO_WriteData!(self.spi_dev, 0x12); 172 | LCD_IO_WriteData!(self.spi_dev, 0x81); 173 | 174 | LCD_IO_WriteReg!(self.spi_dev, LCD_DTCA); 175 | LCD_IO_WriteData!(self.spi_dev, 0x85); 176 | LCD_IO_WriteData!(self.spi_dev, 0x00); 177 | LCD_IO_WriteData!(self.spi_dev, 0x78); 178 | 179 | LCD_IO_WriteReg!(self.spi_dev, LCD_POWERA); 180 | LCD_IO_WriteData!(self.spi_dev, 0x39); 181 | LCD_IO_WriteData!(self.spi_dev, 0x2C); 182 | LCD_IO_WriteData!(self.spi_dev, 0x00); 183 | LCD_IO_WriteData!(self.spi_dev, 0x34); 184 | LCD_IO_WriteData!(self.spi_dev, 0x02); 185 | 186 | LCD_IO_WriteReg!(self.spi_dev, LCD_PRC); 187 | LCD_IO_WriteData!(self.spi_dev, 0x20); 188 | 189 | LCD_IO_WriteReg!(self.spi_dev, LCD_DTCB); 190 | LCD_IO_WriteData!(self.spi_dev, 0x00); 191 | LCD_IO_WriteData!(self.spi_dev, 0x00); 192 | 193 | LCD_IO_WriteReg!(self.spi_dev, LCD_FRMCTR1); 194 | LCD_IO_WriteData!(self.spi_dev, 0x00); 195 | LCD_IO_WriteData!(self.spi_dev, 0x1B); 196 | 197 | LCD_IO_WriteReg!(self.spi_dev, LCD_DFC); 198 | LCD_IO_WriteData!(self.spi_dev, 0x0A); 199 | LCD_IO_WriteData!(self.spi_dev, 0xA2); 200 | 201 | LCD_IO_WriteReg!(self.spi_dev, LCD_POWER1); 202 | LCD_IO_WriteData!(self.spi_dev, 0x10); 203 | 204 | LCD_IO_WriteReg!(self.spi_dev, LCD_POWER2); 205 | LCD_IO_WriteData!(self.spi_dev, 0x10); 206 | 207 | LCD_IO_WriteReg!(self.spi_dev, LCD_VCOM1); 208 | LCD_IO_WriteData!(self.spi_dev, 0x45); 209 | LCD_IO_WriteData!(self.spi_dev, 0x15); 210 | 211 | LCD_IO_WriteReg!(self.spi_dev, LCD_VCOM2); 212 | LCD_IO_WriteData!(self.spi_dev, 0x90); 213 | 214 | LCD_IO_WriteReg!(self.spi_dev, LCD_MAC); 215 | LCD_IO_WriteData!(self.spi_dev, 0xC8); 216 | 217 | LCD_IO_WriteReg!(self.spi_dev, LCD_3GAMMA_EN); 218 | LCD_IO_WriteData!(self.spi_dev, 0x00); 219 | 220 | LCD_IO_WriteReg!(self.spi_dev, LCD_RGB_INTERFACE); 221 | LCD_IO_WriteData!(self.spi_dev, 0xC2); 222 | 223 | LCD_IO_WriteReg!(self.spi_dev, LCD_DFC); 224 | LCD_IO_WriteData!(self.spi_dev, 0x0A); 225 | LCD_IO_WriteData!(self.spi_dev, 0xA7); 226 | LCD_IO_WriteData!(self.spi_dev, 0x27); 227 | LCD_IO_WriteData!(self.spi_dev, 0x04); 228 | 229 | LCD_IO_WriteReg!(self.spi_dev, LCD_COLUMN_ADDR); 230 | LCD_IO_WriteData!(self.spi_dev, 0x00); 231 | LCD_IO_WriteData!(self.spi_dev, 0x00); 232 | LCD_IO_WriteData!(self.spi_dev, 0x00); 233 | LCD_IO_WriteData!(self.spi_dev, 0xEF); 234 | 235 | LCD_IO_WriteReg!(self.spi_dev, LCD_PAGE_ADDR); 236 | LCD_IO_WriteData!(self.spi_dev, 0x00); 237 | LCD_IO_WriteData!(self.spi_dev, 0x00); 238 | LCD_IO_WriteData!(self.spi_dev, 0x01); 239 | LCD_IO_WriteData!(self.spi_dev, 0x3F); 240 | 241 | LCD_IO_WriteReg!(self.spi_dev, LCD_INTERFACE); 242 | LCD_IO_WriteData!(self.spi_dev, 0x01); 243 | LCD_IO_WriteData!(self.spi_dev, 0x00); 244 | LCD_IO_WriteData!(self.spi_dev, 0x06); 245 | 246 | LCD_IO_WriteReg!(self.spi_dev, LCD_GRAM); 247 | delay.delay_us(200_000); 248 | 249 | LCD_IO_WriteReg!(self.spi_dev, LCD_GAMMA); 250 | LCD_IO_WriteData!(self.spi_dev, 0x01); 251 | 252 | LCD_IO_WriteReg!(self.spi_dev, LCD_PGAMMA); 253 | LCD_IO_WriteData!(self.spi_dev, 0x0F); 254 | LCD_IO_WriteData!(self.spi_dev, 0x29); 255 | LCD_IO_WriteData!(self.spi_dev, 0x24); 256 | LCD_IO_WriteData!(self.spi_dev, 0x0C); 257 | LCD_IO_WriteData!(self.spi_dev, 0x0E); 258 | LCD_IO_WriteData!(self.spi_dev, 0x09); 259 | LCD_IO_WriteData!(self.spi_dev, 0x4E); 260 | LCD_IO_WriteData!(self.spi_dev, 0x78); 261 | LCD_IO_WriteData!(self.spi_dev, 0x3C); 262 | LCD_IO_WriteData!(self.spi_dev, 0x09); 263 | LCD_IO_WriteData!(self.spi_dev, 0x13); 264 | LCD_IO_WriteData!(self.spi_dev, 0x05); 265 | LCD_IO_WriteData!(self.spi_dev, 0x17); 266 | LCD_IO_WriteData!(self.spi_dev, 0x11); 267 | LCD_IO_WriteData!(self.spi_dev, 0x00); 268 | 269 | LCD_IO_WriteReg!(self.spi_dev, LCD_NGAMMA); 270 | LCD_IO_WriteData!(self.spi_dev, 0x00); 271 | LCD_IO_WriteData!(self.spi_dev, 0x16); 272 | LCD_IO_WriteData!(self.spi_dev, 0x1B); 273 | LCD_IO_WriteData!(self.spi_dev, 0x04); 274 | LCD_IO_WriteData!(self.spi_dev, 0x11); 275 | LCD_IO_WriteData!(self.spi_dev, 0x07); 276 | LCD_IO_WriteData!(self.spi_dev, 0x31); 277 | LCD_IO_WriteData!(self.spi_dev, 0x33); 278 | LCD_IO_WriteData!(self.spi_dev, 0x42); 279 | LCD_IO_WriteData!(self.spi_dev, 0x05); 280 | LCD_IO_WriteData!(self.spi_dev, 0x0C); 281 | LCD_IO_WriteData!(self.spi_dev, 0x0A); 282 | LCD_IO_WriteData!(self.spi_dev, 0x28); 283 | LCD_IO_WriteData!(self.spi_dev, 0x2F); 284 | LCD_IO_WriteData!(self.spi_dev, 0x0F); 285 | 286 | LCD_IO_WriteReg!(self.spi_dev, LCD_SLEEP_OUT); 287 | delay.delay_us(200_000); 288 | 289 | LCD_IO_WriteReg!(self.spi_dev, LCD_DISPLAY_ON); 290 | // GRAM start writing 291 | LCD_IO_WriteReg!(self.spi_dev, LCD_GRAM); 292 | 293 | // Layer Config 294 | 295 | // Layer 1 296 | // Horizontal start 297 | ltd_dev 298 | .layer1 299 | .whpcr 300 | .modify(|_, w| w.whsppos().bits(0x010d).whstpos().bits(0x1e)); 301 | 302 | // Vertical start 303 | ltd_dev 304 | .layer1 305 | .wvpcr 306 | .modify(|_, w| w.wvsppos().bits(0x0143).wvstpos().bits(0x04)); 307 | 308 | // Pixel format 309 | ltd_dev.layer1.pfcr.modify(|_, w| w.pf().bits(0x02)); 310 | 311 | // Default colours 312 | ltd_dev.layer1.dccr.modify(|_, w| { 313 | w.dcalpha() 314 | .bits(0x00) 315 | .dcred() 316 | .bits(0x00) 317 | .dcgreen() 318 | .bits(0x00) 319 | .dcblue() 320 | .bits(0x00) 321 | }); 322 | 323 | // Specifies the constant alpha value 324 | ltd_dev.layer1.cacr.modify(|_, w| w.consta().bits(0xff)); 325 | 326 | // Specifies the blending factors 327 | ltd_dev 328 | .layer1 329 | .bfcr 330 | .modify(|_, w| unsafe { w.bf1().bits(0x06).bf2().bits(0x07) }); 331 | 332 | // Configure the color frame buffer start address 333 | ltd_dev 334 | .layer1 335 | .cfbar 336 | .modify(|_, w| w.cfbadd().bits(fb_ptr_l1 as u32)); 337 | 338 | // Configure the color frame buffer pitch in byte 339 | ltd_dev 340 | .layer1 341 | .cfblr 342 | .modify(|_, w| w.cfbll().bits(0x01e3).cfbp().bits(0x01e0)); 343 | 344 | // Configure the frame buffer line number 345 | ltd_dev 346 | .layer1 347 | .cfblnr 348 | .modify(|_, w| w.cfblnbr().bits(0x0140)); 349 | /* 350 | // Layer 2 351 | // Horizontal start 352 | ltd_dev 353 | .layer2 354 | .whpcr 355 | .modify(|_, w| w.whsppos().bits(0x010d).whstpos().bits(0x1e)); 356 | 357 | // Vertical start 358 | ltd_dev 359 | .layer2 360 | .wvpcr 361 | .modify(|_, w| w.wvsppos().bits(0x0143).wvstpos().bits(0x04)); 362 | 363 | // Pixel format 364 | ltd_dev.layer2.pfcr.modify(|_, w| w.pf().bits(0x02)); 365 | 366 | // Default colours 367 | ltd_dev.layer2.dccr.modify(|_, w| { 368 | w.dcalpha() 369 | .bits(0x00) 370 | .dcred() 371 | .bits(0x00) 372 | .dcgreen() 373 | .bits(0x00) 374 | .dcblue() 375 | .bits(0x00) 376 | }); 377 | 378 | // Specifies the constant alpha value 379 | ltd_dev.layer2.cacr.modify(|_, w| w.consta().bits(0xff)); 380 | 381 | // Specifies the blending factors 382 | ltd_dev 383 | .layer2 384 | .bfcr 385 | .modify(|_, w| unsafe { w.bf1().bits(0x06).bf2().bits(0x07) }); 386 | 387 | // Configure the color frame buffer start address 388 | ltd_dev 389 | .layer2 390 | .cfbar 391 | .modify(|_, w| w.cfbadd().bits(fb_ptr_l2 as u32)); 392 | 393 | // Configure the color frame buffer pitch in byte 394 | ltd_dev 395 | .layer2 396 | .cfblr 397 | .modify(|_, w| w.cfbll().bits(0x01e3).cfbp().bits(0x01e0)); 398 | 399 | // Configure the frame buffer line number 400 | ltd_dev 401 | .layer2 402 | .cfblnr 403 | .modify(|_, w| w.cfblnbr().bits(0x0140)); 404 | */ 405 | 406 | // Enable Layers 1 , Disable Layer 2 407 | // Enable LTDC_Layer by setting LEN bit 408 | ltd_dev.layer1.cr.modify(|_, w| w.len().enabled()); 409 | ltd_dev.layer2.cr.modify(|_, w| w.len().disabled()); 410 | 411 | // Set the Immediate Reload 412 | ltd_dev.srcr.modify(|_, w| w.imr().set_bit()); 413 | 414 | // Enable dither 415 | ltd_dev.gcr.modify(|_, w| w.den().set_bit()); 416 | 417 | return true; 418 | } 419 | } 420 | 421 | #[interrupt] 422 | fn LCD_TFT() { 423 | cortex_m::interrupt::free(|_| { 424 | let ltd_dev = unsafe { &*stm32f4xx_hal::pac::LTDC::ptr() }; 425 | 426 | if ltd_dev.isr.read().terrif().bit_is_set() && ltd_dev.ier.read().terrie().bit_is_set() { 427 | ltd_dev.ier.modify(|_, w| w.terrie().clear_bit()); 428 | ltd_dev.icr.write(|w| w.cterrif().set_bit()); 429 | } 430 | 431 | if ltd_dev.isr.read().fuif().bit_is_set() && ltd_dev.ier.read().fuie().bit_is_set() { 432 | ltd_dev.ier.modify(|_, w| w.fuie().clear_bit()); 433 | ltd_dev.icr.write(|w| w.cfuif().set_bit()); 434 | } 435 | 436 | if ltd_dev.isr.read().lif().bit_is_set() && ltd_dev.ier.read().lie().bit_is_set() { 437 | ltd_dev.ier.modify(|_, w| w.lie().clear_bit()); 438 | ltd_dev.icr.write(|w| w.clif().set_bit()); 439 | } 440 | 441 | if ltd_dev.isr.read().rrif().bit_is_set() && ltd_dev.ier.read().rrie().bit_is_set() { 442 | ltd_dev.ier.modify(|_, w| w.rrie().clear_bit()); 443 | ltd_dev.icr.write(|w| w.crrif().set_bit()); 444 | } 445 | }); 446 | } 447 | 448 | #[interrupt] 449 | fn LCD_TFT_1() { 450 | cortex_m::interrupt::free(|_| { 451 | let ltd_dev = unsafe { &*stm32f4xx_hal::pac::LTDC::ptr() }; 452 | 453 | if ltd_dev.isr.read().terrif().bit_is_set() && ltd_dev.ier.read().terrie().bit_is_set() { 454 | ltd_dev.ier.modify(|_, w| w.terrie().clear_bit()); 455 | ltd_dev.icr.write(|w| w.cterrif().set_bit()); 456 | } 457 | 458 | if ltd_dev.isr.read().fuif().bit_is_set() && ltd_dev.ier.read().fuie().bit_is_set() { 459 | ltd_dev.ier.modify(|_, w| w.fuie().clear_bit()); 460 | ltd_dev.icr.write(|w| w.cfuif().set_bit()); 461 | } 462 | 463 | if ltd_dev.isr.read().lif().bit_is_set() && ltd_dev.ier.read().lie().bit_is_set() { 464 | ltd_dev.ier.modify(|_, w| w.lie().clear_bit()); 465 | ltd_dev.icr.write(|w| w.clif().set_bit()); 466 | } 467 | 468 | if ltd_dev.isr.read().rrif().bit_is_set() && ltd_dev.ier.read().rrie().bit_is_set() { 469 | ltd_dev.ier.modify(|_, w| w.rrie().clear_bit()); 470 | ltd_dev.icr.write(|w| w.crrif().set_bit()); 471 | }; 472 | }); 473 | } 474 | 475 | #[interrupt] 476 | fn DMA2D() { 477 | cortex_m::interrupt::free(|_| {}); 478 | } 479 | -------------------------------------------------------------------------------- /src/drivers/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod bsp; 2 | pub mod display; 3 | pub mod fmc; 4 | pub mod ltdc; 5 | pub mod touchscreen; 6 | -------------------------------------------------------------------------------- /src/drivers/touchscreen.rs: -------------------------------------------------------------------------------- 1 | // use defmt::*; 2 | use {defmt_rtt as _, panic_probe as _}; 3 | 4 | use hal::i2c::I2c; 5 | use hal::interrupt; 6 | use hal::pac::I2C3; 7 | use stm32f4xx_hal as hal; 8 | 9 | use embedded_hal::blocking::delay::DelayUs; 10 | 11 | const STMPE811_ADDR: u8 = 0x41; 12 | const STMPE811_ID: u8 = 0x00; 13 | 14 | const STMPE811_IO_FCT: u8 = 0x04; 15 | const STMPE811_TOUCH_IO_ALL: u8 = 0xf0; 16 | const STMPE811_ADC_FCT: u8 = 0x01; 17 | const STMPE811_TS_FCT: u8 = 0x02; 18 | 19 | const STMPE811_REG_SYS_CTRL1: u8 = 0x03; 20 | const STMPE811_REG_SYS_CTRL2: u8 = 0x04; 21 | const STMPE811_REG_IO_AF: u8 = 0x17; 22 | const STMPE811_REG_ADC_CTRL1: u8 = 0x20; 23 | const STMPE811_REG_ADC_CTRL2: u8 = 0x21; 24 | const STMPE811_REG_TSC_CFG: u8 = 0x41; 25 | const STMPE811_REG_FIFO_TH: u8 = 0x4A; 26 | const STMPE811_REG_FIFO_STA: u8 = 0x4B; 27 | const STMPE811_REG_TSC_FRACT_XYZ: u8 = 0x56; 28 | const STMPE811_REG_TSC_I_DRIVE: u8 = 0x58; 29 | const STMPE811_REG_TSC_CTRL: u8 = 0x40; 30 | const STMPE811_REG_INT_STA: u8 = 0x0B; 31 | const STMPE811_REG_TSC_DATA_NON_INC: u8 = 0xD7; 32 | 33 | pub struct TouchScreen { 34 | pub i2c_dev: I2c, 35 | } 36 | 37 | impl TouchScreen { 38 | pub fn init(&mut self, delay: &mut D) -> bool 39 | where 40 | D: DelayUs, 41 | { 42 | let mut rx_buffer = [0_u8; 2]; 43 | 44 | self.i2c_dev.write(STMPE811_ADDR, &[STMPE811_ID]).unwrap(); 45 | self.i2c_dev.read(STMPE811_ADDR, &mut rx_buffer).unwrap(); 46 | 47 | // Reset TS Device 48 | self.i2c_dev 49 | .write(STMPE811_ADDR, &[STMPE811_REG_SYS_CTRL1, 2]) 50 | .unwrap(); 51 | 52 | delay.delay_us(10_000_u32); 53 | 54 | self.i2c_dev 55 | .write(STMPE811_ADDR, &[STMPE811_REG_SYS_CTRL1, 2]) 56 | .unwrap(); 57 | 58 | delay.delay_us(2_000_u32); 59 | 60 | // Start TS Device 61 | 62 | // Set the Functionalities to be Enabled 63 | self.i2c_dev 64 | .write(STMPE811_ADDR, &[STMPE811_REG_SYS_CTRL2]) 65 | .unwrap(); 66 | self.i2c_dev.read(STMPE811_ADDR, &mut rx_buffer).unwrap(); 67 | 68 | let mut mode = rx_buffer[0] | !STMPE811_IO_FCT; 69 | 70 | self.i2c_dev 71 | .write(STMPE811_ADDR, &[STMPE811_REG_SYS_CTRL2, mode]) 72 | .unwrap(); 73 | 74 | // Select TSC pins in TSC alternate mode 75 | self.i2c_dev 76 | .write(STMPE811_ADDR, &[STMPE811_REG_IO_AF]) 77 | .unwrap(); 78 | self.i2c_dev.read(STMPE811_ADDR, &mut rx_buffer).unwrap(); 79 | 80 | let alt_mode = rx_buffer[0] | !STMPE811_TOUCH_IO_ALL; 81 | 82 | self.i2c_dev 83 | .write(STMPE811_ADDR, &[STMPE811_REG_IO_AF, alt_mode]) 84 | .unwrap(); 85 | 86 | // Set the Functionalities to be Enabled 87 | mode &= !(STMPE811_TS_FCT | STMPE811_ADC_FCT); 88 | 89 | self.i2c_dev 90 | .write(STMPE811_ADDR, &[STMPE811_REG_SYS_CTRL2, mode]) 91 | .unwrap(); 92 | 93 | // Select Sample Time, bit number and ADC Reference 94 | self.i2c_dev 95 | .write(STMPE811_ADDR, &[STMPE811_REG_ADC_CTRL1, 0x49]) 96 | .unwrap(); 97 | delay.delay_us(2_000_u32); 98 | 99 | // Select the ADC clock speed: 3.25 MHz 100 | self.i2c_dev 101 | .write(STMPE811_ADDR, &[STMPE811_REG_ADC_CTRL2, 0x01]) 102 | .unwrap(); 103 | 104 | /* Select 2 nF filter capacitor */ 105 | /* Configuration: 106 | - Touch average control : 4 samples 107 | - Touch delay time : 500 uS 108 | - Panel driver setting time: 500 uS 109 | */ 110 | self.i2c_dev 111 | .write(STMPE811_ADDR, &[STMPE811_REG_TSC_CFG, 0x9A]) 112 | .unwrap(); 113 | 114 | // Configure the Touch FIFO threshold: single point reading 115 | self.i2c_dev 116 | .write(STMPE811_ADDR, &[STMPE811_REG_FIFO_TH, 0x01]) 117 | .unwrap(); 118 | 119 | // Clear the FIFO memory content. 120 | self.i2c_dev 121 | .write(STMPE811_ADDR, &[STMPE811_REG_FIFO_STA, 0x01]) 122 | .unwrap(); 123 | 124 | // Put the FIFO back into operation mode 125 | self.i2c_dev 126 | .write(STMPE811_ADDR, &[STMPE811_REG_FIFO_STA, 0x00]) 127 | .unwrap(); 128 | 129 | /* Set the range and accuracy pf the pressure measurement (Z) : 130 | - Fractional part :7 131 | - Whole part :1 132 | */ 133 | self.i2c_dev 134 | .write(STMPE811_ADDR, &[STMPE811_REG_TSC_FRACT_XYZ, 0x01]) 135 | .unwrap(); 136 | 137 | /* Set the driving capability (limit) of the device for TSC pins: 50mA */ 138 | self.i2c_dev 139 | .write(STMPE811_ADDR, &[STMPE811_REG_TSC_I_DRIVE, 0x01]) 140 | .unwrap(); 141 | 142 | /* Touch screen control configuration (enable TSC): 143 | - No window tracking index 144 | - XYZ acquisition mode 145 | */ 146 | self.i2c_dev 147 | .write(STMPE811_ADDR, &[STMPE811_REG_TSC_CTRL, 0x01]) 148 | .unwrap(); 149 | 150 | /* Clear all the status pending bits if any */ 151 | self.i2c_dev 152 | .write(STMPE811_ADDR, &[STMPE811_REG_INT_STA, 0xff]) 153 | .unwrap(); 154 | 155 | /* Wait for 2 ms delay */ 156 | delay.delay_us(2_000_u32); 157 | 158 | return true; 159 | } 160 | 161 | pub fn get_xyz(&mut self) -> u64 { 162 | let mut rx_xyz = [0_u8; 4]; 163 | self.i2c_dev 164 | .write(STMPE811_ADDR, &[STMPE811_REG_TSC_DATA_NON_INC]) 165 | .unwrap(); 166 | self.i2c_dev.read(STMPE811_ADDR, &mut rx_xyz).unwrap(); 167 | 168 | self.i2c_dev 169 | .write(0x41, &[STMPE811_REG_FIFO_STA, 1]) 170 | .unwrap(); 171 | self.i2c_dev 172 | .write(0x41, &[STMPE811_REG_FIFO_STA, 0]) 173 | .unwrap(); 174 | 175 | let data_xyz: u64 = ((rx_xyz[0] as u64) << 24) 176 | | ((rx_xyz[1] as u64) << 16) 177 | | ((rx_xyz[2] as u64) << 8) 178 | | ((rx_xyz[3] as u64) << 0); 179 | 180 | data_xyz 181 | } 182 | } 183 | 184 | #[interrupt] 185 | fn I2C3_EV() { 186 | cortex_m::interrupt::free(|_| { 187 | let _i2c3_dev = unsafe { &*stm32f4xx_hal::pac::LTDC::ptr() }; 188 | }); 189 | } 190 | 191 | #[interrupt] 192 | fn I2C3_ER() { 193 | cortex_m::interrupt::free(|_| { 194 | let _i2c3_dev = unsafe { &*stm32f4xx_hal::pac::LTDC::ptr() }; 195 | }); 196 | } 197 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![no_std] 2 | #![no_main] 3 | 4 | extern crate alloc; 5 | 6 | // use defmt::*; 7 | use {defmt_rtt as _, panic_probe as _}; 8 | 9 | mod drivers; 10 | 11 | const PERIOD: lilos::time::Millis = lilos::time::Millis(500); 12 | const SYSCLK: u32 = 168_000_000; 13 | 14 | #[cortex_m_rt::entry] 15 | fn main() -> ! { 16 | let mut cp = cortex_m::Peripherals::take().unwrap(); 17 | 18 | let stm_backend_inner = drivers::bsp::StmBackendInner::default(); 19 | 20 | let led_task = core::pin::pin!(async { 21 | let mut gate = lilos::time::PeriodicGate::from(PERIOD); 22 | let gpio_dev = unsafe { &*stm32f4xx_hal::pac::GPIOG::ptr() }; 23 | 24 | loop { 25 | gpio_dev.bsrr.write(|w| w.bs13().set_bit()); 26 | gpio_dev.bsrr.write(|w| w.br14().set_bit()); 27 | gate.next_time().await; 28 | gpio_dev.bsrr.write(|w| w.br13().set_bit()); 29 | gpio_dev.bsrr.write(|w| w.bs14().set_bit()); 30 | gate.next_time().await; 31 | } 32 | }); 33 | 34 | let gui_task = core::pin::pin!(async { 35 | drivers::bsp::slint_async_run_event_loop(stm_backend_inner).await; 36 | loop {} 37 | }); 38 | 39 | lilos::time::initialize_sys_tick(&mut cp.SYST, SYSCLK); 40 | 41 | unsafe { 42 | lilos::exec::run_tasks_with_preemption( 43 | &mut [led_task, gui_task], 44 | lilos::exec::ALL_TASKS, 45 | lilos::exec::Interrupts::Filtered(7), 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /ui/card.slint: -------------------------------------------------------------------------------- 1 | // Copyright © SixtyFPS GmbH 2 | // SPDX-License-Identifier: MIT 3 | 4 | import { Theme } from "theme.slint"; 5 | import { TitleLabel } from "title_label.slint"; 6 | 7 | export component Card inherits Rectangle { 8 | in property title: "title"; 9 | in property is-selected: false; 10 | in property image-source <=> image.source; 11 | 12 | callback clicked <=> touch-area.clicked; 13 | 14 | private property spacing: Theme.spacing-medium; 15 | private property title-spacing: Theme.spacing-medium; 16 | private property title-area-height: Theme.size-small; 17 | 18 | border-radius: Theme.radius-regular; 19 | background: Theme.background-regular; 20 | width: Theme.size-medium; 21 | height: Theme.size-medium; 22 | clip: false; 23 | 24 | states [ 25 | pressed-selected when touch-area.pressed && root.is-selected : { 26 | background: Theme.background-selected-pressed; 27 | image.colorize: Theme.foreground-selected-pressed; 28 | width: Theme.size-big; 29 | height: Theme.size-big; 30 | title-label.visible: true; 31 | } 32 | hover-selected when touch-area.has-hover && root.is-selected : { 33 | background: Theme.background-selected-hover; 34 | image.colorize: Theme.foreground-selected-hover; 35 | width: Theme.size-big; 36 | height: Theme.size-big; 37 | title-label.visible: true; 38 | } 39 | pressed when touch-area.pressed : { 40 | background: Theme.background-pressed; 41 | image.colorize: Theme.foreground-pressed; 42 | } 43 | 44 | hover when touch-area.has-hover: { 45 | background: Theme.background-hover; 46 | image.colorize: Theme.foreground-hover; 47 | } 48 | selected when root.is-selected : { 49 | background: Theme.background-selected; 50 | image.colorize: Theme.foreground-selected; 51 | width: Theme.size-big; 52 | height: Theme.size-big; 53 | title-label.visible: true; 54 | } 55 | ] 56 | 57 | animate width { duration: Theme.duration-regular; easing: ease-in; } 58 | animate height { duration: Theme.duration-regular; easing: ease-in; } 59 | animate background { duration: Theme.duration-fast; } 60 | 61 | touch-area := TouchArea {} 62 | 63 | image := Image { 64 | x: (parent.width - self.width) / 2; 65 | y: (parent.height - self.height) / 2; 66 | width: 80%; 67 | height: 80%; 68 | colorize: Theme.foreground; 69 | 70 | animate colorize { duration: Theme.duration-fast; } 71 | } 72 | 73 | // Selection text 74 | title-label := TitleLabel { 75 | x: (parent.width - self.width) / 2; 76 | y: parent.height; 77 | text <=> root.title; 78 | visible: false; 79 | color: Theme.foreground; 80 | } 81 | } -------------------------------------------------------------------------------- /ui/carousel.slint: -------------------------------------------------------------------------------- 1 | // Copyright © SixtyFPS GmbH 2 | // SPDX-License-Identifier: MIT 3 | 4 | import { Theme } from "theme.slint"; 5 | 6 | export component Carousel inherits FocusScope { 7 | in-out property selected-index; 8 | in property spacing; 9 | in property itemWidth; 10 | in property count: 0; 11 | 12 | callback move-right(); 13 | callback move-left(); 14 | callback move-focus-up(); 15 | 16 | move-right => { 17 | root.selected-index = min(root.selected-index + 1, root.count - 1); 18 | } 19 | 20 | move-left => { 21 | root.selected-index = max(root.selected-index - 1, 0); 22 | } 23 | 24 | private property center-x: (root.width - Theme.size-big) / 2; 25 | private property duration: Theme.duration-regular; 26 | 27 | forward-focus: focus-scope; 28 | height: Theme.size-big; 29 | 30 | focus-scope:= FocusScope { 31 | key-pressed(event) => { 32 | if(event.text == Key.UpArrow) { 33 | root.move-focus-up(); 34 | return accept; 35 | } 36 | 37 | if(event.text == Key.RightArrow) { 38 | root.move-right(); 39 | return accept; 40 | } 41 | 42 | if(event.text == Key.LeftArrow) { 43 | root.move-left(); 44 | return accept; 45 | } 46 | 47 | return accept; 48 | } 49 | } 50 | 51 | TouchArea { 52 | clicked => { 53 | focus-scope.focus() 54 | } 55 | 56 | width: parent.width; 57 | height: parent.height; 58 | } 59 | 60 | Rectangle { 61 | clip: true; 62 | background: transparent; 63 | 64 | Flickable { 65 | interactive: false; 66 | viewport-x: root.center-x - root.selected-index * (root.itemWidth + root.spacing); 67 | 68 | animate viewport-x { duration: root.duration; easing: ease-in; } 69 | 70 | HorizontalLayout { 71 | spacing <=> root.spacing; 72 | 73 | @children 74 | } 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /ui/carousel_demo.slint: -------------------------------------------------------------------------------- 1 | // Copyright © SixtyFPS GmbH 2 | // SPDX-License-Identifier: MIT 3 | 4 | import { Carousel } from "carousel.slint"; 5 | import { Card } from "card.slint"; 6 | import { Theme } from "theme.slint"; 7 | 8 | export component MainWindow inherits Window { 9 | private property <[{ title: string, image: image}]> navigation-items: [ 10 | { title: "Settings", image: @image-url("svg/settings_black.svg") }, 11 | { title: "Home", image: @image-url("svg/home_black.svg") }, 12 | { title: "About", image: @image-url("svg/info_black.svg") }, 13 | ]; 14 | private property selected-index: 1; 15 | 16 | title: "Carousel example"; 17 | width: 320px; 18 | height: 240px; 19 | background: Theme.window-background; 20 | padding: Theme.spacing-regular; 21 | forward-focus: carousel; 22 | default-font-family: Theme.font-family; 23 | 24 | carousel := Carousel { 25 | y: (root.height - self.height) / 2; 26 | height: 100%; 27 | itemWidth: Theme.size-medium; 28 | count: root.navigation-items.length; 29 | selected-index <=> root.selected-index; 30 | spacing: Theme.spacing-medium; 31 | 32 | for item[index] in root.navigation-items : Card { 33 | clicked => { root.selected-index = index; } 34 | 35 | is-selected: index == root.selected-index; 36 | title: item.title; 37 | image-source: item.image; 38 | y: (parent.height - self.height) / 2; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ui/fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ierturk/rust-on-stm32/37b62d02a116a3b12e6d8c967f07437adb6bed94/ui/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /ui/fonts/Roboto-Bold.ttf.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: Google Inc. 2 | 3 | SPDX-License-Identifier: Apache-2.0 4 | -------------------------------------------------------------------------------- /ui/fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ierturk/rust-on-stm32/37b62d02a116a3b12e6d8c967f07437adb6bed94/ui/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /ui/fonts/Roboto-Regular.ttf.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: Google Inc. 2 | 3 | SPDX-License-Identifier: Apache-2.0 4 | -------------------------------------------------------------------------------- /ui/label.slint: -------------------------------------------------------------------------------- 1 | // Copyright © SixtyFPS GmbH 2 | // SPDX-License-Identifier: MIT 3 | 4 | import { Theme } from "theme.slint"; 5 | 6 | export component Label inherits Text { 7 | font-family: Theme.font-family; 8 | font-size: Theme.font-size-regular; 9 | font-weight: Theme.font-weight-regular; 10 | color: Theme.foreground; 11 | } -------------------------------------------------------------------------------- /ui/svg/home_black.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui/svg/home_black.svg.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: Google Inc. 2 | 3 | SPDX-License-Identifier: Apache-2.0 4 | -------------------------------------------------------------------------------- /ui/svg/info_black.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui/svg/info_black.svg.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: Google Inc. 2 | 3 | SPDX-License-Identifier: Apache-2.0 4 | -------------------------------------------------------------------------------- /ui/svg/settings_black.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui/svg/settings_black.svg.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: Google Inc. 2 | 3 | SPDX-License-Identifier: Apache-2.0 4 | -------------------------------------------------------------------------------- /ui/theme.slint: -------------------------------------------------------------------------------- 1 | // Copyright © SixtyFPS GmbH 2 | // SPDX-License-Identifier: MIT 3 | 4 | import "fonts/Roboto-Regular.ttf"; 5 | import "fonts/Roboto-Bold.ttf"; 6 | 7 | export global Theme { 8 | // brushes 9 | out property window-background: #2C2F36; 10 | out property background-regular: #0025FF; 11 | out property background-hover: root.background-regular.darker(0.2); 12 | out property background-pressed: root.background-regular.darker(0.4); 13 | out property background-selected: root.foreground; 14 | out property background-selected-hover: root.background-selected.darker(0.2); 15 | out property background-selected-pressed: root.background-selected.darker(0.4); 16 | out property foreground: #FFFFFF; 17 | out property foreground-hover: root.foreground.darker(0.2); 18 | out property foreground-pressed: root.foreground.darker(0.4); 19 | out property foreground-selected: root.background-regular; 20 | out property foreground-selected-hover: root.foreground-selected.darker(0.2); 21 | out property foreground-selected-pressed: root.foreground-selected.darker(0.4); 22 | 23 | // durations 24 | out property duration-fast: 100ms; 25 | out property duration-regular: 250ms; 26 | 27 | // radius 28 | out property radius-regular: 16px; 29 | 30 | // sizes 31 | out property size-small: 24px; 32 | out property size-regular: 32px; 33 | out property size-medium: 128px; 34 | out property size-big: 170px; 35 | 36 | // spacings 37 | out property spacing-regular: 4px; 38 | out property spacing-medium: 8px; 39 | 40 | // typo 41 | out property font-family: "Roboto"; 42 | out property font-size-regular: 12px; 43 | out property font-size-medium: 28px; 44 | out property font-weight-regular: 400; 45 | out property font-weight-bold: 900; 46 | } -------------------------------------------------------------------------------- /ui/title_label.slint: -------------------------------------------------------------------------------- 1 | // Copyright © SixtyFPS GmbH 2 | // SPDX-License-Identifier: MIT 3 | 4 | import { Theme } from "theme.slint"; 5 | import { Label } from "label.slint"; 6 | 7 | export component TitleLabel inherits Text { 8 | font-family: Theme.font-family; 9 | font-size: Theme.font-size-medium; 10 | font-weight: Theme.font-weight-bold; 11 | } --------------------------------------------------------------------------------