diff --git a/advanced/stack-overflow-detection/Cargo.lock b/advanced/stack-overflow-detection/Cargo.lock index 71a85de..342ecfa 100644 --- a/advanced/stack-overflow-detection/Cargo.lock +++ b/advanced/stack-overflow-detection/Cargo.lock @@ -17,12 +17,6 @@ version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "bare-metal" version = "1.0.0" @@ -31,24 +25,24 @@ checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" [[package]] name = "basic-toml" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" dependencies = [ "serde", ] [[package]] name = "bitfield" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac" +checksum = "c821a6e124197eb56d907ccc2188eab1038fb919c914f47976e64dd8dbc855d1" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "cfg-if" @@ -96,7 +90,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -107,7 +101,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -119,6 +113,15 @@ dependencies = [ "litrs", ] +[[package]] +name = "embedded-can" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d2e857f87ac832df68fa498d18ddc679175cf3d2e4aa893988e5601baf9438" +dependencies = [ + "nb", +] + [[package]] name = "embedded-dma" version = "0.2.0" @@ -130,19 +133,19 @@ dependencies = [ [[package]] name = "embedded-hal" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff" -dependencies = [ - "nb 0.1.3", - "void", -] +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" [[package]] -name = "embedded-hal" +name = "embedded-hal-nb" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal", + "nb", +] [[package]] name = "enum-as-inner" @@ -174,7 +177,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -185,18 +188,29 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "esp-backtrace" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5c6f9166728f6cd08e5781899f4c94fd7ccf2efd04e5b2295f7cb2c92c83e8" +checksum = "dda6c53c50ed96cce44e8565bd7659f8884d55bac3262184c3a77f748553e3ff" dependencies = [ "esp-println", ] +[[package]] +name = "esp-build" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94a4b8d74e7cc7baabcca5b2277b41877e039ad9cd49959d48ef94dac7eab4b" +dependencies = [ + "quote", + "syn 2.0.60", + "termcolor", +] + [[package]] name = "esp-hal" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e021610c11f106869f382f532fb81de0df98fd2b41299deba81bb62e9c4c4f8" +checksum = "a6e19440eb58fd1dd0c4f6722c953f7026571210c70ce69956d022faeb8fe4b4" dependencies = [ "basic-toml", "bitfield", @@ -204,21 +218,18 @@ dependencies = [ "cfg-if", "critical-section", "document-features", + "embedded-can", "embedded-dma", - "embedded-hal 0.2.7", + "embedded-hal", + "embedded-hal-nb", "enumset", + "esp-build", "esp-hal-procmacros", + "esp-metadata", "esp-riscv-rt", - "esp32", - "esp32c2", "esp32c3", - "esp32c6", - "esp32h2", - "esp32p4", - "esp32s2", - "esp32s3", "fugit", - "nb 1.1.0", + "nb", "paste", "portable-atomic", "rand_core", @@ -231,9 +242,9 @@ dependencies = [ [[package]] name = "esp-hal-procmacros" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05084ecf8446fe60e0aff6c3873c96dca56dc383a449324ca555edbb80ae60c0" +checksum = "f2a9e9df075eb0c1e0a4349a4317c86b01be2acabe6f69d935c9c71d8a99e56a" dependencies = [ "darling", "document-features", @@ -242,110 +253,49 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] -name = "esp-println" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e090867a191aaaa0645f8a7f03c51ab57cee82e2adba5525940dc9ff1c07511" -dependencies = [ - "critical-section", -] - -[[package]] -name = "esp-riscv-rt" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599762d31156fa2322db4d5a0784c13b6122b79c1fa7bed70953de2f7d731f1" -dependencies = [ - "document-features", - "riscv", - "riscv-rt-macros", -] - -[[package]] -name = "esp32" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343ac30c4537d3f8526490db4264091a9785a55bcdfc22fc34482751a501d8d2" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - -[[package]] -name = "esp32c2" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e30c9147b7a1f388887dfd2fe7da4d6159a0248603674af5f3a5282a46cd11" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32c3" -version = "0.21.0" +name = "esp-metadata" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7ee710c1e4f16b5e840cdfec3f4e7642b7517a877c5c4b7e1cafa9a14117c5" +checksum = "1a97109e81e9fb68cbf838ffda09cebbc9b25fe12f8b8a5e1b32391561e7c153" dependencies = [ - "critical-section", - "vcell", + "basic-toml", + "lazy_static", + "serde", + "strum 0.26.2", ] [[package]] -name = "esp32c6" -version = "0.12.0" +name = "esp-println" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0275425ea3a7675b7b5903163a93b65e8ce5b9c8a7749ed397279ed2ade3e3" +checksum = "e98f0f58453dd2ce08d99228fc8757fad39d05dfd26643665d1093b8844f42cc" dependencies = [ "critical-section", - "vcell", ] [[package]] -name = "esp32h2" +name = "esp-riscv-rt" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e606c8e60d3e68afda997fa9fcc8d8fe1d2e3c172505bb03eb9ab79b4bca4d6a" +checksum = "404129c79e9dc34f8b468ec44e71ce36a0bd443cb88be0feffa4b9f3856c97a6" dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32p4" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03c0bc7973e6805e3c3c3c979e9418ba30380d8c16989a477440dbce8cf1965" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32s2" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbcb8e9a4097fbf1c455fc776ad46a4bb7861d5bad3c3cd4549b666ad906ce4" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", + "document-features", + "riscv", + "riscv-rt-macros", ] [[package]] -name = "esp32s3" -version = "0.24.0" +name = "esp32c3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044e216560a33aa5d6c98163c8ae4278845ec3bae7b9cab520da0697be4f23a6" +checksum = "4c22d8c27e7d675ef79db212b9e41df80aef6db1a5c819e4e726735f64ee0700" dependencies = [ "critical-section", "vcell", - "xtensa-lx", ] [[package]] @@ -397,6 +347,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + [[package]] name = "litrs" version = "0.4.1" @@ -406,16 +362,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "memchr" version = "2.7.1" @@ -431,21 +377,6 @@ dependencies = [ "serde", ] -[[package]] -name = "mutex-trait" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4bb1638d419e12f8b1c43d9e639abd0d1424285bdea2f76aa231e233c63cd3a" - -[[package]] -name = "nb" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" -dependencies = [ - "nb 1.1.0", -] - [[package]] name = "nb" version = "1.1.0" @@ -499,18 +430,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -563,7 +494,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f5c1b8bf41ea746266cdee443d1d1e9125c86ce1447e1a2615abd34330d33a9" dependencies = [ "critical-section", - "embedded-hal 1.0.0", + "embedded-hal", ] [[package]] @@ -583,12 +514,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "serde" version = "1.0.197" @@ -606,16 +531,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", + "syn 2.0.60", ] [[package]] @@ -678,7 +594,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -694,15 +610,24 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "toml_datetime" version = "0.6.5" @@ -745,23 +670,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "winnow" -version = "0.5.40" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "memchr", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "xtensa-lx" -version = "0.9.0" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e758f94e1a1f71758f94052a2766dcb12604998eb372b8b2e30576e3ab1ba1e6" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "bare-metal", - "mutex-trait", - "spin", + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", ] [[package]] @@ -786,5 +731,5 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] diff --git a/advanced/stack-overflow-detection/Cargo.toml b/advanced/stack-overflow-detection/Cargo.toml index 721adb1..34b42f1 100644 --- a/advanced/stack-overflow-detection/Cargo.toml +++ b/advanced/stack-overflow-detection/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -esp-hal = { version = "0.16.1", features = ["esp32c3"] } -esp-backtrace = { version = "0.11.0", features = ["esp32c3", "panic-handler", "exception-handler", "println"] } -esp-println = { version = "0.9.0", features = ["esp32c3", "uart"] } +esp-hal = { version = "0.17.0", features = ["esp32c3"] } +esp-backtrace = { version = "0.11.1", features = ["esp32c3", "panic-handler", "exception-handler", "println"] } +esp-println = { version = "0.9.1", features = ["esp32c3", "uart"] } critical-section = "1.1.2" diff --git a/advanced/stack-overflow-detection/examples/stack-overflow-detection.rs b/advanced/stack-overflow-detection/examples/stack-overflow-detection.rs index 3ab2ab5..595b106 100644 --- a/advanced/stack-overflow-detection/examples/stack-overflow-detection.rs +++ b/advanced/stack-overflow-detection/examples/stack-overflow-detection.rs @@ -5,14 +5,10 @@ use core::cell::RefCell; use critical_section::Mutex; use esp_backtrace as _; -use esp_println::println; use esp_hal::{ - assist_debug::DebugAssist, - clock::ClockControl, - interrupt, - peripherals::{self, Peripherals}, - prelude::*, + assist_debug::DebugAssist, clock::ClockControl, peripherals::Peripherals, prelude::*, }; +use esp_println::println; #[entry] fn main() -> ! { @@ -21,7 +17,7 @@ fn main() -> ! { let _ = ClockControl::boot_defaults(system.clock_control).freeze(); // get the debug assist driver - let da = DebugAssist::new(peripherals.ASSIST_DEBUG); + let da = DebugAssist::new(peripherals.ASSIST_DEBUG, Some(interrupt_handler)); // set up stack overflow protection install_stack_guard(da, 4096); @@ -71,18 +67,13 @@ fn install_stack_guard(mut da: DebugAssist<'static>, safe_area_size: u32) { da.enable_region0_monitor(stack_low, stack_low + safe_area_size, true, true); critical_section::with(|cs| DA.borrow_ref_mut(cs).replace(da)); - interrupt::enable( - peripherals::Interrupt::ASSIST_DEBUG, - interrupt::Priority::Priority1, - ) - .unwrap(); } // ANCHOR_END: debug_assists // ANCHOR: interrupt // ANCHOR: handler -#[interrupt] -fn ASSIST_DEBUG() { +#[handler(priority = esp_hal::interrupt::Priority::min())] +fn interrupt_handler() { // ANCHOR_END: interrupt critical_section::with(|cs| { diff --git a/advanced/stack-overflow-detection/src/main.rs b/advanced/stack-overflow-detection/src/main.rs index 09e04df..89fb885 100644 --- a/advanced/stack-overflow-detection/src/main.rs +++ b/advanced/stack-overflow-detection/src/main.rs @@ -5,14 +5,10 @@ use core::cell::RefCell; use critical_section::Mutex; use esp_backtrace as _; -use esp_println::println; use esp_hal::{ - assist_debug::DebugAssist, - clock::ClockControl, - interrupt, - peripherals::{self, Peripherals}, - prelude::*, + assist_debug::DebugAssist, clock::ClockControl, peripherals::Peripherals, prelude::*, }; +use esp_println::println; #[entry] fn main() -> ! { @@ -21,7 +17,7 @@ fn main() -> ! { let _ = ClockControl::boot_defaults(system.clock_control).freeze(); // get the debug assist driver - let da = DebugAssist::new(peripherals.ASSIST_DEBUG); + let da = DebugAssist::new(peripherals.ASSIST_DEBUG, Some(interrupt_handler)); boom(); @@ -50,3 +46,6 @@ fn deadly_recursion(data: [u8; 2048]) { deadly_recursion([0u8; 2048]); } + +#[handler(priority = esp_hal::interrupt::Priority::min())] +fn interrupt_handler() {} diff --git a/book/src/03_4_interrupt.md b/book/src/03_4_interrupt.md index d66531b..a839714 100644 --- a/book/src/03_4_interrupt.md +++ b/book/src/03_4_interrupt.md @@ -31,9 +31,9 @@ We need the `Mutex` to make access to the button safe. > Please note that this is not the Mutex you might know from `libstd` but it's the Mutex from [`critical-section`] (and that's why we need to add it as a dependency). -✅ We need to call [`listen`][listen] on the button pin to configure the peripheral to raise interrupts. We can raise interrupts for [different events][events] - here we want to raise the interrupt on the falling edge. +✅ We need to set the interrupt handler for the GPIO interrupts. -✅ Let's add a [`critical-section`], using the `with()` method and enable an interrupt: +✅ Let's add a [`critical-section`], using the `with()` method and enable an interrupt for falling edges: ```rust,ignore {{#include ../../intro/button-interrupt/examples/button-interrupt.rs:critical_section}} @@ -43,26 +43,11 @@ In this line we move our button into the `static BUTTON` for the interrupt handl The code running inside the `critical_section::with` closure runs within a critical section, `cs` is a token that you can use to "prove" that to some API. -✅ Enable the interrupt: - -```rust,ignore -{{#include ../../intro/button-interrupt/examples/button-interrupt.rs:interrupt}} -``` - -First parameter here is the kind of interrupt we want. There are several [possible interrupts]. -The second parameter, chooses the priority, in our case, we choosed `Priority3`. Priority dictates which interrupts are runned first in case of several interrupts being triggered at the same time. - -✅ Enable interrupts: This can be achived by: `riscv::interrupt::enable`, but this is an unsafe -function, hence it needs to be run inside an `unsafe` block. - -The interrupt handler is defined via the `#[interrupt]` macro. +The interrupt handler is defined via the `#[handler]` macro. Here, the name of the function must match the interrupt. -[listen]: https://docs.esp-rs.org/esp-hal/esp-hal/0.16.1/esp32c3/esp_hal/gpio/trait.Pin.html#method.listen [Interrupts]: https://docs.rust-embedded.org/book/start/interrupts.html [`critical-section`]: https://crates.io/crates/critical-section -[possible interrupts]: https://docs.esp-rs.org/esp-hal/esp-hal/0.16.1/esp32c3/esp32c3/enum.Interrupt.html -[events]: https://docs.esp-rs.org/esp-hal/esp-hal/0.16.1/esp32c3/esp_hal/gpio/enum.Event.html ## Simulation diff --git a/book/src/03_5_dma_spi.md b/book/src/03_5_dma_spi.md index ec1401e..e27566c 100644 --- a/book/src/03_5_dma_spi.md +++ b/book/src/03_5_dma_spi.md @@ -69,7 +69,7 @@ Now we are free to let the CPU do other things while the SPI transfer is in prog ✅ Wait for the transfer to complete and get back the buffers and the driver instance -As mentioned before the buffers and the driver are moved into the `Transfer`. If we want to access the received data and transfer more data we need to get them back. +As mentioned before the buffers and the driver are moved into the `Transfer`. ```rust,ignore {{#include ../../intro/dma/examples/dma.rs:transfer-wait}} @@ -88,4 +88,4 @@ While using DMA needs more effort than letting the CPU do all the work it's not > However, if the amount of data to transfer is bigger, then the time needed to setup the transfer is negligible compared to the time the CPU could use to do useful things in parallel. [SPI]: https://en.wikipedia.org/wiki/Serial_Peripheral_Interface -[linked list]: https://www.espressif.com/sites/default/files/documentation/esp32-c3_technical_reference_manual_en.pdf#page=59 \ No newline at end of file +[linked list]: https://www.espressif.com/sites/default/files/documentation/esp32-c3_technical_reference_manual_en.pdf#page=59 diff --git a/intro/blinky/Cargo.lock b/intro/blinky/Cargo.lock index bcf800c..e64d19c 100644 --- a/intro/blinky/Cargo.lock +++ b/intro/blinky/Cargo.lock @@ -17,12 +17,6 @@ version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "bare-metal" version = "1.0.0" @@ -31,24 +25,24 @@ checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" [[package]] name = "basic-toml" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" dependencies = [ "serde", ] [[package]] name = "bitfield" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac" +checksum = "c821a6e124197eb56d907ccc2188eab1038fb919c914f47976e64dd8dbc855d1" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "blinky" @@ -105,7 +99,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -116,7 +110,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -128,6 +122,15 @@ dependencies = [ "litrs", ] +[[package]] +name = "embedded-can" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d2e857f87ac832df68fa498d18ddc679175cf3d2e4aa893988e5601baf9438" +dependencies = [ + "nb", +] + [[package]] name = "embedded-dma" version = "0.2.0" @@ -139,19 +142,19 @@ dependencies = [ [[package]] name = "embedded-hal" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff" -dependencies = [ - "nb 0.1.3", - "void", -] +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" [[package]] -name = "embedded-hal" +name = "embedded-hal-nb" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal", + "nb", +] [[package]] name = "enum-as-inner" @@ -183,7 +186,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -194,18 +197,29 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "esp-backtrace" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5c6f9166728f6cd08e5781899f4c94fd7ccf2efd04e5b2295f7cb2c92c83e8" +checksum = "dda6c53c50ed96cce44e8565bd7659f8884d55bac3262184c3a77f748553e3ff" dependencies = [ "esp-println", ] +[[package]] +name = "esp-build" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94a4b8d74e7cc7baabcca5b2277b41877e039ad9cd49959d48ef94dac7eab4b" +dependencies = [ + "quote", + "syn 2.0.60", + "termcolor", +] + [[package]] name = "esp-hal" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e021610c11f106869f382f532fb81de0df98fd2b41299deba81bb62e9c4c4f8" +checksum = "a6e19440eb58fd1dd0c4f6722c953f7026571210c70ce69956d022faeb8fe4b4" dependencies = [ "basic-toml", "bitfield", @@ -213,21 +227,18 @@ dependencies = [ "cfg-if", "critical-section", "document-features", + "embedded-can", "embedded-dma", - "embedded-hal 0.2.7", + "embedded-hal", + "embedded-hal-nb", "enumset", + "esp-build", "esp-hal-procmacros", + "esp-metadata", "esp-riscv-rt", - "esp32", - "esp32c2", "esp32c3", - "esp32c6", - "esp32h2", - "esp32p4", - "esp32s2", - "esp32s3", "fugit", - "nb 1.1.0", + "nb", "paste", "portable-atomic", "rand_core", @@ -240,9 +251,9 @@ dependencies = [ [[package]] name = "esp-hal-procmacros" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05084ecf8446fe60e0aff6c3873c96dca56dc383a449324ca555edbb80ae60c0" +checksum = "f2a9e9df075eb0c1e0a4349a4317c86b01be2acabe6f69d935c9c71d8a99e56a" dependencies = [ "darling", "document-features", @@ -251,110 +262,49 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] -name = "esp-println" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e090867a191aaaa0645f8a7f03c51ab57cee82e2adba5525940dc9ff1c07511" -dependencies = [ - "critical-section", -] - -[[package]] -name = "esp-riscv-rt" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599762d31156fa2322db4d5a0784c13b6122b79c1fa7bed70953de2f7d731f1" -dependencies = [ - "document-features", - "riscv", - "riscv-rt-macros", -] - -[[package]] -name = "esp32" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343ac30c4537d3f8526490db4264091a9785a55bcdfc22fc34482751a501d8d2" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - -[[package]] -name = "esp32c2" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e30c9147b7a1f388887dfd2fe7da4d6159a0248603674af5f3a5282a46cd11" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32c3" -version = "0.21.0" +name = "esp-metadata" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7ee710c1e4f16b5e840cdfec3f4e7642b7517a877c5c4b7e1cafa9a14117c5" +checksum = "1a97109e81e9fb68cbf838ffda09cebbc9b25fe12f8b8a5e1b32391561e7c153" dependencies = [ - "critical-section", - "vcell", + "basic-toml", + "lazy_static", + "serde", + "strum 0.26.2", ] [[package]] -name = "esp32c6" -version = "0.12.0" +name = "esp-println" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0275425ea3a7675b7b5903163a93b65e8ce5b9c8a7749ed397279ed2ade3e3" +checksum = "e98f0f58453dd2ce08d99228fc8757fad39d05dfd26643665d1093b8844f42cc" dependencies = [ "critical-section", - "vcell", ] [[package]] -name = "esp32h2" +name = "esp-riscv-rt" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e606c8e60d3e68afda997fa9fcc8d8fe1d2e3c172505bb03eb9ab79b4bca4d6a" +checksum = "404129c79e9dc34f8b468ec44e71ce36a0bd443cb88be0feffa4b9f3856c97a6" dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32p4" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03c0bc7973e6805e3c3c3c979e9418ba30380d8c16989a477440dbce8cf1965" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32s2" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbcb8e9a4097fbf1c455fc776ad46a4bb7861d5bad3c3cd4549b666ad906ce4" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", + "document-features", + "riscv", + "riscv-rt-macros", ] [[package]] -name = "esp32s3" -version = "0.24.0" +name = "esp32c3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044e216560a33aa5d6c98163c8ae4278845ec3bae7b9cab520da0697be4f23a6" +checksum = "4c22d8c27e7d675ef79db212b9e41df80aef6db1a5c819e4e726735f64ee0700" dependencies = [ "critical-section", "vcell", - "xtensa-lx", ] [[package]] @@ -406,6 +356,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + [[package]] name = "litrs" version = "0.4.1" @@ -415,16 +371,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "memchr" version = "2.7.1" @@ -440,21 +386,6 @@ dependencies = [ "serde", ] -[[package]] -name = "mutex-trait" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4bb1638d419e12f8b1c43d9e639abd0d1424285bdea2f76aa231e233c63cd3a" - -[[package]] -name = "nb" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" -dependencies = [ - "nb 1.1.0", -] - [[package]] name = "nb" version = "1.1.0" @@ -508,18 +439,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -572,7 +503,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f5c1b8bf41ea746266cdee443d1d1e9125c86ce1447e1a2615abd34330d33a9" dependencies = [ "critical-section", - "embedded-hal 1.0.0", + "embedded-hal", ] [[package]] @@ -592,12 +523,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "serde" version = "1.0.197" @@ -615,16 +540,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", + "syn 2.0.60", ] [[package]] @@ -677,7 +593,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -693,15 +609,24 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "toml_datetime" version = "0.6.5" @@ -744,23 +669,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "winnow" -version = "0.5.40" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "memchr", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "xtensa-lx" -version = "0.9.0" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e758f94e1a1f71758f94052a2766dcb12604998eb372b8b2e30576e3ab1ba1e6" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "bare-metal", - "mutex-trait", - "spin", + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", ] [[package]] @@ -785,5 +730,5 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] diff --git a/intro/blinky/Cargo.toml b/intro/blinky/Cargo.toml index 3110614..62405f7 100644 --- a/intro/blinky/Cargo.toml +++ b/intro/blinky/Cargo.toml @@ -6,11 +6,11 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -esp-hal = { version = "0.16.1", features = ["esp32c3"] } -esp-backtrace = { version = "0.11.0", features = [ +esp-hal = { version = "0.17.0", features = ["esp32c3"] } +esp-backtrace = { version = "0.11.1", features = [ "esp32c3", "panic-handler", "exception-handler", "println", ] } -esp-println = { version = "0.9.0", features = ["esp32c3", "uart"] } +esp-println = { version = "0.9.1", features = ["esp32c3", "uart"] } diff --git a/intro/blinky/examples/blinky.rs b/intro/blinky/examples/blinky.rs index b7a961f..85061a4 100644 --- a/intro/blinky/examples/blinky.rs +++ b/intro/blinky/examples/blinky.rs @@ -2,8 +2,8 @@ #![no_main] use esp_backtrace as _; +use esp_hal::{clock::ClockControl, delay::Delay, gpio::IO, peripherals::Peripherals, prelude::*}; use esp_println::println; -use esp_hal::{clock::ClockControl, peripherals::Peripherals, prelude::*, Delay, IO}; #[entry] fn main() -> ! { @@ -17,14 +17,14 @@ fn main() -> ! { let io = IO::new(peripherals.GPIO, peripherals.IO_MUX); let mut led = io.pins.gpio7.into_push_pull_output(); - led.set_high().unwrap(); + led.set_high(); // Initialize the Delay peripheral, and use it to toggle the LED state in a // loop. - let mut delay = Delay::new(&clocks); + let delay = Delay::new(&clocks); loop { - led.toggle().unwrap(); - delay.delay_ms(500u32); + led.toggle(); + delay.delay_millis(500u32); } } diff --git a/intro/blinky/src/main.rs b/intro/blinky/src/main.rs index 54cc98f..bd5ac6b 100644 --- a/intro/blinky/src/main.rs +++ b/intro/blinky/src/main.rs @@ -2,8 +2,8 @@ #![no_main] use esp_backtrace as _; +use esp_hal::{clock::ClockControl, delay::Delay, gpio::IO, peripherals::Peripherals, prelude::*}; use esp_println::println; -use esp_hal::{clock::ClockControl, peripherals::Peripherals, prelude::*, Delay, IO}; #[entry] fn main() -> ! { diff --git a/intro/button-interrupt/Cargo.lock b/intro/button-interrupt/Cargo.lock index 0cbf11e..68c62c0 100644 --- a/intro/button-interrupt/Cargo.lock +++ b/intro/button-interrupt/Cargo.lock @@ -17,12 +17,6 @@ version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "bare-metal" version = "1.0.0" @@ -31,24 +25,24 @@ checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" [[package]] name = "basic-toml" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" dependencies = [ "serde", ] [[package]] name = "bitfield" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac" +checksum = "c821a6e124197eb56d907ccc2188eab1038fb919c914f47976e64dd8dbc855d1" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "button-interrupt" @@ -106,7 +100,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -117,7 +111,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -129,6 +123,15 @@ dependencies = [ "litrs", ] +[[package]] +name = "embedded-can" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d2e857f87ac832df68fa498d18ddc679175cf3d2e4aa893988e5601baf9438" +dependencies = [ + "nb", +] + [[package]] name = "embedded-dma" version = "0.2.0" @@ -140,19 +143,19 @@ dependencies = [ [[package]] name = "embedded-hal" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff" -dependencies = [ - "nb 0.1.3", - "void", -] +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" [[package]] -name = "embedded-hal" +name = "embedded-hal-nb" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal", + "nb", +] [[package]] name = "enum-as-inner" @@ -184,7 +187,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -195,18 +198,29 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "esp-backtrace" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5c6f9166728f6cd08e5781899f4c94fd7ccf2efd04e5b2295f7cb2c92c83e8" +checksum = "dda6c53c50ed96cce44e8565bd7659f8884d55bac3262184c3a77f748553e3ff" dependencies = [ "esp-println", ] +[[package]] +name = "esp-build" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94a4b8d74e7cc7baabcca5b2277b41877e039ad9cd49959d48ef94dac7eab4b" +dependencies = [ + "quote", + "syn 2.0.60", + "termcolor", +] + [[package]] name = "esp-hal" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e021610c11f106869f382f532fb81de0df98fd2b41299deba81bb62e9c4c4f8" +checksum = "a6e19440eb58fd1dd0c4f6722c953f7026571210c70ce69956d022faeb8fe4b4" dependencies = [ "basic-toml", "bitfield", @@ -214,21 +228,18 @@ dependencies = [ "cfg-if", "critical-section", "document-features", + "embedded-can", "embedded-dma", - "embedded-hal 0.2.7", + "embedded-hal", + "embedded-hal-nb", "enumset", + "esp-build", "esp-hal-procmacros", + "esp-metadata", "esp-riscv-rt", - "esp32", - "esp32c2", "esp32c3", - "esp32c6", - "esp32h2", - "esp32p4", - "esp32s2", - "esp32s3", "fugit", - "nb 1.1.0", + "nb", "paste", "portable-atomic", "rand_core", @@ -241,9 +252,9 @@ dependencies = [ [[package]] name = "esp-hal-procmacros" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05084ecf8446fe60e0aff6c3873c96dca56dc383a449324ca555edbb80ae60c0" +checksum = "f2a9e9df075eb0c1e0a4349a4317c86b01be2acabe6f69d935c9c71d8a99e56a" dependencies = [ "darling", "document-features", @@ -252,110 +263,49 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] -name = "esp-println" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e090867a191aaaa0645f8a7f03c51ab57cee82e2adba5525940dc9ff1c07511" -dependencies = [ - "critical-section", -] - -[[package]] -name = "esp-riscv-rt" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599762d31156fa2322db4d5a0784c13b6122b79c1fa7bed70953de2f7d731f1" -dependencies = [ - "document-features", - "riscv", - "riscv-rt-macros", -] - -[[package]] -name = "esp32" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343ac30c4537d3f8526490db4264091a9785a55bcdfc22fc34482751a501d8d2" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - -[[package]] -name = "esp32c2" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e30c9147b7a1f388887dfd2fe7da4d6159a0248603674af5f3a5282a46cd11" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32c3" -version = "0.21.0" +name = "esp-metadata" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7ee710c1e4f16b5e840cdfec3f4e7642b7517a877c5c4b7e1cafa9a14117c5" +checksum = "1a97109e81e9fb68cbf838ffda09cebbc9b25fe12f8b8a5e1b32391561e7c153" dependencies = [ - "critical-section", - "vcell", + "basic-toml", + "lazy_static", + "serde", + "strum 0.26.2", ] [[package]] -name = "esp32c6" -version = "0.12.0" +name = "esp-println" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0275425ea3a7675b7b5903163a93b65e8ce5b9c8a7749ed397279ed2ade3e3" +checksum = "e98f0f58453dd2ce08d99228fc8757fad39d05dfd26643665d1093b8844f42cc" dependencies = [ "critical-section", - "vcell", ] [[package]] -name = "esp32h2" +name = "esp-riscv-rt" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e606c8e60d3e68afda997fa9fcc8d8fe1d2e3c172505bb03eb9ab79b4bca4d6a" +checksum = "404129c79e9dc34f8b468ec44e71ce36a0bd443cb88be0feffa4b9f3856c97a6" dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32p4" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03c0bc7973e6805e3c3c3c979e9418ba30380d8c16989a477440dbce8cf1965" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32s2" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbcb8e9a4097fbf1c455fc776ad46a4bb7861d5bad3c3cd4549b666ad906ce4" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", + "document-features", + "riscv", + "riscv-rt-macros", ] [[package]] -name = "esp32s3" -version = "0.24.0" +name = "esp32c3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044e216560a33aa5d6c98163c8ae4278845ec3bae7b9cab520da0697be4f23a6" +checksum = "4c22d8c27e7d675ef79db212b9e41df80aef6db1a5c819e4e726735f64ee0700" dependencies = [ "critical-section", "vcell", - "xtensa-lx", ] [[package]] @@ -407,6 +357,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + [[package]] name = "litrs" version = "0.4.1" @@ -416,16 +372,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "memchr" version = "2.7.1" @@ -441,21 +387,6 @@ dependencies = [ "serde", ] -[[package]] -name = "mutex-trait" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4bb1638d419e12f8b1c43d9e639abd0d1424285bdea2f76aa231e233c63cd3a" - -[[package]] -name = "nb" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" -dependencies = [ - "nb 1.1.0", -] - [[package]] name = "nb" version = "1.1.0" @@ -509,18 +440,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -573,7 +504,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f5c1b8bf41ea746266cdee443d1d1e9125c86ce1447e1a2615abd34330d33a9" dependencies = [ "critical-section", - "embedded-hal 1.0.0", + "embedded-hal", ] [[package]] @@ -593,12 +524,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "serde" version = "1.0.197" @@ -616,16 +541,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", + "syn 2.0.60", ] [[package]] @@ -678,7 +594,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -694,15 +610,24 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "toml_datetime" version = "0.6.5" @@ -745,23 +670,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "winnow" -version = "0.5.40" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "memchr", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "xtensa-lx" -version = "0.9.0" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e758f94e1a1f71758f94052a2766dcb12604998eb372b8b2e30576e3ab1ba1e6" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "bare-metal", - "mutex-trait", - "spin", + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", ] [[package]] @@ -786,5 +731,5 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] diff --git a/intro/button-interrupt/Cargo.toml b/intro/button-interrupt/Cargo.toml index 3bcaf9e..5080d4f 100644 --- a/intro/button-interrupt/Cargo.toml +++ b/intro/button-interrupt/Cargo.toml @@ -6,12 +6,12 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -esp-hal = { version = "0.16.1", features = ["esp32c3"] } -esp-backtrace = { version = "0.11.0", features = [ +esp-hal = { version = "0.17.0", features = ["esp32c3"] } +esp-backtrace = { version = "0.11.1", features = [ "esp32c3", "panic-handler", "exception-handler", "println", ] } -esp-println = { version = "0.9.0", features = ["esp32c3", "uart"] } +esp-println = { version = "0.9.1", features = ["esp32c3", "uart"] } critical-section = "1.1.2" diff --git a/intro/button-interrupt/examples/button-interrupt.rs b/intro/button-interrupt/examples/button-interrupt.rs index 08f7e0f..5e177cc 100644 --- a/intro/button-interrupt/examples/button-interrupt.rs +++ b/intro/button-interrupt/examples/button-interrupt.rs @@ -4,15 +4,15 @@ use core::cell::RefCell; use critical_section::Mutex; use esp_backtrace as _; -use esp_println::println; use esp_hal::{ clock::ClockControl, + delay::Delay, gpio::{Event, Gpio9, Input, PullUp, IO}, interrupt, - peripherals::{self, Peripherals}, + peripherals::Peripherals, prelude::*, - riscv, Delay, }; +use esp_println::println; static BUTTON: Mutex>>>> = Mutex::new(RefCell::new(None)); @@ -24,34 +24,31 @@ fn main() -> ! { println!("Hello world!"); - let io = IO::new(peripherals.GPIO, peripherals.IO_MUX); + let mut io = IO::new(peripherals.GPIO, peripherals.IO_MUX); + // Set the interrupt handler for GPIO interrupts. + io.set_interrupt_handler(handler); // Set GPIO7 as an output, and set its state high initially. let mut led = io.pins.gpio7.into_push_pull_output(); // Set GPIO9 as an input let mut button = io.pins.gpio9.into_pull_up_input(); - button.listen(Event::FallingEdge); // ANCHOR: critical_section - critical_section::with(|cs| BUTTON.borrow_ref_mut(cs).replace(button)); + critical_section::with(|cs| { + button.listen(Event::FallingEdge); + BUTTON.borrow_ref_mut(cs).replace(button) + }); // ANCHOR_END: critical_section - // ANCHOR: interrupt - interrupt::enable(peripherals::Interrupt::GPIO, interrupt::Priority::Priority3).unwrap(); - // ANCHOR_END: interrupt - - unsafe { - riscv::interrupt::enable(); - } - let mut delay = Delay::new(&clocks); + let delay = Delay::new(&clocks); loop { - led.toggle().unwrap(); - delay.delay_ms(500u32); + led.toggle(); + delay.delay_millis(500u32); } } -#[interrupt] -fn GPIO() { +#[handler] +fn handler() { critical_section::with(|cs| { println!("GPIO interrupt"); BUTTON diff --git a/intro/button-interrupt/src/main.rs b/intro/button-interrupt/src/main.rs index 24f2f7b..105d748 100644 --- a/intro/button-interrupt/src/main.rs +++ b/intro/button-interrupt/src/main.rs @@ -4,15 +4,15 @@ use core::cell::RefCell; use critical_section::Mutex; use esp_backtrace as _; -use esp_println::println; use esp_hal::{ clock::ClockControl, + delay::Delay, gpio::{Event, Gpio9, Input, PullUp, IO}, interrupt, - peripherals::{self, Peripherals}, + peripherals::Peripherals, prelude::*, - riscv, Delay, }; +use esp_println::println; static BUTTON: Mutex>>>> = Mutex::new(RefCell::new(None)); @@ -25,18 +25,20 @@ fn main() -> ! { println!("Hello world!"); let io = IO::new(peripherals.GPIO, peripherals.IO_MUX); + // Set the interrupt handler for GPIO interrupts. + // Set GPIO7 as an output, and set its state high initially. let mut led = io.pins.gpio7.into_push_pull_output(); // Set GPIO9 as an input let mut button = io.pins.gpio9.into_pull_up_input(); - let mut delay = Delay::new(&clocks); + let delay = Delay::new(&clocks); loop {} } -#[interrupt] -fn GPIO() { +#[handler] +fn handler() { critical_section::with(|cs| { println!("GPIO interrupt"); BUTTON diff --git a/intro/button/Cargo.lock b/intro/button/Cargo.lock index 49bddb9..2a85270 100644 --- a/intro/button/Cargo.lock +++ b/intro/button/Cargo.lock @@ -17,12 +17,6 @@ version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "bare-metal" version = "1.0.0" @@ -31,24 +25,24 @@ checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" [[package]] name = "basic-toml" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" dependencies = [ "serde", ] [[package]] name = "bitfield" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac" +checksum = "c821a6e124197eb56d907ccc2188eab1038fb919c914f47976e64dd8dbc855d1" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "button" @@ -105,7 +99,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -116,7 +110,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -128,6 +122,15 @@ dependencies = [ "litrs", ] +[[package]] +name = "embedded-can" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d2e857f87ac832df68fa498d18ddc679175cf3d2e4aa893988e5601baf9438" +dependencies = [ + "nb", +] + [[package]] name = "embedded-dma" version = "0.2.0" @@ -139,19 +142,19 @@ dependencies = [ [[package]] name = "embedded-hal" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff" -dependencies = [ - "nb 0.1.3", - "void", -] +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" [[package]] -name = "embedded-hal" +name = "embedded-hal-nb" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal", + "nb", +] [[package]] name = "enum-as-inner" @@ -183,7 +186,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -194,18 +197,29 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "esp-backtrace" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5c6f9166728f6cd08e5781899f4c94fd7ccf2efd04e5b2295f7cb2c92c83e8" +checksum = "dda6c53c50ed96cce44e8565bd7659f8884d55bac3262184c3a77f748553e3ff" dependencies = [ "esp-println", ] +[[package]] +name = "esp-build" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94a4b8d74e7cc7baabcca5b2277b41877e039ad9cd49959d48ef94dac7eab4b" +dependencies = [ + "quote", + "syn 2.0.60", + "termcolor", +] + [[package]] name = "esp-hal" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e021610c11f106869f382f532fb81de0df98fd2b41299deba81bb62e9c4c4f8" +checksum = "a6e19440eb58fd1dd0c4f6722c953f7026571210c70ce69956d022faeb8fe4b4" dependencies = [ "basic-toml", "bitfield", @@ -213,21 +227,18 @@ dependencies = [ "cfg-if", "critical-section", "document-features", + "embedded-can", "embedded-dma", - "embedded-hal 0.2.7", + "embedded-hal", + "embedded-hal-nb", "enumset", + "esp-build", "esp-hal-procmacros", + "esp-metadata", "esp-riscv-rt", - "esp32", - "esp32c2", "esp32c3", - "esp32c6", - "esp32h2", - "esp32p4", - "esp32s2", - "esp32s3", "fugit", - "nb 1.1.0", + "nb", "paste", "portable-atomic", "rand_core", @@ -240,9 +251,9 @@ dependencies = [ [[package]] name = "esp-hal-procmacros" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05084ecf8446fe60e0aff6c3873c96dca56dc383a449324ca555edbb80ae60c0" +checksum = "f2a9e9df075eb0c1e0a4349a4317c86b01be2acabe6f69d935c9c71d8a99e56a" dependencies = [ "darling", "document-features", @@ -251,110 +262,49 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] -name = "esp-println" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e090867a191aaaa0645f8a7f03c51ab57cee82e2adba5525940dc9ff1c07511" -dependencies = [ - "critical-section", -] - -[[package]] -name = "esp-riscv-rt" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599762d31156fa2322db4d5a0784c13b6122b79c1fa7bed70953de2f7d731f1" -dependencies = [ - "document-features", - "riscv", - "riscv-rt-macros", -] - -[[package]] -name = "esp32" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343ac30c4537d3f8526490db4264091a9785a55bcdfc22fc34482751a501d8d2" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - -[[package]] -name = "esp32c2" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e30c9147b7a1f388887dfd2fe7da4d6159a0248603674af5f3a5282a46cd11" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32c3" -version = "0.21.0" +name = "esp-metadata" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7ee710c1e4f16b5e840cdfec3f4e7642b7517a877c5c4b7e1cafa9a14117c5" +checksum = "1a97109e81e9fb68cbf838ffda09cebbc9b25fe12f8b8a5e1b32391561e7c153" dependencies = [ - "critical-section", - "vcell", + "basic-toml", + "lazy_static", + "serde", + "strum 0.26.2", ] [[package]] -name = "esp32c6" -version = "0.12.0" +name = "esp-println" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0275425ea3a7675b7b5903163a93b65e8ce5b9c8a7749ed397279ed2ade3e3" +checksum = "e98f0f58453dd2ce08d99228fc8757fad39d05dfd26643665d1093b8844f42cc" dependencies = [ "critical-section", - "vcell", ] [[package]] -name = "esp32h2" +name = "esp-riscv-rt" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e606c8e60d3e68afda997fa9fcc8d8fe1d2e3c172505bb03eb9ab79b4bca4d6a" +checksum = "404129c79e9dc34f8b468ec44e71ce36a0bd443cb88be0feffa4b9f3856c97a6" dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32p4" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03c0bc7973e6805e3c3c3c979e9418ba30380d8c16989a477440dbce8cf1965" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32s2" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbcb8e9a4097fbf1c455fc776ad46a4bb7861d5bad3c3cd4549b666ad906ce4" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", + "document-features", + "riscv", + "riscv-rt-macros", ] [[package]] -name = "esp32s3" -version = "0.24.0" +name = "esp32c3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044e216560a33aa5d6c98163c8ae4278845ec3bae7b9cab520da0697be4f23a6" +checksum = "4c22d8c27e7d675ef79db212b9e41df80aef6db1a5c819e4e726735f64ee0700" dependencies = [ "critical-section", "vcell", - "xtensa-lx", ] [[package]] @@ -406,6 +356,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + [[package]] name = "litrs" version = "0.4.1" @@ -415,16 +371,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "memchr" version = "2.7.1" @@ -440,21 +386,6 @@ dependencies = [ "serde", ] -[[package]] -name = "mutex-trait" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4bb1638d419e12f8b1c43d9e639abd0d1424285bdea2f76aa231e233c63cd3a" - -[[package]] -name = "nb" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" -dependencies = [ - "nb 1.1.0", -] - [[package]] name = "nb" version = "1.1.0" @@ -508,18 +439,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -572,7 +503,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f5c1b8bf41ea746266cdee443d1d1e9125c86ce1447e1a2615abd34330d33a9" dependencies = [ "critical-section", - "embedded-hal 1.0.0", + "embedded-hal", ] [[package]] @@ -592,12 +523,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "serde" version = "1.0.197" @@ -615,16 +540,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", + "syn 2.0.60", ] [[package]] @@ -677,7 +593,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -693,15 +609,24 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "toml_datetime" version = "0.6.5" @@ -744,23 +669,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "winnow" -version = "0.5.40" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "memchr", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "xtensa-lx" -version = "0.9.0" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e758f94e1a1f71758f94052a2766dcb12604998eb372b8b2e30576e3ab1ba1e6" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "bare-metal", - "mutex-trait", - "spin", + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", ] [[package]] @@ -785,5 +730,5 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] diff --git a/intro/button/Cargo.toml b/intro/button/Cargo.toml index aca1de7..728f4af 100644 --- a/intro/button/Cargo.toml +++ b/intro/button/Cargo.toml @@ -6,11 +6,11 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -esp-hal = { version = "0.16.1", features = ["esp32c3"] } -esp-backtrace = { version = "0.11.0", features = [ +esp-hal = { version = "0.17.0", features = ["esp32c3"] } +esp-backtrace = { version = "0.11.1", features = [ "esp32c3", "panic-handler", "exception-handler", "println", ] } -esp-println = { version = "0.9.0", features = ["esp32c3", "uart"] } +esp-println = { version = "0.9.1", features = ["esp32c3", "uart"] } diff --git a/intro/button/examples/button.rs b/intro/button/examples/button.rs index 87f0c77..f643a0e 100644 --- a/intro/button/examples/button.rs +++ b/intro/button/examples/button.rs @@ -2,8 +2,8 @@ #![no_main] use esp_backtrace as _; +use esp_hal::{gpio::IO, peripherals::Peripherals, prelude::*}; use esp_println::println; -use esp_hal::{clock::ClockControl, peripherals::Peripherals, prelude::*, IO}; #[entry] fn main() -> ! { @@ -19,10 +19,10 @@ fn main() -> ! { // Check the button state and set the LED state accordingly. loop { - if button.is_high().unwrap() { - led.set_high().unwrap(); + if button.is_high() { + led.set_high(); } else { - led.set_low().unwrap(); + led.set_low(); } } } diff --git a/intro/button/src/main.rs b/intro/button/src/main.rs index b72d0ad..fd7eac7 100644 --- a/intro/button/src/main.rs +++ b/intro/button/src/main.rs @@ -2,8 +2,8 @@ #![no_main] use esp_backtrace as _; +use esp_hal::{gpio::IO, peripherals::Peripherals, prelude::*}; use esp_println::println; -use esp_hal::{clock::ClockControl, peripherals::Peripherals, prelude::*, IO}; #[entry] fn main() -> ! { diff --git a/intro/defmt/Cargo.lock b/intro/defmt/Cargo.lock index 89be05f..814d077 100644 --- a/intro/defmt/Cargo.lock +++ b/intro/defmt/Cargo.lock @@ -17,12 +17,6 @@ version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "bare-metal" version = "1.0.0" @@ -31,18 +25,18 @@ checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" [[package]] name = "basic-toml" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" dependencies = [ "serde", ] [[package]] name = "bitfield" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac" +checksum = "c821a6e124197eb56d907ccc2188eab1038fb919c914f47976e64dd8dbc855d1" [[package]] name = "bitflags" @@ -52,9 +46,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "cfg-if" @@ -102,7 +96,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -113,14 +107,14 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] name = "defmt" version = "0.1.0" dependencies = [ - "defmt 0.3.5", + "defmt 0.3.6", "esp-backtrace", "esp-hal", "esp-println", @@ -128,9 +122,9 @@ dependencies = [ [[package]] name = "defmt" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2d011b2fee29fb7d659b83c43fce9a2cb4df453e16d441a51448e448f3f98" +checksum = "3939552907426de152b3c2c6f51ed53f98f448babd26f28694c95f5906194595" dependencies = [ "bitflags 1.3.2", "defmt-macros", @@ -146,7 +140,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -167,6 +161,15 @@ dependencies = [ "litrs", ] +[[package]] +name = "embedded-can" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d2e857f87ac832df68fa498d18ddc679175cf3d2e4aa893988e5601baf9438" +dependencies = [ + "nb", +] + [[package]] name = "embedded-dma" version = "0.2.0" @@ -178,19 +181,19 @@ dependencies = [ [[package]] name = "embedded-hal" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff" -dependencies = [ - "nb 0.1.3", - "void", -] +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" [[package]] -name = "embedded-hal" +name = "embedded-hal-nb" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal", + "nb", +] [[package]] name = "enum-as-inner" @@ -222,7 +225,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -233,41 +236,49 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "esp-backtrace" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5c6f9166728f6cd08e5781899f4c94fd7ccf2efd04e5b2295f7cb2c92c83e8" +checksum = "dda6c53c50ed96cce44e8565bd7659f8884d55bac3262184c3a77f748553e3ff" dependencies = [ - "defmt 0.3.5", + "defmt 0.3.6", "esp-println", ] +[[package]] +name = "esp-build" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94a4b8d74e7cc7baabcca5b2277b41877e039ad9cd49959d48ef94dac7eab4b" +dependencies = [ + "quote", + "syn 2.0.60", + "termcolor", +] + [[package]] name = "esp-hal" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e021610c11f106869f382f532fb81de0df98fd2b41299deba81bb62e9c4c4f8" +checksum = "a6e19440eb58fd1dd0c4f6722c953f7026571210c70ce69956d022faeb8fe4b4" dependencies = [ "basic-toml", "bitfield", - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "critical-section", "document-features", + "embedded-can", "embedded-dma", - "embedded-hal 0.2.7", + "embedded-hal", + "embedded-hal-nb", "enumset", + "esp-build", "esp-hal-procmacros", + "esp-metadata", "esp-riscv-rt", - "esp32", - "esp32c2", "esp32c3", - "esp32c6", - "esp32h2", - "esp32p4", - "esp32s2", - "esp32s3", "fugit", - "nb 1.1.0", + "nb", "paste", "portable-atomic", "rand_core", @@ -280,9 +291,9 @@ dependencies = [ [[package]] name = "esp-hal-procmacros" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05084ecf8446fe60e0aff6c3873c96dca56dc383a449324ca555edbb80ae60c0" +checksum = "f2a9e9df075eb0c1e0a4349a4317c86b01be2acabe6f69d935c9c71d8a99e56a" dependencies = [ "darling", "document-features", @@ -291,114 +302,53 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", +] + +[[package]] +name = "esp-metadata" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a97109e81e9fb68cbf838ffda09cebbc9b25fe12f8b8a5e1b32391561e7c153" +dependencies = [ + "basic-toml", + "lazy_static", + "serde", + "strum 0.26.2", ] [[package]] name = "esp-println" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e090867a191aaaa0645f8a7f03c51ab57cee82e2adba5525940dc9ff1c07511" +checksum = "e98f0f58453dd2ce08d99228fc8757fad39d05dfd26643665d1093b8844f42cc" dependencies = [ "critical-section", - "defmt 0.3.5", + "defmt 0.3.6", "log", ] [[package]] name = "esp-riscv-rt" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599762d31156fa2322db4d5a0784c13b6122b79c1fa7bed70953de2f7d731f1" +checksum = "404129c79e9dc34f8b468ec44e71ce36a0bd443cb88be0feffa4b9f3856c97a6" dependencies = [ "document-features", "riscv", "riscv-rt-macros", ] -[[package]] -name = "esp32" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343ac30c4537d3f8526490db4264091a9785a55bcdfc22fc34482751a501d8d2" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - -[[package]] -name = "esp32c2" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e30c9147b7a1f388887dfd2fe7da4d6159a0248603674af5f3a5282a46cd11" -dependencies = [ - "critical-section", - "vcell", -] - [[package]] name = "esp32c3" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7ee710c1e4f16b5e840cdfec3f4e7642b7517a877c5c4b7e1cafa9a14117c5" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32c6" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0275425ea3a7675b7b5903163a93b65e8ce5b9c8a7749ed397279ed2ade3e3" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32h2" -version = "0.8.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e606c8e60d3e68afda997fa9fcc8d8fe1d2e3c172505bb03eb9ab79b4bca4d6a" +checksum = "4c22d8c27e7d675ef79db212b9e41df80aef6db1a5c819e4e726735f64ee0700" dependencies = [ "critical-section", "vcell", ] -[[package]] -name = "esp32p4" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03c0bc7973e6805e3c3c3c979e9418ba30380d8c16989a477440dbce8cf1965" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32s2" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbcb8e9a4097fbf1c455fc776ad46a4bb7861d5bad3c3cd4549b666ad906ce4" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - -[[package]] -name = "esp32s3" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044e216560a33aa5d6c98163c8ae4278845ec3bae7b9cab520da0697be4f23a6" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - [[package]] name = "fnv" version = "1.0.7" @@ -448,6 +398,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + [[package]] name = "litrs" version = "0.4.1" @@ -457,16 +413,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "log" version = "0.4.21" @@ -488,21 +434,6 @@ dependencies = [ "serde", ] -[[package]] -name = "mutex-trait" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4bb1638d419e12f8b1c43d9e639abd0d1424285bdea2f76aa231e233c63cd3a" - -[[package]] -name = "nb" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" -dependencies = [ - "nb 1.1.0", -] - [[package]] name = "nb" version = "1.1.0" @@ -556,18 +487,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -620,7 +551,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f5c1b8bf41ea746266cdee443d1d1e9125c86ce1447e1a2615abd34330d33a9" dependencies = [ "critical-section", - "embedded-hal 1.0.0", + "embedded-hal", ] [[package]] @@ -640,12 +571,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "serde" version = "1.0.197" @@ -663,16 +588,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", + "syn 2.0.60", ] [[package]] @@ -725,7 +641,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -741,15 +657,24 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "thiserror" version = "1.0.57" @@ -767,7 +692,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -812,23 +737,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "winnow" -version = "0.5.40" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "memchr", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "xtensa-lx" -version = "0.9.0" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e758f94e1a1f71758f94052a2766dcb12604998eb372b8b2e30576e3ab1ba1e6" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "bare-metal", - "mutex-trait", - "spin", + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", ] [[package]] @@ -853,5 +798,5 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] diff --git a/intro/defmt/Cargo.toml b/intro/defmt/Cargo.toml index d495e21..defe501 100644 --- a/intro/defmt/Cargo.toml +++ b/intro/defmt/Cargo.toml @@ -6,18 +6,18 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -esp-hal = { version = "0.16.1", features = ["esp32c3"] } -esp-backtrace = { version = "0.11.0", features = [ +esp-hal = { version = "0.17.0", features = ["esp32c3"] } +esp-backtrace = { version = "0.11.1", features = [ "esp32c3", "panic-handler", "exception-handler", "println", "defmt", ] } -esp-println = { version = "0.9.0", features = [ +esp-println = { version = "0.9.1", features = [ "esp32c3", "uart", "log", "defmt-espflash", ] } -defmt = "0.3.5" +defmt = "0.3.6" diff --git a/intro/defmt/examples/defmt.rs b/intro/defmt/examples/defmt.rs index 5c9f08b..02c5914 100644 --- a/intro/defmt/examples/defmt.rs +++ b/intro/defmt/examples/defmt.rs @@ -5,14 +5,14 @@ use esp_backtrace as _; use esp_println as _; // ANCHOR_END: println_include -use esp_hal::{clock::ClockControl, peripherals::Peripherals, prelude::*, Delay}; +use esp_hal::{clock::ClockControl, delay::Delay, peripherals::Peripherals, prelude::*}; #[entry] fn main() -> ! { let peripherals = Peripherals::take(); let system = peripherals.SYSTEM.split(); let clocks = ClockControl::max(system.clock_control).freeze(); - let mut delay = Delay::new(&clocks); + let delay = Delay::new(&clocks); defmt::trace!("trace"); defmt::debug!("debug"); @@ -24,6 +24,6 @@ fn main() -> ! { loop { defmt::println!("Loop..."); - delay.delay_ms(500u32); + delay.delay_millis(500u32); } } diff --git a/intro/defmt/src/main.rs b/intro/defmt/src/main.rs index 6256ab2..60146dd 100644 --- a/intro/defmt/src/main.rs +++ b/intro/defmt/src/main.rs @@ -3,14 +3,14 @@ // Build the `esp_println` and `esp_backtrace` libs -use esp_hal::{clock::ClockControl, peripherals::Peripherals, prelude::*, Delay}; +use esp_hal::{clock::ClockControl, delay::Delay, peripherals::Peripherals, prelude::*}; #[entry] fn main() -> ! { let peripherals = Peripherals::take(); let system = peripherals.SYSTEM.split(); let clocks = ClockControl::max(system.clock_control).freeze(); - let mut delay = Delay::new(&clocks); + let delay = Delay::new(&clocks); // Print a log or a message using defmt @@ -18,6 +18,6 @@ fn main() -> ! { loop { defmt::println!("Loop..."); - delay.delay_ms(500u32); + delay.delay_millis(500u32); } } diff --git a/intro/dma/Cargo.lock b/intro/dma/Cargo.lock index 018b618..4c4c2dc 100644 --- a/intro/dma/Cargo.lock +++ b/intro/dma/Cargo.lock @@ -17,12 +17,6 @@ version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "bare-metal" version = "1.0.0" @@ -31,24 +25,24 @@ checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" [[package]] name = "basic-toml" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" dependencies = [ "serde", ] [[package]] name = "bitfield" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac" +checksum = "c821a6e124197eb56d907ccc2188eab1038fb919c914f47976e64dd8dbc855d1" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "cfg-if" @@ -96,7 +90,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -107,7 +101,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -128,6 +122,15 @@ dependencies = [ "litrs", ] +[[package]] +name = "embedded-can" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d2e857f87ac832df68fa498d18ddc679175cf3d2e4aa893988e5601baf9438" +dependencies = [ + "nb", +] + [[package]] name = "embedded-dma" version = "0.2.0" @@ -139,19 +142,19 @@ dependencies = [ [[package]] name = "embedded-hal" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff" -dependencies = [ - "nb 0.1.3", - "void", -] +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" [[package]] -name = "embedded-hal" +name = "embedded-hal-nb" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal", + "nb", +] [[package]] name = "enum-as-inner" @@ -183,7 +186,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -194,18 +197,29 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "esp-backtrace" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5c6f9166728f6cd08e5781899f4c94fd7ccf2efd04e5b2295f7cb2c92c83e8" +checksum = "dda6c53c50ed96cce44e8565bd7659f8884d55bac3262184c3a77f748553e3ff" dependencies = [ "esp-println", ] +[[package]] +name = "esp-build" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94a4b8d74e7cc7baabcca5b2277b41877e039ad9cd49959d48ef94dac7eab4b" +dependencies = [ + "quote", + "syn 2.0.60", + "termcolor", +] + [[package]] name = "esp-hal" -version = "0.16.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc3e9b3333d2ae42f5c9b4890e162cb756fb1b067ab5f642b89fc9f29be424fa" +checksum = "a6e19440eb58fd1dd0c4f6722c953f7026571210c70ce69956d022faeb8fe4b4" dependencies = [ "basic-toml", "bitfield", @@ -213,21 +227,18 @@ dependencies = [ "cfg-if", "critical-section", "document-features", + "embedded-can", "embedded-dma", - "embedded-hal 0.2.7", + "embedded-hal", + "embedded-hal-nb", "enumset", + "esp-build", "esp-hal-procmacros", + "esp-metadata", "esp-riscv-rt", - "esp32", - "esp32c2", "esp32c3", - "esp32c6", - "esp32h2", - "esp32p4", - "esp32s2", - "esp32s3", "fugit", - "nb 1.1.0", + "nb", "paste", "portable-atomic", "rand_core", @@ -240,9 +251,9 @@ dependencies = [ [[package]] name = "esp-hal-procmacros" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05084ecf8446fe60e0aff6c3873c96dca56dc383a449324ca555edbb80ae60c0" +checksum = "f2a9e9df075eb0c1e0a4349a4317c86b01be2acabe6f69d935c9c71d8a99e56a" dependencies = [ "darling", "document-features", @@ -251,110 +262,49 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "esp-println" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e090867a191aaaa0645f8a7f03c51ab57cee82e2adba5525940dc9ff1c07511" -dependencies = [ - "critical-section", -] - -[[package]] -name = "esp-riscv-rt" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599762d31156fa2322db4d5a0784c13b6122b79c1fa7bed70953de2f7d731f1" -dependencies = [ - "document-features", - "riscv", - "riscv-rt-macros", -] - -[[package]] -name = "esp32" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343ac30c4537d3f8526490db4264091a9785a55bcdfc22fc34482751a501d8d2" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - -[[package]] -name = "esp32c2" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e30c9147b7a1f388887dfd2fe7da4d6159a0248603674af5f3a5282a46cd11" -dependencies = [ - "critical-section", - "vcell", + "syn 2.0.60", ] [[package]] -name = "esp32c3" -version = "0.21.0" +name = "esp-metadata" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7ee710c1e4f16b5e840cdfec3f4e7642b7517a877c5c4b7e1cafa9a14117c5" +checksum = "1a97109e81e9fb68cbf838ffda09cebbc9b25fe12f8b8a5e1b32391561e7c153" dependencies = [ - "critical-section", - "vcell", + "basic-toml", + "lazy_static", + "serde", + "strum 0.26.2", ] [[package]] -name = "esp32c6" -version = "0.12.0" +name = "esp-println" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0275425ea3a7675b7b5903163a93b65e8ce5b9c8a7749ed397279ed2ade3e3" +checksum = "e98f0f58453dd2ce08d99228fc8757fad39d05dfd26643665d1093b8844f42cc" dependencies = [ "critical-section", - "vcell", ] [[package]] -name = "esp32h2" +name = "esp-riscv-rt" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e606c8e60d3e68afda997fa9fcc8d8fe1d2e3c172505bb03eb9ab79b4bca4d6a" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32p4" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03c0bc7973e6805e3c3c3c979e9418ba30380d8c16989a477440dbce8cf1965" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32s2" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbcb8e9a4097fbf1c455fc776ad46a4bb7861d5bad3c3cd4549b666ad906ce4" +checksum = "404129c79e9dc34f8b468ec44e71ce36a0bd443cb88be0feffa4b9f3856c97a6" dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", + "document-features", + "riscv", + "riscv-rt-macros", ] [[package]] -name = "esp32s3" -version = "0.24.0" +name = "esp32c3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044e216560a33aa5d6c98163c8ae4278845ec3bae7b9cab520da0697be4f23a6" +checksum = "4c22d8c27e7d675ef79db212b9e41df80aef6db1a5c819e4e726735f64ee0700" dependencies = [ "critical-section", "vcell", - "xtensa-lx", ] [[package]] @@ -406,6 +356,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + [[package]] name = "litrs" version = "0.4.1" @@ -415,16 +371,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "memchr" version = "2.7.1" @@ -440,21 +386,6 @@ dependencies = [ "serde", ] -[[package]] -name = "mutex-trait" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4bb1638d419e12f8b1c43d9e639abd0d1424285bdea2f76aa231e233c63cd3a" - -[[package]] -name = "nb" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" -dependencies = [ - "nb 1.1.0", -] - [[package]] name = "nb" version = "1.1.0" @@ -508,18 +439,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -572,7 +503,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f5c1b8bf41ea746266cdee443d1d1e9125c86ce1447e1a2615abd34330d33a9" dependencies = [ "critical-section", - "embedded-hal 1.0.0", + "embedded-hal", ] [[package]] @@ -592,12 +523,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "serde" version = "1.0.197" @@ -615,16 +540,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", + "syn 2.0.60", ] [[package]] @@ -677,7 +593,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -693,15 +609,24 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "toml_datetime" version = "0.6.5" @@ -744,23 +669,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "winnow" -version = "0.5.40" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "memchr", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "xtensa-lx" -version = "0.9.0" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e758f94e1a1f71758f94052a2766dcb12604998eb372b8b2e30576e3ab1ba1e6" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "bare-metal", - "mutex-trait", - "spin", + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", ] [[package]] @@ -785,5 +730,5 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] diff --git a/intro/dma/Cargo.toml b/intro/dma/Cargo.toml index d41f1b8..a373fb7 100644 --- a/intro/dma/Cargo.toml +++ b/intro/dma/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -esp-hal = { version = "0.16.1", features = ["esp32c3"] } -esp-backtrace = { version = "0.11.0", features = [ +esp-hal = { version = "0.17.0", features = ["esp32c3"] } +esp-backtrace = { version = "0.11.1", features = [ "esp32c3", "panic-handler", "exception-handler", "println", ] } -esp-println = { version = "0.9.0", features = ["esp32c3", "uart"] } +esp-println = { version = "0.9.1", features = ["esp32c3", "uart"] } diff --git a/intro/dma/examples/dma.rs b/intro/dma/examples/dma.rs index 93598e0..9839647 100644 --- a/intro/dma/examples/dma.rs +++ b/intro/dma/examples/dma.rs @@ -39,8 +39,7 @@ fn main() -> ! { let dma_channel = dma.channel0; // DMA transfers need descriptors and buffers - let (mut tx_buffer, mut tx_descriptors, mut rx_buffer, mut rx_descriptors) = - dma_buffers!(32000); + let (mut tx_buffer, mut tx_descriptors, mut rx_buffer, mut rx_descriptors) = dma_buffers!(3200); // ANCHOR_END: init-dma // ANCHOR: configure-spi @@ -55,7 +54,7 @@ fn main() -> ! { )); // ANCHOR_END: configure-spi - let mut delay = Delay::new(&clocks); + let delay = Delay::new(&clocks); // populate the tx_buffer with data to send tx_buffer.fill(0x42); @@ -64,7 +63,7 @@ fn main() -> ! { // ANCHOR: transfer // `dma_transfer` will move the driver and the buffers into the // returned transfer. - let transfer = spi.dma_transfer(tx_buffer, rx_buffer).unwrap(); + let transfer = spi.dma_transfer(&mut tx_buffer, &mut rx_buffer).unwrap(); // ANCHOR_END: transfer // here the CPU could do other things while the transfer is taking done without using the CPU @@ -76,7 +75,7 @@ fn main() -> ! { // the buffers and spi are moved into the transfer and // we can get it back via `wait` // if the transfer isn't completed this will block - (tx_buffer, rx_buffer, spi) = transfer.wait().unwrap(); + transfer.wait().unwrap(); // ANCHOR_END: transfer-wait println!(); @@ -86,6 +85,6 @@ fn main() -> ! { &rx_buffer[rx_buffer.len() - 10..] ); - delay.delay_ms(2500u32); + delay.delay_millis(2500u32); } } diff --git a/intro/dma/src/main.rs b/intro/dma/src/main.rs index ffc7957..f02d016 100644 --- a/intro/dma/src/main.rs +++ b/intro/dma/src/main.rs @@ -8,12 +8,18 @@ use esp_backtrace as _; use esp_hal::{ clock::ClockControl, delay::Delay, + dma::Dma, + dma::DmaPriority, + dma_buffers, gpio::IO, peripherals::Peripherals, prelude::*, - spi::{master::Spi, SpiMode}, + spi::{ + master::{prelude::*, Spi}, + SpiMode, + }, }; -use esp_println::println; +use esp_println::{print, println}; #[entry] fn main() -> ! { @@ -38,13 +44,13 @@ fn main() -> ! { loop { // ANCHOR: transfer - // To transfer much larger amounts of data we can use DMA and + // To transfer much larger amounts of data we can use DMA and // the CPU can even do other things while the transfer is in progress let mut data = [0x01u8, 0x02, 0x03, 0x04]; spi.transfer(&mut data).unwrap(); // ANCHOR_END: transfer println!("{:x?}", data); - delay.delay_ms(2500u32); + delay.delay_millis(2500u32); } } diff --git a/intro/hello-world/Cargo.lock b/intro/hello-world/Cargo.lock index b0cc192..564a805 100644 --- a/intro/hello-world/Cargo.lock +++ b/intro/hello-world/Cargo.lock @@ -17,12 +17,6 @@ version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "bare-metal" version = "1.0.0" @@ -31,24 +25,24 @@ checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" [[package]] name = "basic-toml" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" dependencies = [ "serde", ] [[package]] name = "bitfield" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac" +checksum = "c821a6e124197eb56d907ccc2188eab1038fb919c914f47976e64dd8dbc855d1" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "cfg-if" @@ -96,7 +90,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -107,7 +101,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -119,6 +113,15 @@ dependencies = [ "litrs", ] +[[package]] +name = "embedded-can" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d2e857f87ac832df68fa498d18ddc679175cf3d2e4aa893988e5601baf9438" +dependencies = [ + "nb", +] + [[package]] name = "embedded-dma" version = "0.2.0" @@ -130,19 +133,19 @@ dependencies = [ [[package]] name = "embedded-hal" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff" -dependencies = [ - "nb 0.1.3", - "void", -] +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" [[package]] -name = "embedded-hal" +name = "embedded-hal-nb" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal", + "nb", +] [[package]] name = "enum-as-inner" @@ -174,7 +177,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -185,18 +188,29 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "esp-backtrace" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5c6f9166728f6cd08e5781899f4c94fd7ccf2efd04e5b2295f7cb2c92c83e8" +checksum = "dda6c53c50ed96cce44e8565bd7659f8884d55bac3262184c3a77f748553e3ff" dependencies = [ "esp-println", ] +[[package]] +name = "esp-build" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94a4b8d74e7cc7baabcca5b2277b41877e039ad9cd49959d48ef94dac7eab4b" +dependencies = [ + "quote", + "syn 2.0.60", + "termcolor", +] + [[package]] name = "esp-hal" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e021610c11f106869f382f532fb81de0df98fd2b41299deba81bb62e9c4c4f8" +checksum = "a6e19440eb58fd1dd0c4f6722c953f7026571210c70ce69956d022faeb8fe4b4" dependencies = [ "basic-toml", "bitfield", @@ -204,21 +218,18 @@ dependencies = [ "cfg-if", "critical-section", "document-features", + "embedded-can", "embedded-dma", - "embedded-hal 0.2.7", + "embedded-hal", + "embedded-hal-nb", "enumset", + "esp-build", "esp-hal-procmacros", + "esp-metadata", "esp-riscv-rt", - "esp32", - "esp32c2", "esp32c3", - "esp32c6", - "esp32h2", - "esp32p4", - "esp32s2", - "esp32s3", "fugit", - "nb 1.1.0", + "nb", "paste", "portable-atomic", "rand_core", @@ -231,9 +242,9 @@ dependencies = [ [[package]] name = "esp-hal-procmacros" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05084ecf8446fe60e0aff6c3873c96dca56dc383a449324ca555edbb80ae60c0" +checksum = "f2a9e9df075eb0c1e0a4349a4317c86b01be2acabe6f69d935c9c71d8a99e56a" dependencies = [ "darling", "document-features", @@ -242,110 +253,49 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] -name = "esp-println" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e090867a191aaaa0645f8a7f03c51ab57cee82e2adba5525940dc9ff1c07511" -dependencies = [ - "critical-section", -] - -[[package]] -name = "esp-riscv-rt" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599762d31156fa2322db4d5a0784c13b6122b79c1fa7bed70953de2f7d731f1" -dependencies = [ - "document-features", - "riscv", - "riscv-rt-macros", -] - -[[package]] -name = "esp32" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343ac30c4537d3f8526490db4264091a9785a55bcdfc22fc34482751a501d8d2" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - -[[package]] -name = "esp32c2" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e30c9147b7a1f388887dfd2fe7da4d6159a0248603674af5f3a5282a46cd11" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32c3" -version = "0.21.0" +name = "esp-metadata" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7ee710c1e4f16b5e840cdfec3f4e7642b7517a877c5c4b7e1cafa9a14117c5" +checksum = "1a97109e81e9fb68cbf838ffda09cebbc9b25fe12f8b8a5e1b32391561e7c153" dependencies = [ - "critical-section", - "vcell", + "basic-toml", + "lazy_static", + "serde", + "strum 0.26.2", ] [[package]] -name = "esp32c6" -version = "0.12.0" +name = "esp-println" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0275425ea3a7675b7b5903163a93b65e8ce5b9c8a7749ed397279ed2ade3e3" +checksum = "e98f0f58453dd2ce08d99228fc8757fad39d05dfd26643665d1093b8844f42cc" dependencies = [ "critical-section", - "vcell", ] [[package]] -name = "esp32h2" +name = "esp-riscv-rt" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e606c8e60d3e68afda997fa9fcc8d8fe1d2e3c172505bb03eb9ab79b4bca4d6a" +checksum = "404129c79e9dc34f8b468ec44e71ce36a0bd443cb88be0feffa4b9f3856c97a6" dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32p4" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03c0bc7973e6805e3c3c3c979e9418ba30380d8c16989a477440dbce8cf1965" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32s2" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbcb8e9a4097fbf1c455fc776ad46a4bb7861d5bad3c3cd4549b666ad906ce4" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", + "document-features", + "riscv", + "riscv-rt-macros", ] [[package]] -name = "esp32s3" -version = "0.24.0" +name = "esp32c3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044e216560a33aa5d6c98163c8ae4278845ec3bae7b9cab520da0697be4f23a6" +checksum = "4c22d8c27e7d675ef79db212b9e41df80aef6db1a5c819e4e726735f64ee0700" dependencies = [ "critical-section", "vcell", - "xtensa-lx", ] [[package]] @@ -406,6 +356,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + [[package]] name = "litrs" version = "0.4.1" @@ -415,16 +371,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "memchr" version = "2.7.1" @@ -440,21 +386,6 @@ dependencies = [ "serde", ] -[[package]] -name = "mutex-trait" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4bb1638d419e12f8b1c43d9e639abd0d1424285bdea2f76aa231e233c63cd3a" - -[[package]] -name = "nb" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" -dependencies = [ - "nb 1.1.0", -] - [[package]] name = "nb" version = "1.1.0" @@ -508,18 +439,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -572,7 +503,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f5c1b8bf41ea746266cdee443d1d1e9125c86ce1447e1a2615abd34330d33a9" dependencies = [ "critical-section", - "embedded-hal 1.0.0", + "embedded-hal", ] [[package]] @@ -592,12 +523,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "serde" version = "1.0.197" @@ -615,16 +540,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", + "syn 2.0.60", ] [[package]] @@ -677,7 +593,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -693,15 +609,24 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "toml_datetime" version = "0.6.5" @@ -744,23 +669,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "winnow" -version = "0.5.40" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "memchr", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "xtensa-lx" -version = "0.9.0" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e758f94e1a1f71758f94052a2766dcb12604998eb372b8b2e30576e3ab1ba1e6" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "bare-metal", - "mutex-trait", - "spin", + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", ] [[package]] @@ -785,5 +730,5 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] diff --git a/intro/hello-world/Cargo.toml b/intro/hello-world/Cargo.toml index 46b5a5f..530dbe0 100644 --- a/intro/hello-world/Cargo.toml +++ b/intro/hello-world/Cargo.toml @@ -6,11 +6,11 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -esp-hal = { version = "0.16.1", features = ["esp32c3"] } -esp-backtrace = { version = "0.11.0", features = [ +esp-hal = { version = "0.17.0", features = ["esp32c3"] } +esp-backtrace = { version = "0.11.1", features = [ "esp32c3", "panic-handler", "exception-handler", "println", ] } -esp-println = { version = "0.9.0", features = ["esp32c3", "uart"] } +esp-println = { version = "0.9.1", features = ["esp32c3", "uart"] } diff --git a/intro/http-client/Cargo.lock b/intro/http-client/Cargo.lock index 1044a37..10ee868 100644 --- a/intro/http-client/Cargo.lock +++ b/intro/http-client/Cargo.lock @@ -40,18 +40,18 @@ checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" [[package]] name = "basic-toml" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" dependencies = [ "serde", ] [[package]] name = "bitfield" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac" +checksum = "c821a6e124197eb56d907ccc2188eab1038fb919c914f47976e64dd8dbc855d1" [[package]] name = "bitflags" @@ -61,9 +61,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "byteorder" @@ -117,7 +117,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -128,7 +128,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -140,6 +140,15 @@ dependencies = [ "litrs", ] +[[package]] +name = "embedded-can" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d2e857f87ac832df68fa498d18ddc679175cf3d2e4aa893988e5601baf9438" +dependencies = [ + "nb 1.1.0", +] + [[package]] name = "embedded-dma" version = "0.2.0" @@ -165,6 +174,16 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" +[[package]] +name = "embedded-hal-nb" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal 1.0.0", + "nb 1.1.0", +] + [[package]] name = "embedded-io" version = "0.6.1" @@ -201,7 +220,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -212,38 +231,46 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "esp-backtrace" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5c6f9166728f6cd08e5781899f4c94fd7ccf2efd04e5b2295f7cb2c92c83e8" +checksum = "dda6c53c50ed96cce44e8565bd7659f8884d55bac3262184c3a77f748553e3ff" dependencies = [ "esp-println", ] +[[package]] +name = "esp-build" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94a4b8d74e7cc7baabcca5b2277b41877e039ad9cd49959d48ef94dac7eab4b" +dependencies = [ + "quote", + "syn 2.0.60", + "termcolor", +] + [[package]] name = "esp-hal" -version = "0.16.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc3e9b3333d2ae42f5c9b4890e162cb756fb1b067ab5f642b89fc9f29be424fa" +checksum = "a6e19440eb58fd1dd0c4f6722c953f7026571210c70ce69956d022faeb8fe4b4" dependencies = [ "basic-toml", "bitfield", - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "critical-section", "document-features", + "embedded-can", "embedded-dma", - "embedded-hal 0.2.7", + "embedded-hal 1.0.0", + "embedded-hal-nb", "enumset", + "esp-build", "esp-hal-procmacros", + "esp-metadata", "esp-riscv-rt", - "esp32", - "esp32c2", "esp32c3", - "esp32c6", - "esp32h2", - "esp32p4", - "esp32s2", - "esp32s3", "fugit", "log", "nb 1.1.0", @@ -259,9 +286,9 @@ dependencies = [ [[package]] name = "esp-hal-procmacros" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05084ecf8446fe60e0aff6c3873c96dca56dc383a449324ca555edbb80ae60c0" +checksum = "f2a9e9df075eb0c1e0a4349a4317c86b01be2acabe6f69d935c9c71d8a99e56a" dependencies = [ "darling", "document-features", @@ -270,23 +297,35 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", +] + +[[package]] +name = "esp-metadata" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a97109e81e9fb68cbf838ffda09cebbc9b25fe12f8b8a5e1b32391561e7c153" +dependencies = [ + "basic-toml", + "lazy_static", + "serde", + "strum 0.26.2", ] [[package]] name = "esp-println" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e090867a191aaaa0645f8a7f03c51ab57cee82e2adba5525940dc9ff1c07511" +checksum = "e98f0f58453dd2ce08d99228fc8757fad39d05dfd26643665d1093b8844f42cc" dependencies = [ "critical-section", ] [[package]] name = "esp-riscv-rt" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599762d31156fa2322db4d5a0784c13b6122b79c1fa7bed70953de2f7d731f1" +checksum = "404129c79e9dc34f8b468ec44e71ce36a0bd443cb88be0feffa4b9f3856c97a6" dependencies = [ "document-features", "riscv", @@ -295,13 +334,14 @@ dependencies = [ [[package]] name = "esp-wifi" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bdfa4a39424472e5412fb2c7783f2cd42c7780893f440b34958a2df1b48628b" +checksum = "d067727b040ded02ecb1ba9ee9ae1aaa8d12493c9faecbadd5a3d170655ce485" dependencies = [ "atomic-waker", "cfg-if", "critical-section", + "embedded-hal 0.2.7", "embedded-io", "enumset", "esp-hal", @@ -330,89 +370,16 @@ dependencies = [ "anyhow", ] -[[package]] -name = "esp32" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343ac30c4537d3f8526490db4264091a9785a55bcdfc22fc34482751a501d8d2" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - -[[package]] -name = "esp32c2" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e30c9147b7a1f388887dfd2fe7da4d6159a0248603674af5f3a5282a46cd11" -dependencies = [ - "critical-section", - "vcell", -] - [[package]] name = "esp32c3" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7ee710c1e4f16b5e840cdfec3f4e7642b7517a877c5c4b7e1cafa9a14117c5" +checksum = "4c22d8c27e7d675ef79db212b9e41df80aef6db1a5c819e4e726735f64ee0700" dependencies = [ "critical-section", "vcell", ] -[[package]] -name = "esp32c6" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0275425ea3a7675b7b5903163a93b65e8ce5b9c8a7749ed397279ed2ade3e3" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32h2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e606c8e60d3e68afda997fa9fcc8d8fe1d2e3c172505bb03eb9ab79b4bca4d6a" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32p4" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03c0bc7973e6805e3c3c3c979e9418ba30380d8c16989a477440dbce8cf1965" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32s2" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbcb8e9a4097fbf1c455fc776ad46a4bb7861d5bad3c3cd4549b666ad906ce4" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - -[[package]] -name = "esp32s3" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044e216560a33aa5d6c98163c8ae4278845ec3bae7b9cab520da0697be4f23a6" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - [[package]] name = "fnv" version = "1.0.7" @@ -522,6 +489,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + [[package]] name = "libm" version = "0.2.8" @@ -543,16 +516,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "log" version = "0.4.21" @@ -580,12 +543,6 @@ dependencies = [ "serde", ] -[[package]] -name = "mutex-trait" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4bb1638d419e12f8b1c43d9e639abd0d1424285bdea2f76aa231e233c63cd3a" - [[package]] name = "nb" version = "0.1.3" @@ -615,7 +572,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -669,7 +626,7 @@ checksum = "a33fa6ec7f2047f572d49317cca19c87195de99c6e5b6ee492da701cfe02b053" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -707,18 +664,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -791,12 +748,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "serde" version = "1.0.197" @@ -814,7 +765,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -839,15 +790,6 @@ dependencies = [ "managed", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -898,7 +840,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -914,15 +856,24 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "toml" version = "0.8.10" @@ -945,7 +896,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.52", + "syn 2.0.60", "toml", ] @@ -1006,6 +957,37 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "winnow" version = "0.5.40" @@ -1024,17 +1006,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "xtensa-lx" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e758f94e1a1f71758f94052a2766dcb12604998eb372b8b2e30576e3ab1ba1e6" -dependencies = [ - "bare-metal", - "mutex-trait", - "spin", -] - [[package]] name = "xtensa-lx-rt" version = "0.16.0" @@ -1057,5 +1028,5 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] diff --git a/intro/http-client/Cargo.toml b/intro/http-client/Cargo.toml index 80cabe9..ad870ec 100644 --- a/intro/http-client/Cargo.toml +++ b/intro/http-client/Cargo.toml @@ -16,15 +16,15 @@ opt-level = 3 lto = "off" [dependencies] -esp-hal = { version = "0.16.1", features = ["esp32c3"] } -esp-backtrace = { version = "0.11.0", features = [ +esp-hal = { version = "0.17.0", features = ["esp32c3"] } +esp-backtrace = { version = "0.11.1", features = [ "esp32c3", "panic-handler", "exception-handler", "println", ] } -esp-println = { version = "0.9.0", features = ["esp32c3", "uart"] } -esp-wifi = { version = "0.4.0", features = [ +esp-println = { version = "0.9.1", features = ["esp32c3", "uart"] } +esp-wifi = { version = "0.5.0", features = [ "esp32c3", "wifi-default", "utils", diff --git a/intro/http-client/examples/http-client.rs b/intro/http-client/examples/http-client.rs index c821a21..8552b68 100644 --- a/intro/http-client/examples/http-client.rs +++ b/intro/http-client/examples/http-client.rs @@ -2,7 +2,7 @@ #![no_main] use esp_hal::{ - clock::ClockControl, peripherals::Peripherals, prelude::*, systimer::SystemTimer, Rng, + clock::ClockControl, peripherals::Peripherals, prelude::*, rng::Rng, systimer::SystemTimer, }; use embedded_io::*; diff --git a/intro/http-client/src/main.rs b/intro/http-client/src/main.rs index 6db33b2..9ef91ad 100644 --- a/intro/http-client/src/main.rs +++ b/intro/http-client/src/main.rs @@ -2,7 +2,7 @@ #![no_main] use esp_hal::{ - clock::ClockControl, peripherals::Peripherals, prelude::*, systimer::SystemTimer, Rng, + clock::ClockControl, peripherals::Peripherals, prelude::*, rng::Rng, systimer::SystemTimer, }; use embedded_io::*; diff --git a/intro/panic/Cargo.lock b/intro/panic/Cargo.lock index 01d359a..d41538c 100644 --- a/intro/panic/Cargo.lock +++ b/intro/panic/Cargo.lock @@ -17,12 +17,6 @@ version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "bare-metal" version = "1.0.0" @@ -31,24 +25,24 @@ checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" [[package]] name = "basic-toml" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" dependencies = [ "serde", ] [[package]] name = "bitfield" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac" +checksum = "c821a6e124197eb56d907ccc2188eab1038fb919c914f47976e64dd8dbc855d1" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "cfg-if" @@ -96,7 +90,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -107,7 +101,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -119,6 +113,15 @@ dependencies = [ "litrs", ] +[[package]] +name = "embedded-can" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d2e857f87ac832df68fa498d18ddc679175cf3d2e4aa893988e5601baf9438" +dependencies = [ + "nb", +] + [[package]] name = "embedded-dma" version = "0.2.0" @@ -130,19 +133,19 @@ dependencies = [ [[package]] name = "embedded-hal" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff" -dependencies = [ - "nb 0.1.3", - "void", -] +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" [[package]] -name = "embedded-hal" +name = "embedded-hal-nb" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal", + "nb", +] [[package]] name = "enum-as-inner" @@ -174,7 +177,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -185,18 +188,29 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "esp-backtrace" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5c6f9166728f6cd08e5781899f4c94fd7ccf2efd04e5b2295f7cb2c92c83e8" +checksum = "dda6c53c50ed96cce44e8565bd7659f8884d55bac3262184c3a77f748553e3ff" dependencies = [ "esp-println", ] +[[package]] +name = "esp-build" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94a4b8d74e7cc7baabcca5b2277b41877e039ad9cd49959d48ef94dac7eab4b" +dependencies = [ + "quote", + "syn 2.0.60", + "termcolor", +] + [[package]] name = "esp-hal" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e021610c11f106869f382f532fb81de0df98fd2b41299deba81bb62e9c4c4f8" +checksum = "a6e19440eb58fd1dd0c4f6722c953f7026571210c70ce69956d022faeb8fe4b4" dependencies = [ "basic-toml", "bitfield", @@ -204,21 +218,18 @@ dependencies = [ "cfg-if", "critical-section", "document-features", + "embedded-can", "embedded-dma", - "embedded-hal 0.2.7", + "embedded-hal", + "embedded-hal-nb", "enumset", + "esp-build", "esp-hal-procmacros", + "esp-metadata", "esp-riscv-rt", - "esp32", - "esp32c2", "esp32c3", - "esp32c6", - "esp32h2", - "esp32p4", - "esp32s2", - "esp32s3", "fugit", - "nb 1.1.0", + "nb", "paste", "portable-atomic", "rand_core", @@ -231,9 +242,9 @@ dependencies = [ [[package]] name = "esp-hal-procmacros" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05084ecf8446fe60e0aff6c3873c96dca56dc383a449324ca555edbb80ae60c0" +checksum = "f2a9e9df075eb0c1e0a4349a4317c86b01be2acabe6f69d935c9c71d8a99e56a" dependencies = [ "darling", "document-features", @@ -242,110 +253,49 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] -name = "esp-println" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e090867a191aaaa0645f8a7f03c51ab57cee82e2adba5525940dc9ff1c07511" -dependencies = [ - "critical-section", -] - -[[package]] -name = "esp-riscv-rt" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599762d31156fa2322db4d5a0784c13b6122b79c1fa7bed70953de2f7d731f1" -dependencies = [ - "document-features", - "riscv", - "riscv-rt-macros", -] - -[[package]] -name = "esp32" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343ac30c4537d3f8526490db4264091a9785a55bcdfc22fc34482751a501d8d2" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", -] - -[[package]] -name = "esp32c2" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e30c9147b7a1f388887dfd2fe7da4d6159a0248603674af5f3a5282a46cd11" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32c3" -version = "0.21.0" +name = "esp-metadata" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7ee710c1e4f16b5e840cdfec3f4e7642b7517a877c5c4b7e1cafa9a14117c5" +checksum = "1a97109e81e9fb68cbf838ffda09cebbc9b25fe12f8b8a5e1b32391561e7c153" dependencies = [ - "critical-section", - "vcell", + "basic-toml", + "lazy_static", + "serde", + "strum 0.26.2", ] [[package]] -name = "esp32c6" -version = "0.12.0" +name = "esp-println" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0275425ea3a7675b7b5903163a93b65e8ce5b9c8a7749ed397279ed2ade3e3" +checksum = "e98f0f58453dd2ce08d99228fc8757fad39d05dfd26643665d1093b8844f42cc" dependencies = [ "critical-section", - "vcell", ] [[package]] -name = "esp32h2" +name = "esp-riscv-rt" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e606c8e60d3e68afda997fa9fcc8d8fe1d2e3c172505bb03eb9ab79b4bca4d6a" +checksum = "404129c79e9dc34f8b468ec44e71ce36a0bd443cb88be0feffa4b9f3856c97a6" dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32p4" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03c0bc7973e6805e3c3c3c979e9418ba30380d8c16989a477440dbce8cf1965" -dependencies = [ - "critical-section", - "vcell", -] - -[[package]] -name = "esp32s2" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbcb8e9a4097fbf1c455fc776ad46a4bb7861d5bad3c3cd4549b666ad906ce4" -dependencies = [ - "critical-section", - "vcell", - "xtensa-lx", + "document-features", + "riscv", + "riscv-rt-macros", ] [[package]] -name = "esp32s3" -version = "0.24.0" +name = "esp32c3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044e216560a33aa5d6c98163c8ae4278845ec3bae7b9cab520da0697be4f23a6" +checksum = "4c22d8c27e7d675ef79db212b9e41df80aef6db1a5c819e4e726735f64ee0700" dependencies = [ "critical-section", "vcell", - "xtensa-lx", ] [[package]] @@ -397,6 +347,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + [[package]] name = "litrs" version = "0.4.1" @@ -406,16 +362,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "memchr" version = "2.7.1" @@ -431,21 +377,6 @@ dependencies = [ "serde", ] -[[package]] -name = "mutex-trait" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4bb1638d419e12f8b1c43d9e639abd0d1424285bdea2f76aa231e233c63cd3a" - -[[package]] -name = "nb" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" -dependencies = [ - "nb 1.1.0", -] - [[package]] name = "nb" version = "1.1.0" @@ -508,18 +439,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -572,7 +503,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f5c1b8bf41ea746266cdee443d1d1e9125c86ce1447e1a2615abd34330d33a9" dependencies = [ "critical-section", - "embedded-hal 1.0.0", + "embedded-hal", ] [[package]] @@ -592,12 +523,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "serde" version = "1.0.197" @@ -615,16 +540,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", + "syn 2.0.60", ] [[package]] @@ -677,7 +593,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.60", ] [[package]] @@ -693,15 +609,24 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "toml_datetime" version = "0.6.5" @@ -744,23 +669,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "winnow" -version = "0.5.40" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "memchr", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "xtensa-lx" -version = "0.9.0" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e758f94e1a1f71758f94052a2766dcb12604998eb372b8b2e30576e3ab1ba1e6" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "bare-metal", - "mutex-trait", - "spin", + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", ] [[package]] @@ -785,5 +730,5 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.60", ] diff --git a/intro/panic/Cargo.toml b/intro/panic/Cargo.toml index 035fe4d..ed0c9fd 100644 --- a/intro/panic/Cargo.toml +++ b/intro/panic/Cargo.toml @@ -6,11 +6,11 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -esp-hal = { version = "0.16.1", features = ["esp32c3"] } -esp-backtrace = { version = "0.11.0", features = [ +esp-hal = { version = "0.17.0", features = ["esp32c3"] } +esp-backtrace = { version = "0.11.1", features = [ "esp32c3", "panic-handler", "exception-handler", "println", ] } -esp-println = { version = "0.9.0", features = ["esp32c3", "uart"] } +esp-println = { version = "0.9.1", features = ["esp32c3", "uart"] }