diff options
| author | Ragarnoy <[email protected]> | 2025-05-21 13:58:57 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-21 13:58:57 +0200 |
| commit | a4676f8b94db9a62752f05595a282afc0fb99288 (patch) | |
| tree | 248614aec383679d9820eff771e4d5b3e33a0a9f /examples | |
| parent | d5c9d1af26e7bd0ebefafba6ae28b0bd660aa924 (diff) | |
| parent | 7cbc9058bc726900571a7858c581f60cd8cb0266 (diff) | |
Merge branch 'embassy-rs:main' into stm32h755-intercore
Diffstat (limited to 'examples')
112 files changed, 702 insertions, 273 deletions
diff --git a/examples/boot/application/nrf/Cargo.toml b/examples/boot/application/nrf/Cargo.toml index 4ae0e6a77..244ce9591 100644 --- a/examples/boot/application/nrf/Cargo.toml +++ b/examples/boot/application/nrf/Cargo.toml | |||
| @@ -13,8 +13,8 @@ embassy-boot = { version = "0.4.0", path = "../../../../embassy-boot", features | |||
| 13 | embassy-boot-nrf = { version = "0.4.0", path = "../../../../embassy-boot-nrf", features = [] } | 13 | embassy-boot-nrf = { version = "0.4.0", path = "../../../../embassy-boot-nrf", features = [] } |
| 14 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } | 14 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } |
| 15 | 15 | ||
| 16 | defmt = { version = "0.3", optional = true } | 16 | defmt = { version = "1.0.1", optional = true } |
| 17 | defmt-rtt = { version = "0.4", optional = true } | 17 | defmt-rtt = { version = "1.0.0", optional = true } |
| 18 | panic-reset = { version = "0.1.1" } | 18 | panic-reset = { version = "0.1.1" } |
| 19 | embedded-hal = { version = "0.2.6" } | 19 | embedded-hal = { version = "0.2.6" } |
| 20 | 20 | ||
diff --git a/examples/boot/application/rp/Cargo.toml b/examples/boot/application/rp/Cargo.toml index 3c0d207d1..24f4218f1 100644 --- a/examples/boot/application/rp/Cargo.toml +++ b/examples/boot/application/rp/Cargo.toml | |||
| @@ -12,9 +12,9 @@ embassy-rp = { version = "0.4.0", path = "../../../../embassy-rp", features = [" | |||
| 12 | embassy-boot-rp = { version = "0.5.0", path = "../../../../embassy-boot-rp", features = [] } | 12 | embassy-boot-rp = { version = "0.5.0", path = "../../../../embassy-boot-rp", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } |
| 14 | 14 | ||
| 15 | defmt = "0.3" | 15 | defmt = "1.0.1" |
| 16 | defmt-rtt = "0.4" | 16 | defmt-rtt = "1.0.0" |
| 17 | panic-probe = { version = "0.3", features = ["print-defmt"], optional = true } | 17 | panic-probe = { version = "1.0.0", features = ["print-defmt"], optional = true } |
| 18 | panic-reset = { version = "0.1.1", optional = true } | 18 | panic-reset = { version = "0.1.1", optional = true } |
| 19 | embedded-hal = { version = "0.2.6" } | 19 | embedded-hal = { version = "0.2.6" } |
| 20 | 20 | ||
diff --git a/examples/boot/application/stm32f3/Cargo.toml b/examples/boot/application/stm32f3/Cargo.toml index f32727ea8..1e209eb9c 100644 --- a/examples/boot/application/stm32f3/Cargo.toml +++ b/examples/boot/application/stm32f3/Cargo.toml | |||
| @@ -12,8 +12,8 @@ embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", feature | |||
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32" } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32" } |
| 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } |
| 14 | 14 | ||
| 15 | defmt = { version = "0.3", optional = true } | 15 | defmt = { version = "1.0.1", optional = true } |
| 16 | defmt-rtt = { version = "0.4", optional = true } | 16 | defmt-rtt = { version = "1.0.0", optional = true } |
| 17 | panic-reset = { version = "0.1.1" } | 17 | panic-reset = { version = "0.1.1" } |
| 18 | embedded-hal = { version = "0.2.6" } | 18 | embedded-hal = { version = "0.2.6" } |
| 19 | 19 | ||
diff --git a/examples/boot/application/stm32f7/Cargo.toml b/examples/boot/application/stm32f7/Cargo.toml index d62c67742..877e239fa 100644 --- a/examples/boot/application/stm32f7/Cargo.toml +++ b/examples/boot/application/stm32f7/Cargo.toml | |||
| @@ -12,8 +12,8 @@ embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", feature | |||
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } |
| 14 | 14 | ||
| 15 | defmt = { version = "0.3", optional = true } | 15 | defmt = { version = "1.0.1", optional = true } |
| 16 | defmt-rtt = { version = "0.4", optional = true } | 16 | defmt-rtt = { version = "1.0.0", optional = true } |
| 17 | panic-reset = { version = "0.1.1" } | 17 | panic-reset = { version = "0.1.1" } |
| 18 | embedded-hal = { version = "0.2.6" } | 18 | embedded-hal = { version = "0.2.6" } |
| 19 | embedded-storage = "0.3.1" | 19 | embedded-storage = "0.3.1" |
diff --git a/examples/boot/application/stm32h7/Cargo.toml b/examples/boot/application/stm32h7/Cargo.toml index dd3a32e45..f28723835 100644 --- a/examples/boot/application/stm32h7/Cargo.toml +++ b/examples/boot/application/stm32h7/Cargo.toml | |||
| @@ -12,8 +12,8 @@ embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", feature | |||
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } |
| 14 | 14 | ||
| 15 | defmt = { version = "0.3", optional = true } | 15 | defmt = { version = "1.0.1", optional = true } |
| 16 | defmt-rtt = { version = "0.4", optional = true } | 16 | defmt-rtt = { version = "1.0.0", optional = true } |
| 17 | panic-reset = { version = "0.1.1" } | 17 | panic-reset = { version = "0.1.1" } |
| 18 | embedded-hal = { version = "0.2.6" } | 18 | embedded-hal = { version = "0.2.6" } |
| 19 | embedded-storage = "0.3.1" | 19 | embedded-storage = "0.3.1" |
diff --git a/examples/boot/application/stm32l0/Cargo.toml b/examples/boot/application/stm32l0/Cargo.toml index 0b9e9b96a..f1cb55223 100644 --- a/examples/boot/application/stm32l0/Cargo.toml +++ b/examples/boot/application/stm32l0/Cargo.toml | |||
| @@ -12,8 +12,8 @@ embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", feature | |||
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } |
| 14 | 14 | ||
| 15 | defmt = { version = "0.3", optional = true } | 15 | defmt = { version = "1.0.1", optional = true } |
| 16 | defmt-rtt = { version = "0.4", optional = true } | 16 | defmt-rtt = { version = "1.0.0", optional = true } |
| 17 | panic-reset = { version = "0.1.1" } | 17 | panic-reset = { version = "0.1.1" } |
| 18 | embedded-hal = { version = "0.2.6" } | 18 | embedded-hal = { version = "0.2.6" } |
| 19 | 19 | ||
diff --git a/examples/boot/application/stm32l1/Cargo.toml b/examples/boot/application/stm32l1/Cargo.toml index 490541a2e..7c53e011d 100644 --- a/examples/boot/application/stm32l1/Cargo.toml +++ b/examples/boot/application/stm32l1/Cargo.toml | |||
| @@ -12,8 +12,8 @@ embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", feature | |||
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } |
| 14 | 14 | ||
| 15 | defmt = { version = "0.3", optional = true } | 15 | defmt = { version = "1.0.1", optional = true } |
| 16 | defmt-rtt = { version = "0.4", optional = true } | 16 | defmt-rtt = { version = "1.0.0", optional = true } |
| 17 | panic-reset = { version = "0.1.1" } | 17 | panic-reset = { version = "0.1.1" } |
| 18 | embedded-hal = { version = "0.2.6" } | 18 | embedded-hal = { version = "0.2.6" } |
| 19 | 19 | ||
diff --git a/examples/boot/application/stm32l4/Cargo.toml b/examples/boot/application/stm32l4/Cargo.toml index c3aa31161..9f5060802 100644 --- a/examples/boot/application/stm32l4/Cargo.toml +++ b/examples/boot/application/stm32l4/Cargo.toml | |||
| @@ -12,8 +12,8 @@ embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", feature | |||
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } |
| 14 | 14 | ||
| 15 | defmt = { version = "0.3", optional = true } | 15 | defmt = { version = "1.0.1", optional = true } |
| 16 | defmt-rtt = { version = "0.4", optional = true } | 16 | defmt-rtt = { version = "1.0.0", optional = true } |
| 17 | panic-reset = { version = "0.1.1" } | 17 | panic-reset = { version = "0.1.1" } |
| 18 | embedded-hal = { version = "0.2.6" } | 18 | embedded-hal = { version = "0.2.6" } |
| 19 | 19 | ||
diff --git a/examples/boot/application/stm32wb-dfu/Cargo.toml b/examples/boot/application/stm32wb-dfu/Cargo.toml index a89e2bb6e..d1cea8520 100644 --- a/examples/boot/application/stm32wb-dfu/Cargo.toml +++ b/examples/boot/application/stm32wb-dfu/Cargo.toml | |||
| @@ -14,8 +14,8 @@ embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded | |||
| 14 | embassy-usb = { version = "0.4.0", path = "../../../../embassy-usb" } | 14 | embassy-usb = { version = "0.4.0", path = "../../../../embassy-usb" } |
| 15 | embassy-usb-dfu = { version = "0.1.0", path = "../../../../embassy-usb-dfu", features = ["application", "cortex-m"] } | 15 | embassy-usb-dfu = { version = "0.1.0", path = "../../../../embassy-usb-dfu", features = ["application", "cortex-m"] } |
| 16 | 16 | ||
| 17 | defmt = { version = "0.3", optional = true } | 17 | defmt = { version = "1.0.1", optional = true } |
| 18 | defmt-rtt = { version = "0.4", optional = true } | 18 | defmt-rtt = { version = "1.0.0", optional = true } |
| 19 | panic-reset = { version = "0.1.1" } | 19 | panic-reset = { version = "0.1.1" } |
| 20 | embedded-hal = { version = "0.2.6" } | 20 | embedded-hal = { version = "0.2.6" } |
| 21 | 21 | ||
diff --git a/examples/boot/application/stm32wb-dfu/src/main.rs b/examples/boot/application/stm32wb-dfu/src/main.rs index dda2b795b..5e7b71f5a 100644 --- a/examples/boot/application/stm32wb-dfu/src/main.rs +++ b/examples/boot/application/stm32wb-dfu/src/main.rs | |||
| @@ -13,7 +13,7 @@ use embassy_stm32::usb::{self, Driver}; | |||
| 13 | use embassy_stm32::{bind_interrupts, peripherals}; | 13 | use embassy_stm32::{bind_interrupts, peripherals}; |
| 14 | use embassy_sync::blocking_mutex::Mutex; | 14 | use embassy_sync::blocking_mutex::Mutex; |
| 15 | use embassy_time::Duration; | 15 | use embassy_time::Duration; |
| 16 | use embassy_usb::Builder; | 16 | use embassy_usb::{msos, Builder}; |
| 17 | use embassy_usb_dfu::consts::DfuAttributes; | 17 | use embassy_usb_dfu::consts::DfuAttributes; |
| 18 | use embassy_usb_dfu::{usb_dfu, Control, ResetImmediate}; | 18 | use embassy_usb_dfu::{usb_dfu, Control, ResetImmediate}; |
| 19 | use panic_reset as _; | 19 | use panic_reset as _; |
| @@ -22,6 +22,11 @@ bind_interrupts!(struct Irqs { | |||
| 22 | USB_LP => usb::InterruptHandler<peripherals::USB>; | 22 | USB_LP => usb::InterruptHandler<peripherals::USB>; |
| 23 | }); | 23 | }); |
| 24 | 24 | ||
| 25 | // This is a randomly generated GUID to allow clients on Windows to find your device. | ||
| 26 | // | ||
| 27 | // N.B. update to a custom GUID for your own device! | ||
| 28 | const DEVICE_INTERFACE_GUIDS: &[&str] = &["{EAA9A5DC-30BA-44BC-9232-606CDC875321}"]; | ||
| 29 | |||
| 25 | #[embassy_executor::main] | 30 | #[embassy_executor::main] |
| 26 | async fn main(_spawner: Spawner) { | 31 | async fn main(_spawner: Spawner) { |
| 27 | let mut config = embassy_stm32::Config::default(); | 32 | let mut config = embassy_stm32::Config::default(); |
| @@ -54,7 +59,28 @@ async fn main(_spawner: Spawner) { | |||
| 54 | &mut control_buf, | 59 | &mut control_buf, |
| 55 | ); | 60 | ); |
| 56 | 61 | ||
| 57 | usb_dfu(&mut builder, &mut state, Duration::from_millis(2500)); | 62 | // We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows. |
| 63 | // Otherwise users need to do this manually using a tool like Zadig. | ||
| 64 | // | ||
| 65 | // It seems these always need to be at added at the device level for this to work and for | ||
| 66 | // composite devices they also need to be added on the function level (as shown later). | ||
| 67 | // | ||
| 68 | builder.msos_descriptor(msos::windows_version::WIN8_1, 2); | ||
| 69 | builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); | ||
| 70 | builder.msos_feature(msos::RegistryPropertyFeatureDescriptor::new( | ||
| 71 | "DeviceInterfaceGUIDs", | ||
| 72 | msos::PropertyData::RegMultiSz(DEVICE_INTERFACE_GUIDS), | ||
| 73 | )); | ||
| 74 | |||
| 75 | usb_dfu(&mut builder, &mut state, Duration::from_millis(2500), |func| { | ||
| 76 | // You likely don't have to add these function level headers if your USB device is not composite | ||
| 77 | // (i.e. if your device does not expose another interface in addition to DFU) | ||
| 78 | func.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); | ||
| 79 | func.msos_feature(msos::RegistryPropertyFeatureDescriptor::new( | ||
| 80 | "DeviceInterfaceGUIDs", | ||
| 81 | msos::PropertyData::RegMultiSz(DEVICE_INTERFACE_GUIDS), | ||
| 82 | )); | ||
| 83 | }); | ||
| 58 | 84 | ||
| 59 | let mut dev = builder.build(); | 85 | let mut dev = builder.build(); |
| 60 | dev.run().await | 86 | dev.run().await |
diff --git a/examples/boot/application/stm32wl/Cargo.toml b/examples/boot/application/stm32wl/Cargo.toml index f4d7ae712..54331dd69 100644 --- a/examples/boot/application/stm32wl/Cargo.toml +++ b/examples/boot/application/stm32wl/Cargo.toml | |||
| @@ -12,8 +12,8 @@ embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", feature | |||
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" } |
| 14 | 14 | ||
| 15 | defmt = { version = "0.3", optional = true } | 15 | defmt = { version = "1.0.1", optional = true } |
| 16 | defmt-rtt = { version = "0.4", optional = true } | 16 | defmt-rtt = { version = "1.0.0", optional = true } |
| 17 | panic-reset = { version = "0.1.1" } | 17 | panic-reset = { version = "0.1.1" } |
| 18 | embedded-hal = { version = "0.2.6" } | 18 | embedded-hal = { version = "0.2.6" } |
| 19 | 19 | ||
diff --git a/examples/boot/bootloader/nrf/Cargo.toml b/examples/boot/bootloader/nrf/Cargo.toml index 34a0553e3..4c2712718 100644 --- a/examples/boot/bootloader/nrf/Cargo.toml +++ b/examples/boot/bootloader/nrf/Cargo.toml | |||
| @@ -6,8 +6,8 @@ description = "Bootloader for nRF chips" | |||
| 6 | license = "MIT OR Apache-2.0" | 6 | license = "MIT OR Apache-2.0" |
| 7 | 7 | ||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | defmt = { version = "0.3", optional = true } | 9 | defmt = { version = "1.0.1", optional = true } |
| 10 | defmt-rtt = { version = "0.4", optional = true } | 10 | defmt-rtt = { version = "1.0.0", optional = true } |
| 11 | 11 | ||
| 12 | embassy-nrf = { path = "../../../../embassy-nrf", features = [] } | 12 | embassy-nrf = { path = "../../../../embassy-nrf", features = [] } |
| 13 | embassy-boot-nrf = { path = "../../../../embassy-boot-nrf" } | 13 | embassy-boot-nrf = { path = "../../../../embassy-boot-nrf" } |
diff --git a/examples/boot/bootloader/rp/Cargo.toml b/examples/boot/bootloader/rp/Cargo.toml index 7c9c3c779..c57b90793 100644 --- a/examples/boot/bootloader/rp/Cargo.toml +++ b/examples/boot/bootloader/rp/Cargo.toml | |||
| @@ -6,8 +6,8 @@ description = "Example bootloader for RP2040 chips" | |||
| 6 | license = "MIT OR Apache-2.0" | 6 | license = "MIT OR Apache-2.0" |
| 7 | 7 | ||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | defmt = { version = "0.3", optional = true } | 9 | defmt = { version = "1.0.1", optional = true } |
| 10 | defmt-rtt = { version = "0.4", optional = true } | 10 | defmt-rtt = { version = "1.0.0", optional = true } |
| 11 | 11 | ||
| 12 | embassy-rp = { path = "../../../../embassy-rp", features = ["rp2040"] } | 12 | embassy-rp = { path = "../../../../embassy-rp", features = ["rp2040"] } |
| 13 | embassy-boot-rp = { path = "../../../../embassy-boot-rp" } | 13 | embassy-boot-rp = { path = "../../../../embassy-boot-rp" } |
diff --git a/examples/boot/bootloader/stm32-dual-bank/Cargo.toml b/examples/boot/bootloader/stm32-dual-bank/Cargo.toml index 4beb9c61c..a3ca96aec 100644 --- a/examples/boot/bootloader/stm32-dual-bank/Cargo.toml +++ b/examples/boot/bootloader/stm32-dual-bank/Cargo.toml | |||
| @@ -6,8 +6,8 @@ description = "Example bootloader for dual-bank flash STM32 chips" | |||
| 6 | license = "MIT OR Apache-2.0" | 6 | license = "MIT OR Apache-2.0" |
| 7 | 7 | ||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | defmt = { version = "0.3", optional = true } | 9 | defmt = { version = "1.0.1", optional = true } |
| 10 | defmt-rtt = { version = "0.4", optional = true } | 10 | defmt-rtt = { version = "1.0.0", optional = true } |
| 11 | 11 | ||
| 12 | embassy-stm32 = { path = "../../../../embassy-stm32", features = [] } | 12 | embassy-stm32 = { path = "../../../../embassy-stm32", features = [] } |
| 13 | embassy-boot-stm32 = { path = "../../../../embassy-boot-stm32" } | 13 | embassy-boot-stm32 = { path = "../../../../embassy-boot-stm32" } |
diff --git a/examples/boot/bootloader/stm32/Cargo.toml b/examples/boot/bootloader/stm32/Cargo.toml index 9abad8636..bdefa2cb5 100644 --- a/examples/boot/bootloader/stm32/Cargo.toml +++ b/examples/boot/bootloader/stm32/Cargo.toml | |||
| @@ -6,8 +6,8 @@ description = "Example bootloader for STM32 chips" | |||
| 6 | license = "MIT OR Apache-2.0" | 6 | license = "MIT OR Apache-2.0" |
| 7 | 7 | ||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | defmt = { version = "0.3", optional = true } | 9 | defmt = { version = "1.0.1", optional = true } |
| 10 | defmt-rtt = { version = "0.4", optional = true } | 10 | defmt-rtt = { version = "1.0.0", optional = true } |
| 11 | 11 | ||
| 12 | embassy-stm32 = { path = "../../../../embassy-stm32", features = [] } | 12 | embassy-stm32 = { path = "../../../../embassy-stm32", features = [] } |
| 13 | embassy-boot-stm32 = { path = "../../../../embassy-boot-stm32" } | 13 | embassy-boot-stm32 = { path = "../../../../embassy-boot-stm32" } |
diff --git a/examples/boot/bootloader/stm32wb-dfu/Cargo.toml b/examples/boot/bootloader/stm32wb-dfu/Cargo.toml index 01343b86b..389f43641 100644 --- a/examples/boot/bootloader/stm32wb-dfu/Cargo.toml +++ b/examples/boot/bootloader/stm32wb-dfu/Cargo.toml | |||
| @@ -6,8 +6,8 @@ description = "Example USB DFUbootloader for the STM32WB series of chips" | |||
| 6 | license = "MIT OR Apache-2.0" | 6 | license = "MIT OR Apache-2.0" |
| 7 | 7 | ||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | defmt = { version = "0.3", optional = true } | 9 | defmt = { version = "1.0.1", optional = true } |
| 10 | defmt-rtt = { version = "0.4", optional = true } | 10 | defmt-rtt = { version = "1.0.0", optional = true } |
| 11 | 11 | ||
| 12 | embassy-stm32 = { path = "../../../../embassy-stm32", features = [] } | 12 | embassy-stm32 = { path = "../../../../embassy-stm32", features = [] } |
| 13 | embassy-boot-stm32 = { path = "../../../../embassy-boot-stm32" } | 13 | embassy-boot-stm32 = { path = "../../../../embassy-boot-stm32" } |
diff --git a/examples/boot/bootloader/stm32wb-dfu/src/main.rs b/examples/boot/bootloader/stm32wb-dfu/src/main.rs index 28216806e..0b643079f 100644 --- a/examples/boot/bootloader/stm32wb-dfu/src/main.rs +++ b/examples/boot/bootloader/stm32wb-dfu/src/main.rs | |||
| @@ -20,7 +20,9 @@ bind_interrupts!(struct Irqs { | |||
| 20 | USB_LP => usb::InterruptHandler<peripherals::USB>; | 20 | USB_LP => usb::InterruptHandler<peripherals::USB>; |
| 21 | }); | 21 | }); |
| 22 | 22 | ||
| 23 | // This is a randomly generated GUID to allow clients on Windows to find our device | 23 | // This is a randomly generated GUID to allow clients on Windows to find your device. |
| 24 | // | ||
| 25 | // N.B. update to a custom GUID for your own device! | ||
| 24 | const DEVICE_INTERFACE_GUIDS: &[&str] = &["{EAA9A5DC-30BA-44BC-9232-606CDC875321}"]; | 26 | const DEVICE_INTERFACE_GUIDS: &[&str] = &["{EAA9A5DC-30BA-44BC-9232-606CDC875321}"]; |
| 25 | 27 | ||
| 26 | #[entry] | 28 | #[entry] |
| @@ -68,7 +70,8 @@ fn main() -> ! { | |||
| 68 | // We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows. | 70 | // We add MSOS headers so that the device automatically gets assigned the WinUSB driver on Windows. |
| 69 | // Otherwise users need to do this manually using a tool like Zadig. | 71 | // Otherwise users need to do this manually using a tool like Zadig. |
| 70 | // | 72 | // |
| 71 | // It seems it is important for the DFU class that these headers be on the Device level. | 73 | // It seems these always need to be at added at the device level for this to work and for |
| 74 | // composite devices they also need to be added on the function level (as shown later). | ||
| 72 | // | 75 | // |
| 73 | builder.msos_descriptor(msos::windows_version::WIN8_1, 2); | 76 | builder.msos_descriptor(msos::windows_version::WIN8_1, 2); |
| 74 | builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); | 77 | builder.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); |
| @@ -77,7 +80,15 @@ fn main() -> ! { | |||
| 77 | msos::PropertyData::RegMultiSz(DEVICE_INTERFACE_GUIDS), | 80 | msos::PropertyData::RegMultiSz(DEVICE_INTERFACE_GUIDS), |
| 78 | )); | 81 | )); |
| 79 | 82 | ||
| 80 | usb_dfu::<_, _, _, _, 4096>(&mut builder, &mut state); | 83 | usb_dfu::<_, _, _, _, 4096>(&mut builder, &mut state, |func| { |
| 84 | // You likely don't have to add these function level headers if your USB device is not composite | ||
| 85 | // (i.e. if your device does not expose another interface in addition to DFU) | ||
| 86 | func.msos_feature(msos::CompatibleIdFeatureDescriptor::new("WINUSB", "")); | ||
| 87 | func.msos_feature(msos::RegistryPropertyFeatureDescriptor::new( | ||
| 88 | "DeviceInterfaceGUIDs", | ||
| 89 | msos::PropertyData::RegMultiSz(DEVICE_INTERFACE_GUIDS), | ||
| 90 | )); | ||
| 91 | }); | ||
| 81 | 92 | ||
| 82 | let mut dev = builder.build(); | 93 | let mut dev = builder.build(); |
| 83 | embassy_futures::block_on(dev.run()); | 94 | embassy_futures::block_on(dev.run()); |
diff --git a/examples/lpc55s69/Cargo.toml b/examples/lpc55s69/Cargo.toml index f5a6e6995..30ce0b799 100644 --- a/examples/lpc55s69/Cargo.toml +++ b/examples/lpc55s69/Cargo.toml | |||
| @@ -10,12 +10,12 @@ embassy-nxp = { version = "0.1.0", path = "../../embassy-nxp", features = ["rt"] | |||
| 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } | 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } |
| 11 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } | 11 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } |
| 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } |
| 13 | panic-halt = "0.2.0" | 13 | panic-halt = "1.0.0" |
| 14 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 14 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 15 | cortex-m-rt = { version = "0.7.0"} | 15 | cortex-m-rt = { version = "0.7.0"} |
| 16 | defmt = "0.3" | 16 | defmt = "1.0.1" |
| 17 | defmt-rtt = "0.4" | 17 | defmt-rtt = "1.0.0" |
| 18 | panic-probe = { version = "0.3.2", features = ["print-defmt"] } | 18 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 19 | panic-semihosting = "0.6.0" | 19 | panic-semihosting = "0.6.0" |
| 20 | 20 | ||
| 21 | [profile.release] | 21 | [profile.release] |
diff --git a/examples/mimxrt6/Cargo.toml b/examples/mimxrt6/Cargo.toml index b0c56f003..40cc0fb44 100644 --- a/examples/mimxrt6/Cargo.toml +++ b/examples/mimxrt6/Cargo.toml | |||
| @@ -7,8 +7,8 @@ license = "MIT or Apache-2.0" | |||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | cortex-m = { version = "0.7.7", features = ["inline-asm", "critical-section-single-core"] } | 8 | cortex-m = { version = "0.7.7", features = ["inline-asm", "critical-section-single-core"] } |
| 9 | cortex-m-rt = "0.7.3" | 9 | cortex-m-rt = "0.7.3" |
| 10 | defmt = "1.0" | 10 | defmt = "1.0.1" |
| 11 | defmt-rtt = "1.0" | 11 | defmt-rtt = "1.0.0" |
| 12 | 12 | ||
| 13 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 13 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 14 | embassy-futures = { version = "0.1.1", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.1", path = "../../embassy-futures" } |
| @@ -19,8 +19,7 @@ embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | |||
| 19 | embedded-hal-async = "1.0.0" | 19 | embedded-hal-async = "1.0.0" |
| 20 | 20 | ||
| 21 | mimxrt600-fcb = "0.2.2" | 21 | mimxrt600-fcb = "0.2.2" |
| 22 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 22 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 23 | rand = { version = "0.8.5", default-features = false } | ||
| 24 | 23 | ||
| 25 | # cargo build/run | 24 | # cargo build/run |
| 26 | [profile.dev] | 25 | [profile.dev] |
diff --git a/examples/mimxrt6/src/bin/crc.rs b/examples/mimxrt6/src/bin/crc.rs new file mode 100644 index 000000000..005a250e5 --- /dev/null +++ b/examples/mimxrt6/src/bin/crc.rs | |||
| @@ -0,0 +1,175 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | |||
| 4 | extern crate embassy_imxrt_examples; | ||
| 5 | |||
| 6 | use defmt::*; | ||
| 7 | use embassy_executor::Spawner; | ||
| 8 | use embassy_imxrt::crc::{Config, Crc, Polynomial}; | ||
| 9 | use {defmt_rtt as _, panic_probe as _}; | ||
| 10 | |||
| 11 | #[embassy_executor::main] | ||
| 12 | async fn main(_spawner: Spawner) { | ||
| 13 | let mut p = embassy_imxrt::init(Default::default()); | ||
| 14 | let data = b"123456789"; | ||
| 15 | |||
| 16 | info!("Initializing CRC"); | ||
| 17 | |||
| 18 | // CRC-CCITT | ||
| 19 | let mut crc = Crc::new(p.CRC.reborrow(), Default::default()); | ||
| 20 | let output = crc.feed_bytes(data); | ||
| 21 | defmt::assert_eq!(output, 0x29b1); | ||
| 22 | |||
| 23 | // CRC16-ARC | ||
| 24 | let mut crc = Crc::new( | ||
| 25 | p.CRC.reborrow(), | ||
| 26 | Config { | ||
| 27 | polynomial: Polynomial::Crc16, | ||
| 28 | reverse_in: true, | ||
| 29 | reverse_out: true, | ||
| 30 | complement_out: false, | ||
| 31 | seed: 0, | ||
| 32 | ..Default::default() | ||
| 33 | }, | ||
| 34 | ); | ||
| 35 | let output = crc.feed_bytes(data); | ||
| 36 | defmt::assert_eq!(output, 0xbb3d); | ||
| 37 | |||
| 38 | // CRC16-CMS | ||
| 39 | let mut crc = Crc::new( | ||
| 40 | p.CRC.reborrow(), | ||
| 41 | Config { | ||
| 42 | polynomial: Polynomial::Crc16, | ||
| 43 | reverse_in: false, | ||
| 44 | reverse_out: false, | ||
| 45 | complement_out: false, | ||
| 46 | seed: 0xffff, | ||
| 47 | ..Default::default() | ||
| 48 | }, | ||
| 49 | ); | ||
| 50 | let output = crc.feed_bytes(data); | ||
| 51 | defmt::assert_eq!(output, 0xaee7); | ||
| 52 | |||
| 53 | // CRC16-DDS-110 | ||
| 54 | let mut crc = Crc::new( | ||
| 55 | p.CRC.reborrow(), | ||
| 56 | Config { | ||
| 57 | polynomial: Polynomial::Crc16, | ||
| 58 | reverse_in: false, | ||
| 59 | reverse_out: false, | ||
| 60 | complement_out: false, | ||
| 61 | seed: 0x800d, | ||
| 62 | ..Default::default() | ||
| 63 | }, | ||
| 64 | ); | ||
| 65 | let output = crc.feed_bytes(data); | ||
| 66 | defmt::assert_eq!(output, 0x9ecf); | ||
| 67 | |||
| 68 | // CRC16-MAXIM-DOW | ||
| 69 | let mut crc = Crc::new( | ||
| 70 | p.CRC.reborrow(), | ||
| 71 | Config { | ||
| 72 | polynomial: Polynomial::Crc16, | ||
| 73 | reverse_in: true, | ||
| 74 | reverse_out: true, | ||
| 75 | complement_out: true, | ||
| 76 | seed: 0, | ||
| 77 | ..Default::default() | ||
| 78 | }, | ||
| 79 | ); | ||
| 80 | let output = crc.feed_bytes(data); | ||
| 81 | defmt::assert_eq!(output, 0x44c2); | ||
| 82 | |||
| 83 | // CRC16-MODBUS | ||
| 84 | let mut crc = Crc::new( | ||
| 85 | p.CRC.reborrow(), | ||
| 86 | Config { | ||
| 87 | polynomial: Polynomial::Crc16, | ||
| 88 | reverse_in: true, | ||
| 89 | reverse_out: true, | ||
| 90 | complement_out: false, | ||
| 91 | seed: 0xffff, | ||
| 92 | ..Default::default() | ||
| 93 | }, | ||
| 94 | ); | ||
| 95 | let output = crc.feed_bytes(data); | ||
| 96 | defmt::assert_eq!(output, 0x4b37); | ||
| 97 | |||
| 98 | // CRC32-BZIP2 | ||
| 99 | let mut crc = Crc::new( | ||
| 100 | p.CRC.reborrow(), | ||
| 101 | Config { | ||
| 102 | polynomial: Polynomial::Crc32, | ||
| 103 | reverse_in: false, | ||
| 104 | reverse_out: false, | ||
| 105 | complement_out: true, | ||
| 106 | seed: 0xffff_ffff, | ||
| 107 | ..Default::default() | ||
| 108 | }, | ||
| 109 | ); | ||
| 110 | let output = crc.feed_bytes(data); | ||
| 111 | defmt::assert_eq!(output, 0xfc89_1918); | ||
| 112 | |||
| 113 | // CRC32-CKSUM | ||
| 114 | let mut crc = Crc::new( | ||
| 115 | p.CRC.reborrow(), | ||
| 116 | Config { | ||
| 117 | polynomial: Polynomial::Crc32, | ||
| 118 | reverse_in: false, | ||
| 119 | reverse_out: false, | ||
| 120 | complement_out: true, | ||
| 121 | seed: 0, | ||
| 122 | ..Default::default() | ||
| 123 | }, | ||
| 124 | ); | ||
| 125 | let output = crc.feed_bytes(data); | ||
| 126 | defmt::assert_eq!(output, 0x765e_7680); | ||
| 127 | |||
| 128 | // CRC32-ISO-HDLC | ||
| 129 | let mut crc = Crc::new( | ||
| 130 | p.CRC.reborrow(), | ||
| 131 | Config { | ||
| 132 | polynomial: Polynomial::Crc32, | ||
| 133 | reverse_in: true, | ||
| 134 | reverse_out: true, | ||
| 135 | complement_out: true, | ||
| 136 | seed: 0xffff_ffff, | ||
| 137 | ..Default::default() | ||
| 138 | }, | ||
| 139 | ); | ||
| 140 | let output = crc.feed_bytes(data); | ||
| 141 | defmt::assert_eq!(output, 0xcbf4_3926); | ||
| 142 | |||
| 143 | // CRC32-JAMCRC | ||
| 144 | let mut crc = Crc::new( | ||
| 145 | p.CRC.reborrow(), | ||
| 146 | Config { | ||
| 147 | polynomial: Polynomial::Crc32, | ||
| 148 | reverse_in: true, | ||
| 149 | reverse_out: true, | ||
| 150 | complement_out: false, | ||
| 151 | seed: 0xffff_ffff, | ||
| 152 | ..Default::default() | ||
| 153 | }, | ||
| 154 | ); | ||
| 155 | let output = crc.feed_bytes(data); | ||
| 156 | defmt::assert_eq!(output, 0x340b_c6d9); | ||
| 157 | |||
| 158 | // CRC32-MPEG-2 | ||
| 159 | let mut crc = Crc::new( | ||
| 160 | p.CRC.reborrow(), | ||
| 161 | Config { | ||
| 162 | polynomial: Polynomial::Crc32, | ||
| 163 | reverse_in: false, | ||
| 164 | reverse_out: false, | ||
| 165 | complement_out: false, | ||
| 166 | seed: 0xffff_ffff, | ||
| 167 | ..Default::default() | ||
| 168 | }, | ||
| 169 | ); | ||
| 170 | let output = crc.feed_bytes(data); | ||
| 171 | defmt::assert_eq!(output, 0x0376_e6e7); | ||
| 172 | |||
| 173 | info!("end program"); | ||
| 174 | cortex_m::asm::bkpt(); | ||
| 175 | } | ||
diff --git a/examples/mimxrt6/src/bin/rng.rs b/examples/mimxrt6/src/bin/rng.rs new file mode 100644 index 000000000..9468dd109 --- /dev/null +++ b/examples/mimxrt6/src/bin/rng.rs | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | |||
| 4 | extern crate embassy_imxrt_examples; | ||
| 5 | |||
| 6 | use defmt::*; | ||
| 7 | use embassy_executor::Spawner; | ||
| 8 | use embassy_imxrt::rng::Rng; | ||
| 9 | use embassy_imxrt::{bind_interrupts, peripherals, rng}; | ||
| 10 | use {defmt_rtt as _, panic_probe as _}; | ||
| 11 | |||
| 12 | bind_interrupts!(struct Irqs { | ||
| 13 | RNG => rng::InterruptHandler<peripherals::RNG>; | ||
| 14 | }); | ||
| 15 | |||
| 16 | #[embassy_executor::main] | ||
| 17 | async fn main(_spawner: Spawner) { | ||
| 18 | let p = embassy_imxrt::init(Default::default()); | ||
| 19 | |||
| 20 | info!("Initializing RNG"); | ||
| 21 | let mut rng = Rng::new(p.RNG, Irqs); | ||
| 22 | let mut buf = [0u8; 65]; | ||
| 23 | |||
| 24 | // Async interface | ||
| 25 | unwrap!(rng.async_fill_bytes(&mut buf).await); | ||
| 26 | info!("random bytes: {:02x}", buf); | ||
| 27 | |||
| 28 | // RngCore interface | ||
| 29 | let mut random_bytes = [0; 16]; | ||
| 30 | |||
| 31 | let random_u32 = rng.blocking_next_u32(); | ||
| 32 | let random_u64 = rng.blocking_next_u64(); | ||
| 33 | |||
| 34 | rng.blocking_fill_bytes(&mut random_bytes); | ||
| 35 | |||
| 36 | info!("random_u32 {}", random_u32); | ||
| 37 | info!("random_u64 {}", random_u64); | ||
| 38 | info!("random_bytes {}", random_bytes); | ||
| 39 | } | ||
diff --git a/examples/mimxrt6/src/bin/uart-async.rs b/examples/mimxrt6/src/bin/uart-async.rs new file mode 100644 index 000000000..58e31f379 --- /dev/null +++ b/examples/mimxrt6/src/bin/uart-async.rs | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | |||
| 4 | extern crate embassy_imxrt_examples; | ||
| 5 | |||
| 6 | use defmt::info; | ||
| 7 | use embassy_executor::Spawner; | ||
| 8 | use embassy_imxrt::flexcomm::uart::{self, Async, Uart}; | ||
| 9 | use embassy_imxrt::{bind_interrupts, peripherals}; | ||
| 10 | use embassy_time::Timer; | ||
| 11 | use {defmt_rtt as _, panic_probe as _}; | ||
| 12 | |||
| 13 | bind_interrupts!(struct Irqs { | ||
| 14 | FLEXCOMM2 => uart::InterruptHandler<peripherals::FLEXCOMM2>; | ||
| 15 | FLEXCOMM4 => uart::InterruptHandler<peripherals::FLEXCOMM4>; | ||
| 16 | }); | ||
| 17 | |||
| 18 | const BUFLEN: usize = 16; | ||
| 19 | |||
| 20 | #[embassy_executor::task] | ||
| 21 | async fn usart4_task(mut uart: Uart<'static, Async>) { | ||
| 22 | info!("RX Task"); | ||
| 23 | |||
| 24 | loop { | ||
| 25 | let mut rx_buf = [0; BUFLEN]; | ||
| 26 | uart.read(&mut rx_buf).await.unwrap(); | ||
| 27 | info!("usart4: rx_buf {:02x}", rx_buf); | ||
| 28 | |||
| 29 | Timer::after_millis(10).await; | ||
| 30 | |||
| 31 | let tx_buf = [0xaa; BUFLEN]; | ||
| 32 | uart.write(&tx_buf).await.unwrap(); | ||
| 33 | info!("usart4: tx_buf {:02x}", tx_buf); | ||
| 34 | } | ||
| 35 | } | ||
| 36 | |||
| 37 | #[embassy_executor::task] | ||
| 38 | async fn usart2_task(mut uart: Uart<'static, Async>) { | ||
| 39 | info!("TX Task"); | ||
| 40 | |||
| 41 | loop { | ||
| 42 | let tx_buf = [0x55; BUFLEN]; | ||
| 43 | uart.write(&tx_buf).await.unwrap(); | ||
| 44 | info!("usart2: tx_buf {:02x}", tx_buf); | ||
| 45 | |||
| 46 | Timer::after_millis(10).await; | ||
| 47 | |||
| 48 | let mut rx_buf = [0x00; BUFLEN]; | ||
| 49 | uart.read(&mut rx_buf).await.unwrap(); | ||
| 50 | info!("usart2: rx_buf {:02x}", rx_buf); | ||
| 51 | } | ||
| 52 | } | ||
| 53 | |||
| 54 | #[embassy_executor::main] | ||
| 55 | async fn main(spawner: Spawner) { | ||
| 56 | let p = embassy_imxrt::init(Default::default()); | ||
| 57 | |||
| 58 | info!("UART test start"); | ||
| 59 | |||
| 60 | let usart4 = Uart::new_with_rtscts( | ||
| 61 | p.FLEXCOMM4, | ||
| 62 | p.PIO0_29, | ||
| 63 | p.PIO0_30, | ||
| 64 | p.PIO1_0, | ||
| 65 | p.PIO0_31, | ||
| 66 | Irqs, | ||
| 67 | p.DMA0_CH9, | ||
| 68 | p.DMA0_CH8, | ||
| 69 | Default::default(), | ||
| 70 | ) | ||
| 71 | .unwrap(); | ||
| 72 | spawner.must_spawn(usart4_task(usart4)); | ||
| 73 | |||
| 74 | let usart2 = Uart::new_with_rtscts( | ||
| 75 | p.FLEXCOMM2, | ||
| 76 | p.PIO0_15, | ||
| 77 | p.PIO0_16, | ||
| 78 | p.PIO0_18, | ||
| 79 | p.PIO0_17, | ||
| 80 | Irqs, | ||
| 81 | p.DMA0_CH5, | ||
| 82 | p.DMA0_CH4, | ||
| 83 | Default::default(), | ||
| 84 | ) | ||
| 85 | .unwrap(); | ||
| 86 | spawner.must_spawn(usart2_task(usart2)); | ||
| 87 | } | ||
diff --git a/examples/mimxrt6/src/bin/uart.rs b/examples/mimxrt6/src/bin/uart.rs new file mode 100644 index 000000000..d6a75f85d --- /dev/null +++ b/examples/mimxrt6/src/bin/uart.rs | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | |||
| 4 | extern crate embassy_imxrt_examples; | ||
| 5 | |||
| 6 | use defmt::info; | ||
| 7 | use embassy_executor::Spawner; | ||
| 8 | use embassy_imxrt::flexcomm::uart::{Blocking, Uart, UartRx, UartTx}; | ||
| 9 | use embassy_time::Timer; | ||
| 10 | use {defmt_rtt as _, panic_probe as _}; | ||
| 11 | |||
| 12 | #[embassy_executor::task] | ||
| 13 | async fn usart4_task(mut uart: UartRx<'static, Blocking>) { | ||
| 14 | info!("RX Task"); | ||
| 15 | |||
| 16 | loop { | ||
| 17 | let mut buf = [0; 8]; | ||
| 18 | |||
| 19 | Timer::after_millis(10).await; | ||
| 20 | |||
| 21 | uart.blocking_read(&mut buf).unwrap(); | ||
| 22 | |||
| 23 | let s = core::str::from_utf8(&buf).unwrap(); | ||
| 24 | |||
| 25 | info!("Received '{}'", s); | ||
| 26 | } | ||
| 27 | } | ||
| 28 | |||
| 29 | #[embassy_executor::task] | ||
| 30 | async fn usart2_task(mut uart: UartTx<'static, Blocking>) { | ||
| 31 | info!("TX Task"); | ||
| 32 | |||
| 33 | loop { | ||
| 34 | let buf = "Testing\0".as_bytes(); | ||
| 35 | |||
| 36 | uart.blocking_write(buf).unwrap(); | ||
| 37 | |||
| 38 | Timer::after_millis(10).await; | ||
| 39 | } | ||
| 40 | } | ||
| 41 | |||
| 42 | #[embassy_executor::main] | ||
| 43 | async fn main(spawner: Spawner) { | ||
| 44 | let p = embassy_imxrt::init(Default::default()); | ||
| 45 | |||
| 46 | info!("UART test start"); | ||
| 47 | |||
| 48 | let usart4 = Uart::new_blocking(p.FLEXCOMM4, p.PIO0_29, p.PIO0_30, Default::default()).unwrap(); | ||
| 49 | |||
| 50 | let (_, usart4) = usart4.split(); | ||
| 51 | spawner.must_spawn(usart4_task(usart4)); | ||
| 52 | |||
| 53 | let usart2 = UartTx::new_blocking(p.FLEXCOMM2, p.PIO0_15, Default::default()).unwrap(); | ||
| 54 | spawner.must_spawn(usart2_task(usart2)); | ||
| 55 | } | ||
diff --git a/examples/mspm0c1104/Cargo.toml b/examples/mspm0c1104/Cargo.toml index ba64a578d..7d419af51 100644 --- a/examples/mspm0c1104/Cargo.toml +++ b/examples/mspm0c1104/Cargo.toml | |||
| @@ -5,16 +5,16 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0c110x", "defmt", "rt", "time-driver-any"] } | 8 | embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0c1104dgs20", "defmt", "rt", "time-driver-any"] } |
| 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } |
| 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } |
| 12 | panic-halt = "0.2.0" | 12 | panic-halt = "1.0.0" |
| 13 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 13 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 14 | cortex-m-rt = { version = "0.7.0"} | 14 | cortex-m-rt = { version = "0.7.0"} |
| 15 | defmt = "0.3" | 15 | defmt = "1.0.1" |
| 16 | defmt-rtt = "0.4" | 16 | defmt-rtt = "1.0.0" |
| 17 | panic-probe = { version = "0.3.2", features = ["print-defmt"] } | 17 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 18 | panic-semihosting = "0.6.0" | 18 | panic-semihosting = "0.6.0" |
| 19 | 19 | ||
| 20 | # The chip only has 1KB of ram, so we must optimize binaries regardless | 20 | # The chip only has 1KB of ram, so we must optimize binaries regardless |
diff --git a/examples/mspm0c1104/README.md b/examples/mspm0c1104/README.md index e5c9f961d..86b6c3918 100644 --- a/examples/mspm0c1104/README.md +++ b/examples/mspm0c1104/README.md | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Examples for MSPM0C110x family | 1 | # Examples for MSPM0C1104 |
| 2 | 2 | ||
| 3 | Run individual examples with | 3 | Run individual examples with |
| 4 | ``` | 4 | ``` |
| @@ -15,7 +15,7 @@ A large number of the examples are written for the [LP-MSPM0C1104](https://www.t | |||
| 15 | You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. | 15 | You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. |
| 16 | 16 | ||
| 17 | * [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for C1104 it should be `probe-rs run --chip MSPM0C1104`. (use `probe-rs chip list` to find your chip) | 17 | * [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for C1104 it should be `probe-rs run --chip MSPM0C1104`. (use `probe-rs chip list` to find your chip) |
| 18 | * [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for C1104 it should be `mspm0c1104`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. | 18 | * [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For the LP-MSPM0C1104 it should be `mspm0c1104dgs20`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. |
| 19 | * [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. | 19 | * [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. |
| 20 | * [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic | 20 | * [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic |
| 21 | 21 | ||
diff --git a/examples/mspm0g3507/Cargo.toml b/examples/mspm0g3507/Cargo.toml index f6fed091d..5a02b7249 100644 --- a/examples/mspm0g3507/Cargo.toml +++ b/examples/mspm0g3507/Cargo.toml | |||
| @@ -5,16 +5,16 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0g350x", "defmt", "rt", "time-driver-any"] } | 8 | embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0g3507pm", "defmt", "rt", "time-driver-any"] } |
| 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } |
| 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } |
| 12 | panic-halt = "0.2.0" | 12 | panic-halt = "1.0.0" |
| 13 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 13 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 14 | cortex-m-rt = { version = "0.7.0"} | 14 | cortex-m-rt = { version = "0.7.0"} |
| 15 | defmt = "0.3" | 15 | defmt = "1.0.1" |
| 16 | defmt-rtt = "0.4" | 16 | defmt-rtt = "1.0.0" |
| 17 | panic-probe = { version = "0.3.2", features = ["print-defmt"] } | 17 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 18 | panic-semihosting = "0.6.0" | 18 | panic-semihosting = "0.6.0" |
| 19 | 19 | ||
| 20 | [profile.release] | 20 | [profile.release] |
diff --git a/examples/mspm0g3507/README.md b/examples/mspm0g3507/README.md index 5e8a83212..be91dc5a0 100644 --- a/examples/mspm0g3507/README.md +++ b/examples/mspm0g3507/README.md | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Examples for MSPM0C350x family | 1 | # Examples for MSPM0M3507 |
| 2 | 2 | ||
| 3 | Run individual examples with | 3 | Run individual examples with |
| 4 | ``` | 4 | ``` |
| @@ -15,7 +15,7 @@ A large number of the examples are written for the [LP-MSPM0G3507](https://www.t | |||
| 15 | You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. | 15 | You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. |
| 16 | 16 | ||
| 17 | * [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for G3507 it should be `probe-rs run --chip MSPM0G3507`. (use `probe-rs chip list` to find your chip) | 17 | * [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for G3507 it should be `probe-rs run --chip MSPM0G3507`. (use `probe-rs chip list` to find your chip) |
| 18 | * [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for G3507 it should be `mspm0g3507`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. | 18 | * [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For the LP-MSPM0G3507 it should be `mspm0g3507pm`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. |
| 19 | * [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. | 19 | * [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. |
| 20 | * [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic | 20 | * [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic |
| 21 | 21 | ||
diff --git a/examples/mspm0g3519/Cargo.toml b/examples/mspm0g3519/Cargo.toml index 1662e1f8d..fc647a4ce 100644 --- a/examples/mspm0g3519/Cargo.toml +++ b/examples/mspm0g3519/Cargo.toml | |||
| @@ -5,16 +5,16 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0g351x", "defmt", "rt", "time-driver-any"] } | 8 | embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0g3519pz", "defmt", "rt", "time-driver-any"] } |
| 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } |
| 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } |
| 12 | panic-halt = "0.2.0" | 12 | panic-halt = "1.0.0" |
| 13 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 13 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 14 | cortex-m-rt = { version = "0.7.0"} | 14 | cortex-m-rt = { version = "0.7.0"} |
| 15 | defmt = "0.3" | 15 | defmt = "1.0.1" |
| 16 | defmt-rtt = "0.4" | 16 | defmt-rtt = "1.0.0" |
| 17 | panic-probe = { version = "0.3.2", features = ["print-defmt"] } | 17 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 18 | panic-semihosting = "0.6.0" | 18 | panic-semihosting = "0.6.0" |
| 19 | 19 | ||
| 20 | [profile.release] | 20 | [profile.release] |
diff --git a/examples/mspm0g3519/README.md b/examples/mspm0g3519/README.md index 5034b1913..c392c9e25 100644 --- a/examples/mspm0g3519/README.md +++ b/examples/mspm0g3519/README.md | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Examples for MSPM0G351x family | 1 | # Examples for MSPM0G3519 |
| 2 | 2 | ||
| 3 | Run individual examples with | 3 | Run individual examples with |
| 4 | ``` | 4 | ``` |
| @@ -15,7 +15,7 @@ A large number of the examples are written for the [LP-MSPM0G3519](https://www.t | |||
| 15 | You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. | 15 | You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. |
| 16 | 16 | ||
| 17 | * [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for G3519 it should be `probe-rs run --chip MSPM0G3519`. (use `probe-rs chip list` to find your chip) | 17 | * [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for G3519 it should be `probe-rs run --chip MSPM0G3519`. (use `probe-rs chip list` to find your chip) |
| 18 | * [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for G3519 it should be `mspm0g3519`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. | 18 | * [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For the LP-MSPM0G3519 it should be `mspm0g3519pz`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. |
| 19 | * [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. | 19 | * [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. |
| 20 | * [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic | 20 | * [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic |
| 21 | 21 | ||
diff --git a/examples/mspm0l1306/Cargo.toml b/examples/mspm0l1306/Cargo.toml index 609b3f205..6f2f33b1e 100644 --- a/examples/mspm0l1306/Cargo.toml +++ b/examples/mspm0l1306/Cargo.toml | |||
| @@ -5,16 +5,16 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0l130x", "defmt", "rt", "time-driver-any"] } | 8 | embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0l1306rhb", "defmt", "rt", "time-driver-any"] } |
| 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } |
| 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } |
| 12 | panic-halt = "0.2.0" | 12 | panic-halt = "1.0.0" |
| 13 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 13 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 14 | cortex-m-rt = { version = "0.7.0"} | 14 | cortex-m-rt = { version = "0.7.0"} |
| 15 | defmt = "0.3" | 15 | defmt = "1.0.1" |
| 16 | defmt-rtt = "0.4" | 16 | defmt-rtt = "1.0.0" |
| 17 | panic-probe = { version = "0.3.2", features = ["print-defmt"] } | 17 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 18 | panic-semihosting = "0.6.0" | 18 | panic-semihosting = "0.6.0" |
| 19 | 19 | ||
| 20 | [profile.release] | 20 | [profile.release] |
diff --git a/examples/mspm0l1306/README.md b/examples/mspm0l1306/README.md index 5a55d721e..4d698e0fa 100644 --- a/examples/mspm0l1306/README.md +++ b/examples/mspm0l1306/README.md | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Examples for MSPM0L130x family | 1 | # Examples for MSPM0L1306 |
| 2 | 2 | ||
| 3 | Run individual examples with | 3 | Run individual examples with |
| 4 | ``` | 4 | ``` |
| @@ -15,7 +15,7 @@ A large number of the examples are written for the [LP-MSPM0L1306](https://www.t | |||
| 15 | You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. | 15 | You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. |
| 16 | 16 | ||
| 17 | * [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for L1306 it should be `probe-rs run --chip MSPM0L1306`. (use `probe-rs chip list` to find your chip) | 17 | * [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for L1306 it should be `probe-rs run --chip MSPM0L1306`. (use `probe-rs chip list` to find your chip) |
| 18 | * [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for L1306 it should be `mspm0l1306`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. | 18 | * [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For the LP-MSPM0L1306 it should be `mspm0l1306rhb`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. |
| 19 | * [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. | 19 | * [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. |
| 20 | * [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic | 20 | * [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic |
| 21 | 21 | ||
diff --git a/examples/mspm0l2228/Cargo.toml b/examples/mspm0l2228/Cargo.toml index bbca011a1..a68b5bfe9 100644 --- a/examples/mspm0l2228/Cargo.toml +++ b/examples/mspm0l2228/Cargo.toml | |||
| @@ -5,16 +5,16 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0l222x", "defmt", "rt", "time-driver-any"] } | 8 | embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0l2228pn", "defmt", "rt", "time-driver-any"] } |
| 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } |
| 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } |
| 12 | panic-halt = "0.2.0" | 12 | panic-halt = "1.0.0" |
| 13 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 13 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 14 | cortex-m-rt = { version = "0.7.0"} | 14 | cortex-m-rt = { version = "0.7.0"} |
| 15 | defmt = "0.3" | 15 | defmt = "1.0.1" |
| 16 | defmt-rtt = "0.4" | 16 | defmt-rtt = "1.0.0" |
| 17 | panic-probe = { version = "0.3.2", features = ["print-defmt"] } | 17 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 18 | panic-semihosting = "0.6.0" | 18 | panic-semihosting = "0.6.0" |
| 19 | 19 | ||
| 20 | [profile.release] | 20 | [profile.release] |
diff --git a/examples/mspm0l2228/README.md b/examples/mspm0l2228/README.md index c73fa13b6..191022258 100644 --- a/examples/mspm0l2228/README.md +++ b/examples/mspm0l2228/README.md | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Examples for MSPM0L222x family | 1 | # Examples for MSPM0L2228 |
| 2 | 2 | ||
| 3 | Run individual examples with | 3 | Run individual examples with |
| 4 | ``` | 4 | ``` |
| @@ -15,7 +15,7 @@ A large number of the examples are written for the [LP-MSPM0L2228](https://www.t | |||
| 15 | You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. | 15 | You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. |
| 16 | 16 | ||
| 17 | * [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for L2228 it should be `probe-rs run --chip MSPM0L2228`. (use `probe-rs chip list` to find your chip) | 17 | * [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for L2228 it should be `probe-rs run --chip MSPM0L2228`. (use `probe-rs chip list` to find your chip) |
| 18 | * [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for L2228 it should be `mspm0l2228`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. | 18 | * [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for LP-MSPM0L2228 it should be `mspm0l2228pn`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. |
| 19 | * [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. | 19 | * [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. |
| 20 | * [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic | 20 | * [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic |
| 21 | 21 | ||
diff --git a/examples/nrf-rtos-trace/Cargo.toml b/examples/nrf-rtos-trace/Cargo.toml index af12212cd..dcbaf87f8 100644 --- a/examples/nrf-rtos-trace/Cargo.toml +++ b/examples/nrf-rtos-trace/Cargo.toml | |||
| @@ -22,8 +22,7 @@ embassy-nrf = { version = "0.3.1", path = "../../embassy-nrf", features = ["nrf5 | |||
| 22 | 22 | ||
| 23 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 23 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 24 | cortex-m-rt = "0.7.0" | 24 | cortex-m-rt = "0.7.0" |
| 25 | panic-probe = { version = "0.3" } | 25 | panic-probe = "1.0.0" |
| 26 | rand = { version = "0.8.4", default-features = false } | ||
| 27 | serde = { version = "1.0.136", default-features = false } | 26 | serde = { version = "1.0.136", default-features = false } |
| 28 | rtos-trace = "0.1.3" | 27 | rtos-trace = "0.1.3" |
| 29 | systemview-target = { version = "0.1.2", features = ["callbacks-app", "callbacks-os", "log", "cortex-m"] } | 28 | systemview-target = { version = "0.1.2", features = ["callbacks-app", "callbacks-os", "log", "cortex-m"] } |
diff --git a/examples/nrf51/Cargo.toml b/examples/nrf51/Cargo.toml index 97b5b924a..91f78737f 100644 --- a/examples/nrf51/Cargo.toml +++ b/examples/nrf51/Cargo.toml | |||
| @@ -9,12 +9,12 @@ embassy-executor = { version = "0.7.0", path = "../../embassy-executor", feature | |||
| 9 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 9 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 10 | embassy-nrf = { version = "0.3.1", path = "../../embassy-nrf", features = ["defmt", "nrf51", "gpiote", "time-driver-rtc1", "unstable-pac", "time", "rt"] } | 10 | embassy-nrf = { version = "0.3.1", path = "../../embassy-nrf", features = ["defmt", "nrf51", "gpiote", "time-driver-rtc1", "unstable-pac", "time", "rt"] } |
| 11 | 11 | ||
| 12 | defmt = "0.3" | 12 | defmt = "1.0.1" |
| 13 | defmt-rtt = "0.4" | 13 | defmt-rtt = "1.0.0" |
| 14 | 14 | ||
| 15 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 15 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 16 | cortex-m-rt = "0.7" | 16 | cortex-m-rt = "0.7" |
| 17 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 17 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 18 | 18 | ||
| 19 | [profile.release] | 19 | [profile.release] |
| 20 | debug = 2 | 20 | debug = 2 |
diff --git a/examples/nrf52810/Cargo.toml b/examples/nrf52810/Cargo.toml index cd59b86c3..5373278c1 100644 --- a/examples/nrf52810/Cargo.toml +++ b/examples/nrf52810/Cargo.toml | |||
| @@ -11,14 +11,14 @@ embassy-executor = { version = "0.7.0", path = "../../embassy-executor", feature | |||
| 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 12 | embassy-nrf = { version = "0.3.1", path = "../../embassy-nrf", features = ["defmt", "nrf52810", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 12 | embassy-nrf = { version = "0.3.1", path = "../../embassy-nrf", features = ["defmt", "nrf52810", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 13 | 13 | ||
| 14 | defmt = "0.3" | 14 | defmt = "1.0.1" |
| 15 | defmt-rtt = "0.4" | 15 | defmt-rtt = "1.0.0" |
| 16 | 16 | ||
| 17 | fixed = "1.10.0" | 17 | fixed = "1.10.0" |
| 18 | static_cell = { version = "2" } | 18 | static_cell = { version = "2" } |
| 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 20 | cortex-m-rt = "0.7.0" | 20 | cortex-m-rt = "0.7.0" |
| 21 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 21 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 22 | 22 | ||
| 23 | [profile.release] | 23 | [profile.release] |
| 24 | debug = 2 | 24 | debug = 2 |
diff --git a/examples/nrf52840-rtic/Cargo.toml b/examples/nrf52840-rtic/Cargo.toml index ac3d2006c..2eef012b7 100644 --- a/examples/nrf52840-rtic/Cargo.toml +++ b/examples/nrf52840-rtic/Cargo.toml | |||
| @@ -13,12 +13,12 @@ embassy-time = { version = "0.4.0", path = "../../embassy-time", features = [ "d | |||
| 13 | embassy-time-queue-utils = { version = "0.1", path = "../../embassy-time-queue-utils", features = ["generic-queue-8"] } | 13 | embassy-time-queue-utils = { version = "0.1", path = "../../embassy-time-queue-utils", features = ["generic-queue-8"] } |
| 14 | embassy-nrf = { version = "0.3.1", path = "../../embassy-nrf", features = [ "defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 14 | embassy-nrf = { version = "0.3.1", path = "../../embassy-nrf", features = [ "defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 15 | 15 | ||
| 16 | defmt = "0.3" | 16 | defmt = "1.0.1" |
| 17 | defmt-rtt = "0.4" | 17 | defmt-rtt = "1.0.0" |
| 18 | 18 | ||
| 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 20 | cortex-m-rt = "0.7.0" | 20 | cortex-m-rt = "0.7.0" |
| 21 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 21 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 22 | 22 | ||
| 23 | [profile.release] | 23 | [profile.release] |
| 24 | debug = 2 | 24 | debug = 2 |
diff --git a/examples/nrf52840/Cargo.toml b/examples/nrf52840/Cargo.toml index 902193f3a..92127a8b0 100644 --- a/examples/nrf52840/Cargo.toml +++ b/examples/nrf52840/Cargo.toml | |||
| @@ -17,15 +17,15 @@ embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } | |||
| 17 | embassy-net-esp-hosted = { version = "0.2.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] } | 17 | embassy-net-esp-hosted = { version = "0.2.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] } |
| 18 | embassy-net-enc28j60 = { version = "0.2.0", path = "../../embassy-net-enc28j60", features = ["defmt"] } | 18 | embassy-net-enc28j60 = { version = "0.2.0", path = "../../embassy-net-enc28j60", features = ["defmt"] } |
| 19 | 19 | ||
| 20 | defmt = "0.3" | 20 | defmt = "1.0.1" |
| 21 | defmt-rtt = "0.4" | 21 | defmt-rtt = "1.0.0" |
| 22 | 22 | ||
| 23 | fixed = "1.10.0" | 23 | fixed = "1.10.0" |
| 24 | static_cell = { version = "2" } | 24 | static_cell = { version = "2" } |
| 25 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 25 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 26 | cortex-m-rt = "0.7.0" | 26 | cortex-m-rt = "0.7.0" |
| 27 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 27 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 28 | rand = { version = "0.8.4", default-features = false } | 28 | rand = { version = "0.9.0", default-features = false } |
| 29 | embedded-storage = "0.3.1" | 29 | embedded-storage = "0.3.1" |
| 30 | usbd-hid = "0.8.1" | 30 | usbd-hid = "0.8.1" |
| 31 | serde = { version = "1.0.136", default-features = false } | 31 | serde = { version = "1.0.136", default-features = false } |
diff --git a/examples/nrf52840/src/bin/rng.rs b/examples/nrf52840/src/bin/rng.rs index 326054c9a..f32d17cd9 100644..100755 --- a/examples/nrf52840/src/bin/rng.rs +++ b/examples/nrf52840/src/bin/rng.rs | |||
| @@ -22,7 +22,7 @@ async fn main(_spawner: Spawner) { | |||
| 22 | defmt::info!("Some random bytes: {:?}", bytes); | 22 | defmt::info!("Some random bytes: {:?}", bytes); |
| 23 | 23 | ||
| 24 | // Sync API with `rand` | 24 | // Sync API with `rand` |
| 25 | defmt::info!("A random number from 1 to 10: {:?}", rng.gen_range(1..=10)); | 25 | defmt::info!("A random number from 1 to 10: {:?}", rng.random_range(1..=10)); |
| 26 | 26 | ||
| 27 | let mut bytes = [0; 1024]; | 27 | let mut bytes = [0; 1024]; |
| 28 | rng.fill_bytes(&mut bytes).await; | 28 | rng.fill_bytes(&mut bytes).await; |
diff --git a/examples/nrf5340/Cargo.toml b/examples/nrf5340/Cargo.toml index 459c43221..42d7766b7 100644 --- a/examples/nrf5340/Cargo.toml +++ b/examples/nrf5340/Cargo.toml | |||
| @@ -14,14 +14,13 @@ embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defm | |||
| 14 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embedded-io-async = { version = "0.6.1" } | 15 | embedded-io-async = { version = "0.6.1" } |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "1.0.1" |
| 18 | defmt-rtt = "0.4" | 18 | defmt-rtt = "1.0.0" |
| 19 | 19 | ||
| 20 | static_cell = "2" | 20 | static_cell = "2" |
| 21 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 21 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 22 | cortex-m-rt = "0.7.0" | 22 | cortex-m-rt = "0.7.0" |
| 23 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 23 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 24 | rand = { version = "0.8.4", default-features = false } | ||
| 25 | embedded-storage = "0.3.1" | 24 | embedded-storage = "0.3.1" |
| 26 | usbd-hid = "0.8.1" | 25 | usbd-hid = "0.8.1" |
| 27 | serde = { version = "1.0.136", default-features = false } | 26 | serde = { version = "1.0.136", default-features = false } |
diff --git a/examples/nrf54l15/Cargo.toml b/examples/nrf54l15/Cargo.toml index 8848065d8..4b229d06d 100644 --- a/examples/nrf54l15/Cargo.toml +++ b/examples/nrf54l15/Cargo.toml | |||
| @@ -9,9 +9,9 @@ embassy-executor = { version = "0.7.0", path = "../../embassy-executor", feature | |||
| 9 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 9 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 10 | embassy-nrf = { version = "0.3.1", path = "../../embassy-nrf", features = ["defmt", "nrf54l15-app-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 10 | embassy-nrf = { version = "0.3.1", path = "../../embassy-nrf", features = ["defmt", "nrf54l15-app-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 11 | 11 | ||
| 12 | defmt = "0.3" | 12 | defmt = "1.0.1" |
| 13 | defmt-rtt = "0.4" | 13 | defmt-rtt = "1.0.0" |
| 14 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 14 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 15 | 15 | ||
| 16 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 16 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 17 | cortex-m-rt = "0.7.0" | 17 | cortex-m-rt = "0.7.0" |
diff --git a/examples/nrf9151/ns/Cargo.toml b/examples/nrf9151/ns/Cargo.toml index 03f38fd63..a083aa5e7 100644 --- a/examples/nrf9151/ns/Cargo.toml +++ b/examples/nrf9151/ns/Cargo.toml | |||
| @@ -9,12 +9,12 @@ embassy-executor = { version = "0.7.0", path = "../../../embassy-executor", feat | |||
| 9 | embassy-time = { version = "0.4.0", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 9 | embassy-time = { version = "0.4.0", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 10 | embassy-nrf = { version = "0.3.1", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-ns", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 10 | embassy-nrf = { version = "0.3.1", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-ns", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 11 | 11 | ||
| 12 | defmt = "0.3" | 12 | defmt = "1.0.1" |
| 13 | defmt-rtt = "0.4" | 13 | defmt-rtt = "1.0.0" |
| 14 | 14 | ||
| 15 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 15 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 16 | cortex-m-rt = "0.7.0" | 16 | cortex-m-rt = "0.7.0" |
| 17 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 17 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 18 | 18 | ||
| 19 | [profile.release] | 19 | [profile.release] |
| 20 | debug = 2 | 20 | debug = 2 |
diff --git a/examples/nrf9151/s/Cargo.toml b/examples/nrf9151/s/Cargo.toml index ba88f6da3..ae98631ef 100644 --- a/examples/nrf9151/s/Cargo.toml +++ b/examples/nrf9151/s/Cargo.toml | |||
| @@ -9,12 +9,12 @@ embassy-executor = { version = "0.7.0", path = "../../../embassy-executor", feat | |||
| 9 | embassy-time = { version = "0.4.0", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 9 | embassy-time = { version = "0.4.0", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 10 | embassy-nrf = { version = "0.3.1", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 10 | embassy-nrf = { version = "0.3.1", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 11 | 11 | ||
| 12 | defmt = "0.3" | 12 | defmt = "1.0.1" |
| 13 | defmt-rtt = "0.4" | 13 | defmt-rtt = "1.0.0" |
| 14 | 14 | ||
| 15 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 15 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 16 | cortex-m-rt = "0.7.0" | 16 | cortex-m-rt = "0.7.0" |
| 17 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 17 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 18 | 18 | ||
| 19 | [profile.release] | 19 | [profile.release] |
| 20 | debug = 2 | 20 | debug = 2 |
diff --git a/examples/nrf9160/Cargo.toml b/examples/nrf9160/Cargo.toml index a720f2d61..25aedf624 100644 --- a/examples/nrf9160/Cargo.toml +++ b/examples/nrf9160/Cargo.toml | |||
| @@ -11,13 +11,13 @@ embassy-nrf = { version = "0.3.1", path = "../../embassy-nrf", features = ["defm | |||
| 11 | embassy-net-nrf91 = { version = "0.1.0", path = "../../embassy-net-nrf91", features = ["defmt"] } | 11 | embassy-net-nrf91 = { version = "0.1.0", path = "../../embassy-net-nrf91", features = ["defmt"] } |
| 12 | embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "proto-ipv4", "medium-ip"] } | 12 | embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "proto-ipv4", "medium-ip"] } |
| 13 | 13 | ||
| 14 | defmt = "0.3" | 14 | defmt = "1.0.1" |
| 15 | defmt-rtt = "0.4" | 15 | defmt-rtt = "1.0.0" |
| 16 | 16 | ||
| 17 | heapless = "0.8" | 17 | heapless = "0.8" |
| 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 19 | cortex-m-rt = "0.7.0" | 19 | cortex-m-rt = "0.7.0" |
| 20 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 20 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 21 | static_cell = { version = "2" } | 21 | static_cell = { version = "2" } |
| 22 | embedded-io = "0.6.1" | 22 | embedded-io = "0.6.1" |
| 23 | embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } | 23 | embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } |
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index 45ca30e4c..d19dd9dc7 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -19,8 +19,8 @@ embassy-usb-logger = { version = "0.4.0", path = "../../embassy-usb-logger" } | |||
| 19 | cyw43 = { version = "0.3.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] } | 19 | cyw43 = { version = "0.3.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] } |
| 20 | cyw43-pio = { version = "0.4.0", path = "../../cyw43-pio", features = ["defmt"] } | 20 | cyw43-pio = { version = "0.4.0", path = "../../cyw43-pio", features = ["defmt"] } |
| 21 | 21 | ||
| 22 | defmt = "0.3" | 22 | defmt = "1.0.1" |
| 23 | defmt-rtt = "0.4" | 23 | defmt-rtt = "1.0.0" |
| 24 | fixed = "1.23.1" | 24 | fixed = "1.23.1" |
| 25 | fixed-macro = "1.2" | 25 | fixed-macro = "1.2" |
| 26 | 26 | ||
| @@ -36,7 +36,7 @@ assign-resources = { git = "https://github.com/adamgreig/assign-resources", rev | |||
| 36 | cortex-m = { version = "0.7.6", features = ["inline-asm"] } | 36 | cortex-m = { version = "0.7.6", features = ["inline-asm"] } |
| 37 | cortex-m-rt = "0.7.0" | 37 | cortex-m-rt = "0.7.0" |
| 38 | critical-section = "1.1" | 38 | critical-section = "1.1" |
| 39 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 39 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 40 | display-interface-spi = "0.5.0" | 40 | display-interface-spi = "0.5.0" |
| 41 | embedded-graphics = "0.8.1" | 41 | embedded-graphics = "0.8.1" |
| 42 | mipidsi = "0.8.0" | 42 | mipidsi = "0.8.0" |
| @@ -45,7 +45,6 @@ byte-slice-cast = { version = "1.2.0", default-features = false } | |||
| 45 | smart-leds = "0.4.0" | 45 | smart-leds = "0.4.0" |
| 46 | heapless = "0.8" | 46 | heapless = "0.8" |
| 47 | usbd-hid = "0.8.1" | 47 | usbd-hid = "0.8.1" |
| 48 | rand_core = "0.6.4" | ||
| 49 | 48 | ||
| 50 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | 49 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } |
| 51 | embedded-hal-async = "1.0" | 50 | embedded-hal-async = "1.0" |
| @@ -55,7 +54,7 @@ embedded-storage = { version = "0.3" } | |||
| 55 | static_cell = "2.1" | 54 | static_cell = "2.1" |
| 56 | portable-atomic = { version = "1.5", features = ["critical-section"] } | 55 | portable-atomic = { version = "1.5", features = ["critical-section"] } |
| 57 | log = "0.4" | 56 | log = "0.4" |
| 58 | rand = { version = "0.8.5", default-features = false } | 57 | rand = { version = "0.9.0", default-features = false } |
| 59 | embedded-sdmmc = "0.7.0" | 58 | embedded-sdmmc = "0.7.0" |
| 60 | 59 | ||
| 61 | [profile.release] | 60 | [profile.release] |
diff --git a/examples/rp/src/bin/adc.rs b/examples/rp/src/bin/adc.rs index 1bb7c2249..015915586 100644 --- a/examples/rp/src/bin/adc.rs +++ b/examples/rp/src/bin/adc.rs | |||
| @@ -12,9 +12,12 @@ use embassy_rp::gpio::Pull; | |||
| 12 | use embassy_time::Timer; | 12 | use embassy_time::Timer; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 14 | ||
| 15 | bind_interrupts!(struct Irqs { | 15 | bind_interrupts!( |
| 16 | ADC_IRQ_FIFO => InterruptHandler; | 16 | /// Binds the ADC interrupts. |
| 17 | }); | 17 | struct Irqs { |
| 18 | ADC_IRQ_FIFO => InterruptHandler; | ||
| 19 | } | ||
| 20 | ); | ||
| 18 | 21 | ||
| 19 | #[embassy_executor::main] | 22 | #[embassy_executor::main] |
| 20 | async fn main(_spawner: Spawner) { | 23 | async fn main(_spawner: Spawner) { |
diff --git a/examples/rp/src/bin/ethernet_w5500_icmp.rs b/examples/rp/src/bin/ethernet_w5500_icmp.rs index 5c42b2dde..e434b3bbc 100644 --- a/examples/rp/src/bin/ethernet_w5500_icmp.rs +++ b/examples/rp/src/bin/ethernet_w5500_icmp.rs | |||
| @@ -21,7 +21,6 @@ use embassy_rp::peripherals::SPI0; | |||
| 21 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; | 21 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; |
| 22 | use embassy_time::{Delay, Instant, Timer}; | 22 | use embassy_time::{Delay, Instant, Timer}; |
| 23 | use embedded_hal_bus::spi::ExclusiveDevice; | 23 | use embedded_hal_bus::spi::ExclusiveDevice; |
| 24 | use rand::RngCore; | ||
| 25 | use static_cell::StaticCell; | 24 | use static_cell::StaticCell; |
| 26 | use {defmt_rtt as _, panic_probe as _}; | 25 | use {defmt_rtt as _, panic_probe as _}; |
| 27 | 26 | ||
diff --git a/examples/rp/src/bin/ethernet_w5500_icmp_ping.rs b/examples/rp/src/bin/ethernet_w5500_icmp_ping.rs index 0724311f9..0ec594fd5 100644 --- a/examples/rp/src/bin/ethernet_w5500_icmp_ping.rs +++ b/examples/rp/src/bin/ethernet_w5500_icmp_ping.rs | |||
| @@ -23,7 +23,6 @@ use embassy_rp::peripherals::SPI0; | |||
| 23 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; | 23 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; |
| 24 | use embassy_time::{Delay, Duration}; | 24 | use embassy_time::{Delay, Duration}; |
| 25 | use embedded_hal_bus::spi::ExclusiveDevice; | 25 | use embedded_hal_bus::spi::ExclusiveDevice; |
| 26 | use rand::RngCore; | ||
| 27 | use static_cell::StaticCell; | 26 | use static_cell::StaticCell; |
| 28 | use {defmt_rtt as _, panic_probe as _}; | 27 | use {defmt_rtt as _, panic_probe as _}; |
| 29 | 28 | ||
diff --git a/examples/rp/src/bin/ethernet_w5500_multisocket.rs b/examples/rp/src/bin/ethernet_w5500_multisocket.rs index 2bea9fc9d..27e2f3c30 100644 --- a/examples/rp/src/bin/ethernet_w5500_multisocket.rs +++ b/examples/rp/src/bin/ethernet_w5500_multisocket.rs | |||
| @@ -18,7 +18,6 @@ use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; | |||
| 18 | use embassy_time::{Delay, Duration}; | 18 | use embassy_time::{Delay, Duration}; |
| 19 | use embedded_hal_bus::spi::ExclusiveDevice; | 19 | use embedded_hal_bus::spi::ExclusiveDevice; |
| 20 | use embedded_io_async::Write; | 20 | use embedded_io_async::Write; |
| 21 | use rand::RngCore; | ||
| 22 | use static_cell::StaticCell; | 21 | use static_cell::StaticCell; |
| 23 | use {defmt_rtt as _, panic_probe as _}; | 22 | use {defmt_rtt as _, panic_probe as _}; |
| 24 | 23 | ||
diff --git a/examples/rp/src/bin/ethernet_w5500_tcp_client.rs b/examples/rp/src/bin/ethernet_w5500_tcp_client.rs index 78d1b0b83..ba82f2a60 100644 --- a/examples/rp/src/bin/ethernet_w5500_tcp_client.rs +++ b/examples/rp/src/bin/ethernet_w5500_tcp_client.rs | |||
| @@ -20,7 +20,6 @@ use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; | |||
| 20 | use embassy_time::{Delay, Duration, Timer}; | 20 | use embassy_time::{Delay, Duration, Timer}; |
| 21 | use embedded_hal_bus::spi::ExclusiveDevice; | 21 | use embedded_hal_bus::spi::ExclusiveDevice; |
| 22 | use embedded_io_async::Write; | 22 | use embedded_io_async::Write; |
| 23 | use rand::RngCore; | ||
| 24 | use static_cell::StaticCell; | 23 | use static_cell::StaticCell; |
| 25 | use {defmt_rtt as _, panic_probe as _}; | 24 | use {defmt_rtt as _, panic_probe as _}; |
| 26 | 25 | ||
diff --git a/examples/rp/src/bin/ethernet_w5500_tcp_server.rs b/examples/rp/src/bin/ethernet_w5500_tcp_server.rs index 25a38c714..5c56dcafa 100644 --- a/examples/rp/src/bin/ethernet_w5500_tcp_server.rs +++ b/examples/rp/src/bin/ethernet_w5500_tcp_server.rs | |||
| @@ -19,7 +19,6 @@ use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; | |||
| 19 | use embassy_time::{Delay, Duration}; | 19 | use embassy_time::{Delay, Duration}; |
| 20 | use embedded_hal_bus::spi::ExclusiveDevice; | 20 | use embedded_hal_bus::spi::ExclusiveDevice; |
| 21 | use embedded_io_async::Write; | 21 | use embedded_io_async::Write; |
| 22 | use rand::RngCore; | ||
| 23 | use static_cell::StaticCell; | 22 | use static_cell::StaticCell; |
| 24 | use {defmt_rtt as _, panic_probe as _}; | 23 | use {defmt_rtt as _, panic_probe as _}; |
| 25 | 24 | ||
diff --git a/examples/rp/src/bin/ethernet_w5500_udp.rs b/examples/rp/src/bin/ethernet_w5500_udp.rs index 683e29222..c5fc8de1d 100644 --- a/examples/rp/src/bin/ethernet_w5500_udp.rs +++ b/examples/rp/src/bin/ethernet_w5500_udp.rs | |||
| @@ -18,7 +18,6 @@ use embassy_rp::peripherals::SPI0; | |||
| 18 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; | 18 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; |
| 19 | use embassy_time::Delay; | 19 | use embassy_time::Delay; |
| 20 | use embedded_hal_bus::spi::ExclusiveDevice; | 20 | use embedded_hal_bus::spi::ExclusiveDevice; |
| 21 | use rand::RngCore; | ||
| 22 | use static_cell::StaticCell; | 21 | use static_cell::StaticCell; |
| 23 | use {defmt_rtt as _, panic_probe as _}; | 22 | use {defmt_rtt as _, panic_probe as _}; |
| 24 | 23 | ||
diff --git a/examples/rp/src/bin/orchestrate_tasks.rs b/examples/rp/src/bin/orchestrate_tasks.rs index 5e2775793..c35679251 100644 --- a/examples/rp/src/bin/orchestrate_tasks.rs +++ b/examples/rp/src/bin/orchestrate_tasks.rs | |||
| @@ -29,7 +29,6 @@ use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | |||
| 29 | use embassy_sync::mutex::Mutex; | 29 | use embassy_sync::mutex::Mutex; |
| 30 | use embassy_sync::{channel, signal}; | 30 | use embassy_sync::{channel, signal}; |
| 31 | use embassy_time::{Duration, Timer}; | 31 | use embassy_time::{Duration, Timer}; |
| 32 | use rand::RngCore; | ||
| 33 | use {defmt_rtt as _, panic_probe as _}; | 32 | use {defmt_rtt as _, panic_probe as _}; |
| 34 | 33 | ||
| 35 | // Hardware resource assignment. See other examples for different ways of doing this. | 34 | // Hardware resource assignment. See other examples for different ways of doing this. |
diff --git a/examples/rp/src/bin/overclock.rs b/examples/rp/src/bin/overclock.rs index 9c78e0c9d..83b17308b 100644 --- a/examples/rp/src/bin/overclock.rs +++ b/examples/rp/src/bin/overclock.rs | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::clocks::{clk_sys_freq, ClockConfig}; | 10 | use embassy_rp::clocks::{clk_sys_freq, core_voltage, ClockConfig}; |
| 11 | use embassy_rp::config::Config; | 11 | use embassy_rp::config::Config; |
| 12 | use embassy_rp::gpio::{Level, Output}; | 12 | use embassy_rp::gpio::{Level, Output}; |
| 13 | use embassy_time::{Duration, Instant, Timer}; | 13 | use embassy_time::{Duration, Instant, Timer}; |
| @@ -18,10 +18,7 @@ const COUNT_TO: i64 = 10_000_000; | |||
| 18 | #[embassy_executor::main] | 18 | #[embassy_executor::main] |
| 19 | async fn main(_spawner: Spawner) -> ! { | 19 | async fn main(_spawner: Spawner) -> ! { |
| 20 | // Set up for clock frequency of 200 MHz, setting all necessary defaults. | 20 | // Set up for clock frequency of 200 MHz, setting all necessary defaults. |
| 21 | let config = Config::new(ClockConfig::system_freq(200_000_000)); | 21 | let config = Config::new(ClockConfig::system_freq(200_000_000).unwrap()); |
| 22 | |||
| 23 | // Show the voltage scale for verification | ||
| 24 | info!("System core voltage: {}", Debug2Format(&config.clocks.core_voltage)); | ||
| 25 | 22 | ||
| 26 | // Initialize the peripherals | 23 | // Initialize the peripherals |
| 27 | let p = embassy_rp::init(config); | 24 | let p = embassy_rp::init(config); |
| @@ -29,6 +26,9 @@ async fn main(_spawner: Spawner) -> ! { | |||
| 29 | // Show CPU frequency for verification | 26 | // Show CPU frequency for verification |
| 30 | let sys_freq = clk_sys_freq(); | 27 | let sys_freq = clk_sys_freq(); |
| 31 | info!("System clock frequency: {} MHz", sys_freq / 1_000_000); | 28 | info!("System clock frequency: {} MHz", sys_freq / 1_000_000); |
| 29 | // Show core voltage for verification | ||
| 30 | let core_voltage = core_voltage().unwrap(); | ||
| 31 | info!("Core voltage: {}", core_voltage); | ||
| 32 | 32 | ||
| 33 | // LED to indicate the system is running | 33 | // LED to indicate the system is running |
| 34 | let mut led = Output::new(p.PIN_25, Level::Low); | 34 | let mut led = Output::new(p.PIN_25, Level::Low); |
diff --git a/examples/rp/src/bin/overclock_manual.rs b/examples/rp/src/bin/overclock_manual.rs index 35160b250..dea5cfb3c 100644 --- a/examples/rp/src/bin/overclock_manual.rs +++ b/examples/rp/src/bin/overclock_manual.rs | |||
| @@ -7,8 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::clocks; | 10 | use embassy_rp::clocks::{clk_sys_freq, core_voltage, ClockConfig, CoreVoltage, PllConfig}; |
| 11 | use embassy_rp::clocks::{ClockConfig, CoreVoltage, PllConfig}; | ||
| 12 | use embassy_rp::config::Config; | 11 | use embassy_rp::config::Config; |
| 13 | use embassy_rp::gpio::{Level, Output}; | 12 | use embassy_rp::gpio::{Level, Output}; |
| 14 | use embassy_time::{Duration, Instant, Timer}; | 13 | use embassy_time::{Duration, Instant, Timer}; |
| @@ -41,9 +40,12 @@ async fn main(_spawner: Spawner) -> ! { | |||
| 41 | // Initialize with our manual overclock configuration | 40 | // Initialize with our manual overclock configuration |
| 42 | let p = embassy_rp::init(configure_manual_overclock()); | 41 | let p = embassy_rp::init(configure_manual_overclock()); |
| 43 | 42 | ||
| 44 | // Verify the actual system clock frequency | 43 | // Show CPU frequency for verification |
| 45 | let sys_freq = clocks::clk_sys_freq(); | 44 | let sys_freq = clk_sys_freq(); |
| 46 | info!("System clock frequency: {} MHz", sys_freq / 1_000_000); | 45 | info!("System clock frequency: {} MHz", sys_freq / 1_000_000); |
| 46 | // Show core voltage for verification | ||
| 47 | let core_voltage = core_voltage().unwrap(); | ||
| 48 | info!("Core voltage: {}", core_voltage); | ||
| 47 | 49 | ||
| 48 | // LED to indicate the system is running | 50 | // LED to indicate the system is running |
| 49 | let mut led = Output::new(p.PIN_25, Level::Low); | 51 | let mut led = Output::new(p.PIN_25, Level::Low); |
diff --git a/examples/rp/src/bin/pio_i2s.rs b/examples/rp/src/bin/pio_i2s.rs index 192c8f854..695a74cc3 100644 --- a/examples/rp/src/bin/pio_i2s.rs +++ b/examples/rp/src/bin/pio_i2s.rs | |||
| @@ -27,7 +27,6 @@ bind_interrupts!(struct Irqs { | |||
| 27 | 27 | ||
| 28 | const SAMPLE_RATE: u32 = 48_000; | 28 | const SAMPLE_RATE: u32 = 48_000; |
| 29 | const BIT_DEPTH: u32 = 16; | 29 | const BIT_DEPTH: u32 = 16; |
| 30 | const CHANNELS: u32 = 2; | ||
| 31 | 30 | ||
| 32 | #[embassy_executor::main] | 31 | #[embassy_executor::main] |
| 33 | async fn main(_spawner: Spawner) { | 32 | async fn main(_spawner: Spawner) { |
| @@ -50,7 +49,6 @@ async fn main(_spawner: Spawner) { | |||
| 50 | left_right_clock_pin, | 49 | left_right_clock_pin, |
| 51 | SAMPLE_RATE, | 50 | SAMPLE_RATE, |
| 52 | BIT_DEPTH, | 51 | BIT_DEPTH, |
| 53 | CHANNELS, | ||
| 54 | &program, | 52 | &program, |
| 55 | ); | 53 | ); |
| 56 | 54 | ||
diff --git a/examples/rp/src/bin/sharing.rs b/examples/rp/src/bin/sharing.rs index 497c4f845..856be6ace 100644 --- a/examples/rp/src/bin/sharing.rs +++ b/examples/rp/src/bin/sharing.rs | |||
| @@ -27,7 +27,6 @@ use embassy_rp::{bind_interrupts, interrupt}; | |||
| 27 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 27 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| 28 | use embassy_sync::{blocking_mutex, mutex}; | 28 | use embassy_sync::{blocking_mutex, mutex}; |
| 29 | use embassy_time::{Duration, Ticker}; | 29 | use embassy_time::{Duration, Ticker}; |
| 30 | use rand::RngCore; | ||
| 31 | use static_cell::{ConstStaticCell, StaticCell}; | 30 | use static_cell::{ConstStaticCell, StaticCell}; |
| 32 | use {defmt_rtt as _, panic_probe as _}; | 31 | use {defmt_rtt as _, panic_probe as _}; |
| 33 | 32 | ||
diff --git a/examples/rp/src/bin/spi_gc9a01.rs b/examples/rp/src/bin/spi_gc9a01.rs index 30afc253d..fdef09d4b 100644 --- a/examples/rp/src/bin/spi_gc9a01.rs +++ b/examples/rp/src/bin/spi_gc9a01.rs | |||
| @@ -26,7 +26,6 @@ use embedded_graphics::primitives::{PrimitiveStyleBuilder, Rectangle}; | |||
| 26 | use mipidsi::models::GC9A01; | 26 | use mipidsi::models::GC9A01; |
| 27 | use mipidsi::options::{ColorInversion, ColorOrder}; | 27 | use mipidsi::options::{ColorInversion, ColorOrder}; |
| 28 | use mipidsi::Builder; | 28 | use mipidsi::Builder; |
| 29 | use rand_core::RngCore; | ||
| 30 | use {defmt_rtt as _, panic_probe as _}; | 29 | use {defmt_rtt as _, panic_probe as _}; |
| 31 | 30 | ||
| 32 | const DISPLAY_FREQ: u32 = 64_000_000; | 31 | const DISPLAY_FREQ: u32 = 64_000_000; |
diff --git a/examples/rp/src/bin/usb_ethernet.rs b/examples/rp/src/bin/usb_ethernet.rs index 2add20bc6..171f21a75 100644 --- a/examples/rp/src/bin/usb_ethernet.rs +++ b/examples/rp/src/bin/usb_ethernet.rs | |||
| @@ -17,7 +17,6 @@ use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState | |||
| 17 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; | 17 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; |
| 18 | use embassy_usb::{Builder, Config, UsbDevice}; | 18 | use embassy_usb::{Builder, Config, UsbDevice}; |
| 19 | use embedded_io_async::Write; | 19 | use embedded_io_async::Write; |
| 20 | use rand::RngCore; | ||
| 21 | use static_cell::StaticCell; | 20 | use static_cell::StaticCell; |
| 22 | use {defmt_rtt as _, panic_probe as _}; | 21 | use {defmt_rtt as _, panic_probe as _}; |
| 23 | 22 | ||
diff --git a/examples/rp/src/bin/usb_hid_mouse.rs b/examples/rp/src/bin/usb_hid_mouse.rs index 5ee650910..4454c593c 100644..100755 --- a/examples/rp/src/bin/usb_hid_mouse.rs +++ b/examples/rp/src/bin/usb_hid_mouse.rs | |||
| @@ -85,8 +85,8 @@ async fn main(_spawner: Spawner) { | |||
| 85 | _ = Timer::after_secs(1).await; | 85 | _ = Timer::after_secs(1).await; |
| 86 | let report = MouseReport { | 86 | let report = MouseReport { |
| 87 | buttons: 0, | 87 | buttons: 0, |
| 88 | x: rng.gen_range(-100..100), // random small x movement | 88 | x: rng.random_range(-100..100), // random small x movement |
| 89 | y: rng.gen_range(-100..100), // random small y movement | 89 | y: rng.random_range(-100..100), // random small y movement |
| 90 | wheel: 0, | 90 | wheel: 0, |
| 91 | pan: 0, | 91 | pan: 0, |
| 92 | }; | 92 | }; |
diff --git a/examples/rp/src/bin/wifi_ap_tcp_server.rs b/examples/rp/src/bin/wifi_ap_tcp_server.rs index e97ddb4c1..856838a8c 100644 --- a/examples/rp/src/bin/wifi_ap_tcp_server.rs +++ b/examples/rp/src/bin/wifi_ap_tcp_server.rs | |||
| @@ -19,7 +19,6 @@ use embassy_rp::peripherals::{DMA_CH0, PIO0}; | |||
| 19 | use embassy_rp::pio::{InterruptHandler, Pio}; | 19 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 20 | use embassy_time::Duration; | 20 | use embassy_time::Duration; |
| 21 | use embedded_io_async::Write; | 21 | use embedded_io_async::Write; |
| 22 | use rand::RngCore; | ||
| 23 | use static_cell::StaticCell; | 22 | use static_cell::StaticCell; |
| 24 | use {defmt_rtt as _, panic_probe as _}; | 23 | use {defmt_rtt as _, panic_probe as _}; |
| 25 | 24 | ||
diff --git a/examples/rp/src/bin/wifi_tcp_server.rs b/examples/rp/src/bin/wifi_tcp_server.rs index 7e3c663fe..fbc957e0e 100644 --- a/examples/rp/src/bin/wifi_tcp_server.rs +++ b/examples/rp/src/bin/wifi_tcp_server.rs | |||
| @@ -20,7 +20,6 @@ use embassy_rp::peripherals::{DMA_CH0, PIO0}; | |||
| 20 | use embassy_rp::pio::{InterruptHandler, Pio}; | 20 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 21 | use embassy_time::{Duration, Timer}; | 21 | use embassy_time::{Duration, Timer}; |
| 22 | use embedded_io_async::Write; | 22 | use embedded_io_async::Write; |
| 23 | use rand::RngCore; | ||
| 24 | use static_cell::StaticCell; | 23 | use static_cell::StaticCell; |
| 25 | use {defmt_rtt as _, panic_probe as _}; | 24 | use {defmt_rtt as _, panic_probe as _}; |
| 26 | 25 | ||
diff --git a/examples/rp/src/bin/wifi_webrequest.rs b/examples/rp/src/bin/wifi_webrequest.rs index f1b398b65..1efd1cd28 100644 --- a/examples/rp/src/bin/wifi_webrequest.rs +++ b/examples/rp/src/bin/wifi_webrequest.rs | |||
| @@ -20,7 +20,6 @@ use embassy_rp::gpio::{Level, Output}; | |||
| 20 | use embassy_rp::peripherals::{DMA_CH0, PIO0}; | 20 | use embassy_rp::peripherals::{DMA_CH0, PIO0}; |
| 21 | use embassy_rp::pio::{InterruptHandler, Pio}; | 21 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 22 | use embassy_time::{Duration, Timer}; | 22 | use embassy_time::{Duration, Timer}; |
| 23 | use rand::RngCore; | ||
| 24 | use reqwless::client::{HttpClient, TlsConfig, TlsVerify}; | 23 | use reqwless::client::{HttpClient, TlsConfig, TlsVerify}; |
| 25 | use reqwless::request::Method; | 24 | use reqwless::request::Method; |
| 26 | use serde::Deserialize; | 25 | use serde::Deserialize; |
diff --git a/examples/rp235x/Cargo.toml b/examples/rp235x/Cargo.toml index 345a915af..ae64489ae 100644 --- a/examples/rp235x/Cargo.toml +++ b/examples/rp235x/Cargo.toml | |||
| @@ -19,8 +19,8 @@ embassy-usb-logger = { version = "0.4.0", path = "../../embassy-usb-logger" } | |||
| 19 | cyw43 = { version = "0.3.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] } | 19 | cyw43 = { version = "0.3.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] } |
| 20 | cyw43-pio = { version = "0.4.0", path = "../../cyw43-pio", features = ["defmt"] } | 20 | cyw43-pio = { version = "0.4.0", path = "../../cyw43-pio", features = ["defmt"] } |
| 21 | 21 | ||
| 22 | defmt = "0.3" | 22 | defmt = "1.0.1" |
| 23 | defmt-rtt = "0.4" | 23 | defmt-rtt = "1.0.0" |
| 24 | fixed = "1.23.1" | 24 | fixed = "1.23.1" |
| 25 | fixed-macro = "1.2" | 25 | fixed-macro = "1.2" |
| 26 | 26 | ||
| @@ -37,7 +37,7 @@ tb6612fng = "1.0.0" | |||
| 37 | cortex-m = { version = "0.7.6", features = ["inline-asm"] } | 37 | cortex-m = { version = "0.7.6", features = ["inline-asm"] } |
| 38 | cortex-m-rt = "0.7.0" | 38 | cortex-m-rt = "0.7.0" |
| 39 | critical-section = "1.1" | 39 | critical-section = "1.1" |
| 40 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 40 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 41 | display-interface-spi = "0.5.0" | 41 | display-interface-spi = "0.5.0" |
| 42 | embedded-graphics = "0.8.1" | 42 | embedded-graphics = "0.8.1" |
| 43 | mipidsi = "0.8.0" | 43 | mipidsi = "0.8.0" |
| @@ -55,7 +55,6 @@ embedded-storage = { version = "0.3" } | |||
| 55 | static_cell = "2.1" | 55 | static_cell = "2.1" |
| 56 | portable-atomic = { version = "1.5", features = ["critical-section"] } | 56 | portable-atomic = { version = "1.5", features = ["critical-section"] } |
| 57 | log = "0.4" | 57 | log = "0.4" |
| 58 | rand = { version = "0.8.5", default-features = false } | ||
| 59 | embedded-sdmmc = "0.7.0" | 58 | embedded-sdmmc = "0.7.0" |
| 60 | 59 | ||
| 61 | [profile.release] | 60 | [profile.release] |
diff --git a/examples/rp235x/src/bin/overclock.rs b/examples/rp235x/src/bin/overclock.rs new file mode 100644 index 000000000..5fd97ef97 --- /dev/null +++ b/examples/rp235x/src/bin/overclock.rs | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | //! # Overclocking the RP2350 to 200 MHz | ||
| 2 | //! | ||
| 3 | //! This example demonstrates how to configure the RP2350 to run at 200 MHz instead of the default 150 MHz. | ||
| 4 | //! | ||
| 5 | //! ## Note | ||
| 6 | //! | ||
| 7 | //! As of yet there is no official support for running the RP235x at higher clock frequencies and/or other core voltages than the default. | ||
| 8 | //! Doing so may cause unexpected behavior and/or damage the chip. | ||
| 9 | |||
| 10 | #![no_std] | ||
| 11 | #![no_main] | ||
| 12 | |||
| 13 | use defmt::*; | ||
| 14 | use embassy_executor::Spawner; | ||
| 15 | use embassy_rp::clocks::{clk_sys_freq, core_voltage, ClockConfig, CoreVoltage}; | ||
| 16 | use embassy_rp::config::Config; | ||
| 17 | use embassy_rp::gpio::{Level, Output}; | ||
| 18 | use embassy_time::{Duration, Instant, Timer}; | ||
| 19 | use {defmt_rtt as _, panic_probe as _}; | ||
| 20 | |||
| 21 | const COUNT_TO: i64 = 10_000_000; | ||
| 22 | |||
| 23 | #[embassy_executor::main] | ||
| 24 | async fn main(_spawner: Spawner) -> ! { | ||
| 25 | // Set up for clock frequency of 200 MHz, setting all necessary defaults. | ||
| 26 | let mut config = Config::new(ClockConfig::system_freq(200_000_000).unwrap()); | ||
| 27 | |||
| 28 | // since for the rp235x there is no official support for higher clock frequencies, `system_freq()` will not set a voltage for us. | ||
| 29 | // We need to guess the core voltage, that is needed for the higher clock frequency. Going with a small increase from the default 1.1V here, based on | ||
| 30 | // what we know about the RP2040. This is not guaranteed to be correct. | ||
| 31 | config.clocks.core_voltage = CoreVoltage::V1_15; | ||
| 32 | |||
| 33 | // Initialize the peripherals | ||
| 34 | let p = embassy_rp::init(config); | ||
| 35 | |||
| 36 | // Show CPU frequency for verification | ||
| 37 | let sys_freq = clk_sys_freq(); | ||
| 38 | info!("System clock frequency: {} MHz", sys_freq / 1_000_000); | ||
| 39 | // Show core voltage for verification | ||
| 40 | let core_voltage = core_voltage().unwrap(); | ||
| 41 | info!("Core voltage: {}", core_voltage); | ||
| 42 | |||
| 43 | // LED to indicate the system is running | ||
| 44 | let mut led = Output::new(p.PIN_25, Level::Low); | ||
| 45 | |||
| 46 | loop { | ||
| 47 | // Reset the counter at the start of measurement period | ||
| 48 | let mut counter = 0; | ||
| 49 | |||
| 50 | // Turn LED on while counting | ||
| 51 | led.set_high(); | ||
| 52 | |||
| 53 | let start = Instant::now(); | ||
| 54 | |||
| 55 | // This is a busy loop that will take some time to complete | ||
| 56 | while counter < COUNT_TO { | ||
| 57 | counter += 1; | ||
| 58 | } | ||
| 59 | |||
| 60 | let elapsed = Instant::now() - start; | ||
| 61 | |||
| 62 | // Report the elapsed time | ||
| 63 | led.set_low(); | ||
| 64 | info!( | ||
| 65 | "At {}Mhz: Elapsed time to count to {}: {}ms", | ||
| 66 | sys_freq / 1_000_000, | ||
| 67 | counter, | ||
| 68 | elapsed.as_millis() | ||
| 69 | ); | ||
| 70 | |||
| 71 | // Wait 2 seconds before starting the next measurement | ||
| 72 | Timer::after(Duration::from_secs(2)).await; | ||
| 73 | } | ||
| 74 | } | ||
diff --git a/examples/rp235x/src/bin/pio_i2s.rs b/examples/rp235x/src/bin/pio_i2s.rs index 5a4bcfcac..cfcb0221d 100644 --- a/examples/rp235x/src/bin/pio_i2s.rs +++ b/examples/rp235x/src/bin/pio_i2s.rs | |||
| @@ -27,7 +27,6 @@ bind_interrupts!(struct Irqs { | |||
| 27 | 27 | ||
| 28 | const SAMPLE_RATE: u32 = 48_000; | 28 | const SAMPLE_RATE: u32 = 48_000; |
| 29 | const BIT_DEPTH: u32 = 16; | 29 | const BIT_DEPTH: u32 = 16; |
| 30 | const CHANNELS: u32 = 2; | ||
| 31 | 30 | ||
| 32 | #[embassy_executor::main] | 31 | #[embassy_executor::main] |
| 33 | async fn main(_spawner: Spawner) { | 32 | async fn main(_spawner: Spawner) { |
| @@ -50,7 +49,6 @@ async fn main(_spawner: Spawner) { | |||
| 50 | left_right_clock_pin, | 49 | left_right_clock_pin, |
| 51 | SAMPLE_RATE, | 50 | SAMPLE_RATE, |
| 52 | BIT_DEPTH, | 51 | BIT_DEPTH, |
| 53 | CHANNELS, | ||
| 54 | &program, | 52 | &program, |
| 55 | ); | 53 | ); |
| 56 | 54 | ||
diff --git a/examples/rp235x/src/bin/sharing.rs b/examples/rp235x/src/bin/sharing.rs index 497c4f845..856be6ace 100644 --- a/examples/rp235x/src/bin/sharing.rs +++ b/examples/rp235x/src/bin/sharing.rs | |||
| @@ -27,7 +27,6 @@ use embassy_rp::{bind_interrupts, interrupt}; | |||
| 27 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 27 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| 28 | use embassy_sync::{blocking_mutex, mutex}; | 28 | use embassy_sync::{blocking_mutex, mutex}; |
| 29 | use embassy_time::{Duration, Ticker}; | 29 | use embassy_time::{Duration, Ticker}; |
| 30 | use rand::RngCore; | ||
| 31 | use static_cell::{ConstStaticCell, StaticCell}; | 30 | use static_cell::{ConstStaticCell, StaticCell}; |
| 32 | use {defmt_rtt as _, panic_probe as _}; | 31 | use {defmt_rtt as _, panic_probe as _}; |
| 33 | 32 | ||
diff --git a/examples/rp235x/src/bin/trng.rs b/examples/rp235x/src/bin/trng.rs index ad19aef3e..100d6b104 100644 --- a/examples/rp235x/src/bin/trng.rs +++ b/examples/rp235x/src/bin/trng.rs | |||
| @@ -10,7 +10,6 @@ use embassy_rp::gpio::{Level, Output}; | |||
| 10 | use embassy_rp::peripherals::TRNG; | 10 | use embassy_rp::peripherals::TRNG; |
| 11 | use embassy_rp::trng::Trng; | 11 | use embassy_rp::trng::Trng; |
| 12 | use embassy_time::Timer; | 12 | use embassy_time::Timer; |
| 13 | use rand::RngCore; | ||
| 14 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 14 | ||
| 16 | bind_interrupts!(struct Irqs { | 15 | bind_interrupts!(struct Irqs { |
| @@ -33,8 +32,8 @@ async fn main(_spawner: Spawner) { | |||
| 33 | info!("Random bytes async {}", &randomness); | 32 | info!("Random bytes async {}", &randomness); |
| 34 | trng.blocking_fill_bytes(&mut randomness); | 33 | trng.blocking_fill_bytes(&mut randomness); |
| 35 | info!("Random bytes blocking {}", &randomness); | 34 | info!("Random bytes blocking {}", &randomness); |
| 36 | let random_u32 = trng.next_u32(); | 35 | let random_u32 = trng.blocking_next_u32(); |
| 37 | let random_u64 = trng.next_u64(); | 36 | let random_u64 = trng.blocking_next_u64(); |
| 38 | info!("Random u32 {} u64 {}", random_u32, random_u64); | 37 | info!("Random u32 {} u64 {}", random_u32, random_u64); |
| 39 | // Random number of blinks between 0 and 31 | 38 | // Random number of blinks between 0 and 31 |
| 40 | let blinks = random_u32 % 32; | 39 | let blinks = random_u32 % 32; |
diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml index f00953167..ff4b2fbbd 100644 --- a/examples/std/Cargo.toml +++ b/examples/std/Cargo.toml | |||
| @@ -21,7 +21,7 @@ futures = { version = "0.3.17" } | |||
| 21 | log = "0.4.14" | 21 | log = "0.4.14" |
| 22 | nix = "0.26.2" | 22 | nix = "0.26.2" |
| 23 | clap = { version = "3.0.0-beta.5", features = ["derive"] } | 23 | clap = { version = "3.0.0-beta.5", features = ["derive"] } |
| 24 | rand_core = { version = "0.6.3", features = ["std"] } | 24 | rand_core = { version = "0.9.1", features = ["std", "os_rng"] } |
| 25 | heapless = { version = "0.8", default-features = false } | 25 | heapless = { version = "0.8", default-features = false } |
| 26 | static_cell = "2" | 26 | static_cell = "2" |
| 27 | 27 | ||
diff --git a/examples/std/src/bin/net.rs b/examples/std/src/bin/net.rs index 6e50b1a01..232cf494b 100644 --- a/examples/std/src/bin/net.rs +++ b/examples/std/src/bin/net.rs | |||
| @@ -9,7 +9,7 @@ use embassy_time::Duration; | |||
| 9 | use embedded_io_async::Write; | 9 | use embedded_io_async::Write; |
| 10 | use heapless::Vec; | 10 | use heapless::Vec; |
| 11 | use log::*; | 11 | use log::*; |
| 12 | use rand_core::{OsRng, RngCore}; | 12 | use rand_core::{OsRng, TryRngCore}; |
| 13 | use static_cell::StaticCell; | 13 | use static_cell::StaticCell; |
| 14 | 14 | ||
| 15 | #[derive(Parser)] | 15 | #[derive(Parser)] |
| @@ -48,7 +48,7 @@ async fn main_task(spawner: Spawner) { | |||
| 48 | 48 | ||
| 49 | // Generate random seed | 49 | // Generate random seed |
| 50 | let mut seed = [0; 8]; | 50 | let mut seed = [0; 8]; |
| 51 | OsRng.fill_bytes(&mut seed); | 51 | OsRng.try_fill_bytes(&mut seed).unwrap(); |
| 52 | let seed = u64::from_le_bytes(seed); | 52 | let seed = u64::from_le_bytes(seed); |
| 53 | 53 | ||
| 54 | // Init network stack | 54 | // Init network stack |
diff --git a/examples/std/src/bin/net_dns.rs b/examples/std/src/bin/net_dns.rs index a42c5dbb7..cf90731dd 100644 --- a/examples/std/src/bin/net_dns.rs +++ b/examples/std/src/bin/net_dns.rs | |||
| @@ -5,7 +5,7 @@ use embassy_net::{Config, Ipv4Address, Ipv4Cidr, StackResources}; | |||
| 5 | use embassy_net_tuntap::TunTapDevice; | 5 | use embassy_net_tuntap::TunTapDevice; |
| 6 | use heapless::Vec; | 6 | use heapless::Vec; |
| 7 | use log::*; | 7 | use log::*; |
| 8 | use rand_core::{OsRng, RngCore}; | 8 | use rand_core::{OsRng, TryRngCore}; |
| 9 | use static_cell::StaticCell; | 9 | use static_cell::StaticCell; |
| 10 | 10 | ||
| 11 | #[derive(Parser)] | 11 | #[derive(Parser)] |
| @@ -45,7 +45,7 @@ async fn main_task(spawner: Spawner) { | |||
| 45 | 45 | ||
| 46 | // Generate random seed | 46 | // Generate random seed |
| 47 | let mut seed = [0; 8]; | 47 | let mut seed = [0; 8]; |
| 48 | OsRng.fill_bytes(&mut seed); | 48 | OsRng.try_fill_bytes(&mut seed).unwrap(); |
| 49 | let seed = u64::from_le_bytes(seed); | 49 | let seed = u64::from_le_bytes(seed); |
| 50 | 50 | ||
| 51 | // Init network stack | 51 | // Init network stack |
diff --git a/examples/std/src/bin/net_ppp.rs b/examples/std/src/bin/net_ppp.rs index f667e8d4c..ac3aea6ff 100644 --- a/examples/std/src/bin/net_ppp.rs +++ b/examples/std/src/bin/net_ppp.rs | |||
| @@ -23,7 +23,7 @@ use futures::io::BufReader; | |||
| 23 | use heapless::Vec; | 23 | use heapless::Vec; |
| 24 | use log::*; | 24 | use log::*; |
| 25 | use nix::sys::termios; | 25 | use nix::sys::termios; |
| 26 | use rand_core::{OsRng, RngCore}; | 26 | use rand_core::{OsRng, TryRngCore}; |
| 27 | use static_cell::StaticCell; | 27 | use static_cell::StaticCell; |
| 28 | 28 | ||
| 29 | use crate::serial_port::SerialPort; | 29 | use crate::serial_port::SerialPort; |
| @@ -89,7 +89,7 @@ async fn main_task(spawner: Spawner) { | |||
| 89 | 89 | ||
| 90 | // Generate random seed | 90 | // Generate random seed |
| 91 | let mut seed = [0; 8]; | 91 | let mut seed = [0; 8]; |
| 92 | OsRng.fill_bytes(&mut seed); | 92 | OsRng.try_fill_bytes(&mut seed).unwrap(); |
| 93 | let seed = u64::from_le_bytes(seed); | 93 | let seed = u64::from_le_bytes(seed); |
| 94 | 94 | ||
| 95 | // Init network stack | 95 | // Init network stack |
diff --git a/examples/std/src/bin/net_udp.rs b/examples/std/src/bin/net_udp.rs index 02d4d3efb..53632a5b4 100644 --- a/examples/std/src/bin/net_udp.rs +++ b/examples/std/src/bin/net_udp.rs | |||
| @@ -5,7 +5,7 @@ use embassy_net::{Config, Ipv4Address, Ipv4Cidr, StackResources}; | |||
| 5 | use embassy_net_tuntap::TunTapDevice; | 5 | use embassy_net_tuntap::TunTapDevice; |
| 6 | use heapless::Vec; | 6 | use heapless::Vec; |
| 7 | use log::*; | 7 | use log::*; |
| 8 | use rand_core::{OsRng, RngCore}; | 8 | use rand_core::{OsRng, TryRngCore}; |
| 9 | use static_cell::StaticCell; | 9 | use static_cell::StaticCell; |
| 10 | 10 | ||
| 11 | #[derive(Parser)] | 11 | #[derive(Parser)] |
| @@ -44,7 +44,7 @@ async fn main_task(spawner: Spawner) { | |||
| 44 | 44 | ||
| 45 | // Generate random seed | 45 | // Generate random seed |
| 46 | let mut seed = [0; 8]; | 46 | let mut seed = [0; 8]; |
| 47 | OsRng.fill_bytes(&mut seed); | 47 | OsRng.try_fill_bytes(&mut seed).unwrap(); |
| 48 | let seed = u64::from_le_bytes(seed); | 48 | let seed = u64::from_le_bytes(seed); |
| 49 | 49 | ||
| 50 | // Init network stack | 50 | // Init network stack |
diff --git a/examples/std/src/bin/tcp_accept.rs b/examples/std/src/bin/tcp_accept.rs index 18646a083..961c20e2d 100644 --- a/examples/std/src/bin/tcp_accept.rs +++ b/examples/std/src/bin/tcp_accept.rs | |||
| @@ -7,7 +7,7 @@ use embassy_time::{Duration, Timer}; | |||
| 7 | use embedded_io_async::Write as _; | 7 | use embedded_io_async::Write as _; |
| 8 | use heapless::Vec; | 8 | use heapless::Vec; |
| 9 | use log::*; | 9 | use log::*; |
| 10 | use rand_core::{OsRng, RngCore}; | 10 | use rand_core::{OsRng, TryRngCore}; |
| 11 | use static_cell::StaticCell; | 11 | use static_cell::StaticCell; |
| 12 | 12 | ||
| 13 | #[derive(Parser)] | 13 | #[derive(Parser)] |
| @@ -46,7 +46,7 @@ async fn main_task(spawner: Spawner) { | |||
| 46 | 46 | ||
| 47 | // Generate random seed | 47 | // Generate random seed |
| 48 | let mut seed = [0; 8]; | 48 | let mut seed = [0; 8]; |
| 49 | OsRng.fill_bytes(&mut seed); | 49 | OsRng.try_fill_bytes(&mut seed).unwrap(); |
| 50 | let seed = u64::from_le_bytes(seed); | 50 | let seed = u64::from_le_bytes(seed); |
| 51 | 51 | ||
| 52 | // Init network stack | 52 | // Init network stack |
diff --git a/examples/stm32c0/Cargo.toml b/examples/stm32c0/Cargo.toml index 767b742f7..71f1cfda1 100644 --- a/examples/stm32c0/Cargo.toml +++ b/examples/stm32c0/Cargo.toml | |||
| @@ -11,13 +11,13 @@ embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["de | |||
| 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | 13 | ||
| 14 | defmt = "0.3" | 14 | defmt = "1.0.1" |
| 15 | defmt-rtt = "0.4" | 15 | defmt-rtt = "1.0.0" |
| 16 | 16 | ||
| 17 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } | 17 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 18 | cortex-m-rt = "0.7.0" | 18 | cortex-m-rt = "0.7.0" |
| 19 | embedded-hal = "0.2.6" | 19 | embedded-hal = "0.2.6" |
| 20 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 20 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 21 | heapless = { version = "0.8", default-features = false } | 21 | heapless = { version = "0.8", default-features = false } |
| 22 | 22 | ||
| 23 | [profile.release] | 23 | [profile.release] |
diff --git a/examples/stm32f0/Cargo.toml b/examples/stm32f0/Cargo.toml index 932a97dc8..534e8c33d 100644 --- a/examples/stm32f0/Cargo.toml +++ b/examples/stm32f0/Cargo.toml | |||
| @@ -9,9 +9,9 @@ license = "MIT OR Apache-2.0" | |||
| 9 | embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [ "defmt", "memory-x", "stm32f091rc", "time-driver-tim2", "exti", "unstable-pac"] } | 9 | embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [ "defmt", "memory-x", "stm32f091rc", "time-driver-tim2", "exti", "unstable-pac"] } |
| 10 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 10 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 11 | cortex-m-rt = "0.7.0" | 11 | cortex-m-rt = "0.7.0" |
| 12 | defmt = "0.3" | 12 | defmt = "1.0.1" |
| 13 | defmt-rtt = "0.4" | 13 | defmt-rtt = "1.0.0" |
| 14 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 14 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 15 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } | 15 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } |
| 16 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 16 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 17 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 17 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
diff --git a/examples/stm32f1/Cargo.toml b/examples/stm32f1/Cargo.toml index fe800bc80..f856d2620 100644 --- a/examples/stm32f1/Cargo.toml +++ b/examples/stm32f1/Cargo.toml | |||
| @@ -13,13 +13,13 @@ embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["de | |||
| 13 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } | 13 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | 15 | ||
| 16 | defmt = "0.3" | 16 | defmt = "1.0.1" |
| 17 | defmt-rtt = "0.4" | 17 | defmt-rtt = "1.0.0" |
| 18 | 18 | ||
| 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 20 | cortex-m-rt = "0.7.0" | 20 | cortex-m-rt = "0.7.0" |
| 21 | embedded-hal = "0.2.6" | 21 | embedded-hal = "0.2.6" |
| 22 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 22 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 23 | heapless = { version = "0.8", default-features = false } | 23 | heapless = { version = "0.8", default-features = false } |
| 24 | nb = "1.0.0" | 24 | nb = "1.0.0" |
| 25 | static_cell = "2.0.0" | 25 | static_cell = "2.0.0" |
diff --git a/examples/stm32f2/Cargo.toml b/examples/stm32f2/Cargo.toml index 26be3f485..f26cbfadc 100644 --- a/examples/stm32f2/Cargo.toml +++ b/examples/stm32f2/Cargo.toml | |||
| @@ -11,13 +11,13 @@ embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["de | |||
| 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | 13 | ||
| 14 | defmt = "0.3" | 14 | defmt = "1.0.1" |
| 15 | defmt-rtt = "0.4" | 15 | defmt-rtt = "1.0.0" |
| 16 | 16 | ||
| 17 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 17 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 18 | cortex-m-rt = "0.7.0" | 18 | cortex-m-rt = "0.7.0" |
| 19 | embedded-hal = "0.2.6" | 19 | embedded-hal = "0.2.6" |
| 20 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 20 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 21 | heapless = { version = "0.8", default-features = false } | 21 | heapless = { version = "0.8", default-features = false } |
| 22 | nb = "1.0.0" | 22 | nb = "1.0.0" |
| 23 | 23 | ||
diff --git a/examples/stm32f3/Cargo.toml b/examples/stm32f3/Cargo.toml index 31bf040b0..4c1dd881f 100644 --- a/examples/stm32f3/Cargo.toml +++ b/examples/stm32f3/Cargo.toml | |||
| @@ -13,13 +13,13 @@ embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["de | |||
| 13 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } | 13 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | 15 | ||
| 16 | defmt = "0.3" | 16 | defmt = "1.0.1" |
| 17 | defmt-rtt = "0.4" | 17 | defmt-rtt = "1.0.0" |
| 18 | 18 | ||
| 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 20 | cortex-m-rt = "0.7.0" | 20 | cortex-m-rt = "0.7.0" |
| 21 | embedded-hal = "0.2.6" | 21 | embedded-hal = "0.2.6" |
| 22 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 22 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 23 | heapless = { version = "0.8", default-features = false } | 23 | heapless = { version = "0.8", default-features = false } |
| 24 | nb = "1.0.0" | 24 | nb = "1.0.0" |
| 25 | embedded-storage = "0.3.1" | 25 | embedded-storage = "0.3.1" |
diff --git a/examples/stm32f334/Cargo.toml b/examples/stm32f334/Cargo.toml index 5fb6d60c5..c28855b3a 100644 --- a/examples/stm32f334/Cargo.toml +++ b/examples/stm32f334/Cargo.toml | |||
| @@ -12,13 +12,13 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [ | |||
| 12 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } | 12 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } |
| 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 14 | 14 | ||
| 15 | defmt = "0.3" | 15 | defmt = "1.0.1" |
| 16 | defmt-rtt = "0.4" | 16 | defmt-rtt = "1.0.0" |
| 17 | 17 | ||
| 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 19 | cortex-m-rt = "0.7.0" | 19 | cortex-m-rt = "0.7.0" |
| 20 | embedded-hal = "0.2.6" | 20 | embedded-hal = "0.2.6" |
| 21 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 21 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 22 | heapless = { version = "0.8", default-features = false } | 22 | heapless = { version = "0.8", default-features = false } |
| 23 | nb = "1.0.0" | 23 | nb = "1.0.0" |
| 24 | embedded-storage = "0.3.1" | 24 | embedded-storage = "0.3.1" |
diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml index 7aa4354ca..7374f8813 100644 --- a/examples/stm32f4/Cargo.toml +++ b/examples/stm32f4/Cargo.toml | |||
| @@ -15,8 +15,8 @@ embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defm | |||
| 15 | embassy-net-wiznet = { version = "0.2.0", path = "../../embassy-net-wiznet", features = ["defmt"] } | 15 | embassy-net-wiznet = { version = "0.2.0", path = "../../embassy-net-wiznet", features = ["defmt"] } |
| 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 17 | 17 | ||
| 18 | defmt = "0.3" | 18 | defmt = "1.0.1" |
| 19 | defmt-rtt = "0.4" | 19 | defmt-rtt = "1.0.0" |
| 20 | 20 | ||
| 21 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 21 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 22 | cortex-m-rt = "0.7.0" | 22 | cortex-m-rt = "0.7.0" |
| @@ -24,7 +24,7 @@ embedded-hal = "0.2.6" | |||
| 24 | embedded-hal-bus = { version = "0.2", features = ["async"] } | 24 | embedded-hal-bus = { version = "0.2", features = ["async"] } |
| 25 | embedded-io = { version = "0.6.0" } | 25 | embedded-io = { version = "0.6.0" } |
| 26 | embedded-io-async = { version = "0.6.1" } | 26 | embedded-io-async = { version = "0.6.1" } |
| 27 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 27 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 28 | futures-util = { version = "0.3.30", default-features = false } | 28 | futures-util = { version = "0.3.30", default-features = false } |
| 29 | heapless = { version = "0.8", default-features = false } | 29 | heapless = { version = "0.8", default-features = false } |
| 30 | critical-section = "1.1" | 30 | critical-section = "1.1" |
diff --git a/examples/stm32f469/Cargo.toml b/examples/stm32f469/Cargo.toml index 4d403bae8..87a3b8f75 100644 --- a/examples/stm32f469/Cargo.toml +++ b/examples/stm32f469/Cargo.toml | |||
| @@ -10,13 +10,13 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [" | |||
| 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 12 | 12 | ||
| 13 | defmt = "0.3" | 13 | defmt = "1.0.1" |
| 14 | defmt-rtt = "0.4" | 14 | defmt-rtt = "1.0.0" |
| 15 | 15 | ||
| 16 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 16 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 17 | cortex-m-rt = "0.7.0" | 17 | cortex-m-rt = "0.7.0" |
| 18 | embedded-hal = "1.0.0" | 18 | embedded-hal = "1.0.0" |
| 19 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 19 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 20 | 20 | ||
| 21 | [profile.release] | 21 | [profile.release] |
| 22 | debug = 2 | 22 | debug = 2 |
diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml index 1a46931d9..bce521f30 100644 --- a/examples/stm32f7/Cargo.toml +++ b/examples/stm32f7/Cargo.toml | |||
| @@ -15,16 +15,15 @@ embedded-io-async = { version = "0.6.1" } | |||
| 15 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 17 | 17 | ||
| 18 | defmt = "0.3" | 18 | defmt = "1.0.1" |
| 19 | defmt-rtt = "0.4" | 19 | defmt-rtt = "1.0.0" |
| 20 | 20 | ||
| 21 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 21 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 22 | cortex-m-rt = "0.7.0" | 22 | cortex-m-rt = "0.7.0" |
| 23 | embedded-hal = "0.2.6" | 23 | embedded-hal = "0.2.6" |
| 24 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 24 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 25 | heapless = { version = "0.8", default-features = false } | 25 | heapless = { version = "0.8", default-features = false } |
| 26 | nb = "1.0.0" | 26 | nb = "1.0.0" |
| 27 | rand_core = "0.6.3" | ||
| 28 | critical-section = "1.1" | 27 | critical-section = "1.1" |
| 29 | embedded-storage = "0.3.1" | 28 | embedded-storage = "0.3.1" |
| 30 | static_cell = "2" | 29 | static_cell = "2" |
diff --git a/examples/stm32f7/src/bin/eth.rs b/examples/stm32f7/src/bin/eth.rs index 17ab7fc00..67a2b34bb 100644 --- a/examples/stm32f7/src/bin/eth.rs +++ b/examples/stm32f7/src/bin/eth.rs | |||
| @@ -12,7 +12,6 @@ use embassy_stm32::time::Hertz; | |||
| 12 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 12 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| 13 | use embassy_time::Timer; | 13 | use embassy_time::Timer; |
| 14 | use embedded_io_async::Write; | 14 | use embedded_io_async::Write; |
| 15 | use rand_core::RngCore; | ||
| 16 | use static_cell::StaticCell; | 15 | use static_cell::StaticCell; |
| 17 | use {defmt_rtt as _, panic_probe as _}; | 16 | use {defmt_rtt as _, panic_probe as _}; |
| 18 | 17 | ||
diff --git a/examples/stm32g0/Cargo.toml b/examples/stm32g0/Cargo.toml index 319d84179..5e09b237e 100644 --- a/examples/stm32g0/Cargo.toml +++ b/examples/stm32g0/Cargo.toml | |||
| @@ -13,13 +13,13 @@ embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["de | |||
| 13 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] } | 13 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | 15 | ||
| 16 | defmt = "0.3" | 16 | defmt = "1.0.1" |
| 17 | defmt-rtt = "0.4" | 17 | defmt-rtt = "1.0.0" |
| 18 | 18 | ||
| 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 20 | cortex-m-rt = "0.7.0" | 20 | cortex-m-rt = "0.7.0" |
| 21 | embedded-hal = "0.2.6" | 21 | embedded-hal = "0.2.6" |
| 22 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 22 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 23 | heapless = { version = "0.8", default-features = false } | 23 | heapless = { version = "0.8", default-features = false } |
| 24 | portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] } | 24 | portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] } |
| 25 | 25 | ||
diff --git a/examples/stm32g4/Cargo.toml b/examples/stm32g4/Cargo.toml index aa01d84e2..582553a29 100644 --- a/examples/stm32g4/Cargo.toml +++ b/examples/stm32g4/Cargo.toml | |||
| @@ -14,14 +14,14 @@ embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defm | |||
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | usbd-hid = "0.8.1" | 15 | usbd-hid = "0.8.1" |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "1.0.1" |
| 18 | defmt-rtt = "0.4" | 18 | defmt-rtt = "1.0.0" |
| 19 | 19 | ||
| 20 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } | 20 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 21 | cortex-m-rt = "0.7.0" | 21 | cortex-m-rt = "0.7.0" |
| 22 | embedded-hal = "0.2.6" | 22 | embedded-hal = "0.2.6" |
| 23 | embedded-can = { version = "0.4" } | 23 | embedded-can = { version = "0.4" } |
| 24 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 24 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 25 | heapless = { version = "0.8", default-features = false } | 25 | heapless = { version = "0.8", default-features = false } |
| 26 | static_cell = "2.0.0" | 26 | static_cell = "2.0.0" |
| 27 | 27 | ||
diff --git a/examples/stm32h5/Cargo.toml b/examples/stm32h5/Cargo.toml index 5631ff746..3e022e4e5 100644 --- a/examples/stm32h5/Cargo.toml +++ b/examples/stm32h5/Cargo.toml | |||
| @@ -14,8 +14,8 @@ embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defm | |||
| 14 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "1.0.1" |
| 18 | defmt-rtt = "0.4" | 18 | defmt-rtt = "1.0.0" |
| 19 | 19 | ||
| 20 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 20 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 21 | cortex-m-rt = "0.7.0" | 21 | cortex-m-rt = "0.7.0" |
| @@ -24,9 +24,8 @@ embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | |||
| 24 | embedded-hal-async = { version = "1.0" } | 24 | embedded-hal-async = { version = "1.0" } |
| 25 | embedded-io-async = { version = "0.6.1" } | 25 | embedded-io-async = { version = "0.6.1" } |
| 26 | embedded-nal-async = "0.8.0" | 26 | embedded-nal-async = "0.8.0" |
| 27 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 27 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 28 | heapless = { version = "0.8", default-features = false } | 28 | heapless = { version = "0.8", default-features = false } |
| 29 | rand_core = "0.6.3" | ||
| 30 | critical-section = "1.1" | 29 | critical-section = "1.1" |
| 31 | micromath = "2.0.0" | 30 | micromath = "2.0.0" |
| 32 | stm32-fmc = "0.3.0" | 31 | stm32-fmc = "0.3.0" |
diff --git a/examples/stm32h5/src/bin/eth.rs b/examples/stm32h5/src/bin/eth.rs index 4034b552c..1d85cc1e7 100644 --- a/examples/stm32h5/src/bin/eth.rs +++ b/examples/stm32h5/src/bin/eth.rs | |||
| @@ -15,7 +15,6 @@ use embassy_stm32::time::Hertz; | |||
| 15 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 15 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| 16 | use embassy_time::Timer; | 16 | use embassy_time::Timer; |
| 17 | use embedded_io_async::Write; | 17 | use embedded_io_async::Write; |
| 18 | use rand_core::RngCore; | ||
| 19 | use static_cell::StaticCell; | 18 | use static_cell::StaticCell; |
| 20 | use {defmt_rtt as _, panic_probe as _}; | 19 | use {defmt_rtt as _, panic_probe as _}; |
| 21 | 20 | ||
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index 2f98542bb..520d0c8e6 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml | |||
| @@ -15,8 +15,8 @@ embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defm | |||
| 15 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 17 | 17 | ||
| 18 | defmt = "0.3" | 18 | defmt = "1.0.1" |
| 19 | defmt-rtt = "0.4" | 19 | defmt-rtt = "1.0.0" |
| 20 | 20 | ||
| 21 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 21 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 22 | cortex-m-rt = "0.7.0" | 22 | cortex-m-rt = "0.7.0" |
| @@ -25,9 +25,8 @@ embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | |||
| 25 | embedded-hal-async = { version = "1.0" } | 25 | embedded-hal-async = { version = "1.0" } |
| 26 | embedded-nal-async = "0.8.0" | 26 | embedded-nal-async = "0.8.0" |
| 27 | embedded-io-async = { version = "0.6.1" } | 27 | embedded-io-async = { version = "0.6.1" } |
| 28 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 28 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 29 | heapless = { version = "0.8", default-features = false } | 29 | heapless = { version = "0.8", default-features = false } |
| 30 | rand_core = "0.6.3" | ||
| 31 | critical-section = "1.1" | 30 | critical-section = "1.1" |
| 32 | micromath = "2.0.0" | 31 | micromath = "2.0.0" |
| 33 | stm32-fmc = "0.3.0" | 32 | stm32-fmc = "0.3.0" |
diff --git a/examples/stm32h7/src/bin/eth.rs b/examples/stm32h7/src/bin/eth.rs index da7aa4af5..fc14c1a70 100644 --- a/examples/stm32h7/src/bin/eth.rs +++ b/examples/stm32h7/src/bin/eth.rs | |||
| @@ -11,7 +11,6 @@ use embassy_stm32::rng::Rng; | |||
| 11 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 11 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| 12 | use embassy_time::Timer; | 12 | use embassy_time::Timer; |
| 13 | use embedded_io_async::Write; | 13 | use embedded_io_async::Write; |
| 14 | use rand_core::RngCore; | ||
| 15 | use static_cell::StaticCell; | 14 | use static_cell::StaticCell; |
| 16 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 16 | ||
diff --git a/examples/stm32h7/src/bin/eth_client.rs b/examples/stm32h7/src/bin/eth_client.rs index 10485109a..46301a478 100644 --- a/examples/stm32h7/src/bin/eth_client.rs +++ b/examples/stm32h7/src/bin/eth_client.rs | |||
| @@ -14,7 +14,6 @@ use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | |||
| 14 | use embassy_time::Timer; | 14 | use embassy_time::Timer; |
| 15 | use embedded_io_async::Write; | 15 | use embedded_io_async::Write; |
| 16 | use embedded_nal_async::TcpConnect; | 16 | use embedded_nal_async::TcpConnect; |
| 17 | use rand_core::RngCore; | ||
| 18 | use static_cell::StaticCell; | 17 | use static_cell::StaticCell; |
| 19 | use {defmt_rtt as _, panic_probe as _}; | 18 | use {defmt_rtt as _, panic_probe as _}; |
| 20 | 19 | ||
diff --git a/examples/stm32h7/src/bin/eth_client_mii.rs b/examples/stm32h7/src/bin/eth_client_mii.rs index 849173615..99cd1a158 100644 --- a/examples/stm32h7/src/bin/eth_client_mii.rs +++ b/examples/stm32h7/src/bin/eth_client_mii.rs | |||
| @@ -14,7 +14,6 @@ use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | |||
| 14 | use embassy_time::Timer; | 14 | use embassy_time::Timer; |
| 15 | use embedded_io_async::Write; | 15 | use embedded_io_async::Write; |
| 16 | use embedded_nal_async::TcpConnect; | 16 | use embedded_nal_async::TcpConnect; |
| 17 | use rand_core::RngCore; | ||
| 18 | use static_cell::StaticCell; | 17 | use static_cell::StaticCell; |
| 19 | use {defmt_rtt as _, panic_probe as _}; | 18 | use {defmt_rtt as _, panic_probe as _}; |
| 20 | 19 | ||
diff --git a/examples/stm32h723/Cargo.toml b/examples/stm32h723/Cargo.toml index 749fd78ae..1eb706b4d 100644 --- a/examples/stm32h723/Cargo.toml +++ b/examples/stm32h723/Cargo.toml | |||
| @@ -12,8 +12,8 @@ embassy-executor = { version = "0.7.0", path = "../../embassy-executor", feature | |||
| 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 14 | 14 | ||
| 15 | defmt = "0.3" | 15 | defmt = "1.0.1" |
| 16 | defmt-rtt = "0.4" | 16 | defmt-rtt = "1.0.0" |
| 17 | 17 | ||
| 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 19 | cortex-m-rt = "0.7.0" | 19 | cortex-m-rt = "0.7.0" |
| @@ -22,9 +22,8 @@ embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | |||
| 22 | embedded-hal-async = { version = "1.0" } | 22 | embedded-hal-async = { version = "1.0" } |
| 23 | embedded-nal-async = "0.8.0" | 23 | embedded-nal-async = "0.8.0" |
| 24 | embedded-io-async = { version = "0.6.1" } | 24 | embedded-io-async = { version = "0.6.1" } |
| 25 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 25 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 26 | heapless = { version = "0.8", default-features = false } | 26 | heapless = { version = "0.8", default-features = false } |
| 27 | rand_core = "0.6.3" | ||
| 28 | critical-section = "1.1" | 27 | critical-section = "1.1" |
| 29 | static_cell = "2" | 28 | static_cell = "2" |
| 30 | chrono = { version = "^0.4", default-features = false } | 29 | chrono = { version = "^0.4", default-features = false } |
diff --git a/examples/stm32h735/Cargo.toml b/examples/stm32h735/Cargo.toml index 4d31dedf1..2ce989e6f 100644 --- a/examples/stm32h735/Cargo.toml +++ b/examples/stm32h735/Cargo.toml | |||
| @@ -12,12 +12,12 @@ embassy-executor = { version = "0.7.0", path = "../../embassy-executor", feature | |||
| 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 14 | 14 | ||
| 15 | defmt = "0.3" | 15 | defmt = "1.0.1" |
| 16 | defmt-rtt = "0.4" | 16 | defmt-rtt = "1.0.0" |
| 17 | 17 | ||
| 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 19 | cortex-m-rt = "0.7.0" | 19 | cortex-m-rt = "0.7.0" |
| 20 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 20 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 21 | heapless = { version = "0.8", default-features = false } | 21 | heapless = { version = "0.8", default-features = false } |
| 22 | embedded-graphics = { version = "0.8.1" } | 22 | embedded-graphics = { version = "0.8.1" } |
| 23 | tinybmp = { version = "0.5" } | 23 | tinybmp = { version = "0.5" } |
diff --git a/examples/stm32h742/Cargo.toml b/examples/stm32h742/Cargo.toml index e2e0094b8..c3bf39e13 100644 --- a/examples/stm32h742/Cargo.toml +++ b/examples/stm32h742/Cargo.toml | |||
| @@ -39,8 +39,8 @@ embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = [ | |||
| 39 | ] } | 39 | ] } |
| 40 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 40 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 41 | 41 | ||
| 42 | defmt = "0.3" | 42 | defmt = "1.0.1" |
| 43 | defmt-rtt = "0.4" | 43 | defmt-rtt = "1.0.0" |
| 44 | 44 | ||
| 45 | cortex-m = { version = "0.7.6", features = [ | 45 | cortex-m = { version = "0.7.6", features = [ |
| 46 | "inline-asm", | 46 | "inline-asm", |
| @@ -48,10 +48,9 @@ cortex-m = { version = "0.7.6", features = [ | |||
| 48 | ] } | 48 | ] } |
| 49 | cortex-m-rt = "0.7.0" | 49 | cortex-m-rt = "0.7.0" |
| 50 | embedded-hal = "0.2.6" | 50 | embedded-hal = "0.2.6" |
| 51 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 51 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 52 | heapless = { version = "0.8", default-features = false } | 52 | heapless = { version = "0.8", default-features = false } |
| 53 | nb = "1.0.0" | 53 | nb = "1.0.0" |
| 54 | rand_core = "0.6.3" | ||
| 55 | critical-section = "1.1" | 54 | critical-section = "1.1" |
| 56 | embedded-storage = "0.3.1" | 55 | embedded-storage = "0.3.1" |
| 57 | static_cell = "2" | 56 | static_cell = "2" |
diff --git a/examples/stm32h755cm4/Cargo.toml b/examples/stm32h755cm4/Cargo.toml index d2b9b1f0e..96bdd6a48 100644 --- a/examples/stm32h755cm4/Cargo.toml +++ b/examples/stm32h755cm4/Cargo.toml | |||
| @@ -27,7 +27,6 @@ embedded-nal-async = "0.8.0" | |||
| 27 | embedded-io-async = { version = "0.6.1" } | 27 | embedded-io-async = { version = "0.6.1" } |
| 28 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } | 28 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 29 | heapless = { version = "0.8", default-features = false } | 29 | heapless = { version = "0.8", default-features = false } |
| 30 | rand_core = "0.6.3" | ||
| 31 | critical-section = "1.1" | 30 | critical-section = "1.1" |
| 32 | micromath = "2.0.0" | 31 | micromath = "2.0.0" |
| 33 | stm32-fmc = "0.3.0" | 32 | stm32-fmc = "0.3.0" |
diff --git a/examples/stm32h755cm7/Cargo.toml b/examples/stm32h755cm7/Cargo.toml index 2e34f0928..ed4bb9a23 100644 --- a/examples/stm32h755cm7/Cargo.toml +++ b/examples/stm32h755cm7/Cargo.toml | |||
| @@ -27,7 +27,6 @@ embedded-nal-async = "0.8.0" | |||
| 27 | embedded-io-async = { version = "0.6.1" } | 27 | embedded-io-async = { version = "0.6.1" } |
| 28 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } | 28 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 29 | heapless = { version = "0.8", default-features = false } | 29 | heapless = { version = "0.8", default-features = false } |
| 30 | rand_core = "0.6.3" | ||
| 31 | critical-section = "1.1" | 30 | critical-section = "1.1" |
| 32 | micromath = "2.0.0" | 31 | micromath = "2.0.0" |
| 33 | stm32-fmc = "0.3.0" | 32 | stm32-fmc = "0.3.0" |
diff --git a/examples/stm32h7b0/Cargo.toml b/examples/stm32h7b0/Cargo.toml index e5f2dfe86..e4f1080ac 100644 --- a/examples/stm32h7b0/Cargo.toml +++ b/examples/stm32h7b0/Cargo.toml | |||
| @@ -14,8 +14,8 @@ embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defm | |||
| 14 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "1.0.1" |
| 18 | defmt-rtt = "0.4" | 18 | defmt-rtt = "1.0.0" |
| 19 | 19 | ||
| 20 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 20 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 21 | cortex-m-rt = "0.7.0" | 21 | cortex-m-rt = "0.7.0" |
| @@ -24,9 +24,8 @@ embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | |||
| 24 | embedded-hal-async = { version = "1.0" } | 24 | embedded-hal-async = { version = "1.0" } |
| 25 | embedded-nal-async = "0.8.0" | 25 | embedded-nal-async = "0.8.0" |
| 26 | embedded-io-async = { version = "0.6.1" } | 26 | embedded-io-async = { version = "0.6.1" } |
| 27 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 27 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 28 | heapless = { version = "0.8", default-features = false } | 28 | heapless = { version = "0.8", default-features = false } |
| 29 | rand_core = "0.6.3" | ||
| 30 | critical-section = "1.1" | 29 | critical-section = "1.1" |
| 31 | micromath = "2.0.0" | 30 | micromath = "2.0.0" |
| 32 | stm32-fmc = "0.3.0" | 31 | stm32-fmc = "0.3.0" |
diff --git a/examples/stm32h7rs/Cargo.toml b/examples/stm32h7rs/Cargo.toml index 22d59be04..58f8b1274 100644 --- a/examples/stm32h7rs/Cargo.toml +++ b/examples/stm32h7rs/Cargo.toml | |||
| @@ -14,8 +14,8 @@ embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defm | |||
| 14 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "1.0.1" |
| 18 | defmt-rtt = "0.4" | 18 | defmt-rtt = "1.0.0" |
| 19 | 19 | ||
| 20 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 20 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 21 | cortex-m-rt = "0.7.0" | 21 | cortex-m-rt = "0.7.0" |
| @@ -24,9 +24,8 @@ embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | |||
| 24 | embedded-hal-async = { version = "1.0" } | 24 | embedded-hal-async = { version = "1.0" } |
| 25 | embedded-nal-async = "0.8.0" | 25 | embedded-nal-async = "0.8.0" |
| 26 | embedded-io-async = { version = "0.6.1" } | 26 | embedded-io-async = { version = "0.6.1" } |
| 27 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 27 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 28 | heapless = { version = "0.8", default-features = false } | 28 | heapless = { version = "0.8", default-features = false } |
| 29 | rand_core = "0.6.3" | ||
| 30 | critical-section = "1.1" | 29 | critical-section = "1.1" |
| 31 | micromath = "2.0.0" | 30 | micromath = "2.0.0" |
| 32 | stm32-fmc = "0.3.0" | 31 | stm32-fmc = "0.3.0" |
diff --git a/examples/stm32h7rs/src/bin/eth.rs b/examples/stm32h7rs/src/bin/eth.rs index f2bd9575e..6d246bb09 100644 --- a/examples/stm32h7rs/src/bin/eth.rs +++ b/examples/stm32h7rs/src/bin/eth.rs | |||
| @@ -11,7 +11,6 @@ use embassy_stm32::rng::Rng; | |||
| 11 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 11 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| 12 | use embassy_time::Timer; | 12 | use embassy_time::Timer; |
| 13 | use heapless::Vec; | 13 | use heapless::Vec; |
| 14 | use rand_core::RngCore; | ||
| 15 | use static_cell::StaticCell; | 14 | use static_cell::StaticCell; |
| 16 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 16 | ||
diff --git a/examples/stm32l0/Cargo.toml b/examples/stm32l0/Cargo.toml index 189b0e8d4..ce54ad9fb 100644 --- a/examples/stm32l0/Cargo.toml +++ b/examples/stm32l0/Cargo.toml | |||
| @@ -11,8 +11,8 @@ embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["de | |||
| 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | 13 | ||
| 14 | defmt = "0.3" | 14 | defmt = "1.0.1" |
| 15 | defmt-rtt = "0.4" | 15 | defmt-rtt = "1.0.0" |
| 16 | 16 | ||
| 17 | embedded-storage = "0.3.1" | 17 | embedded-storage = "0.3.1" |
| 18 | embedded-io = { version = "0.6.0" } | 18 | embedded-io = { version = "0.6.0" } |
| @@ -20,7 +20,7 @@ embedded-io-async = { version = "0.6.1" } | |||
| 20 | 20 | ||
| 21 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 21 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 22 | cortex-m-rt = "0.7.0" | 22 | cortex-m-rt = "0.7.0" |
| 23 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 23 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 24 | heapless = { version = "0.8", default-features = false } | 24 | heapless = { version = "0.8", default-features = false } |
| 25 | embedded-hal = "0.2.6" | 25 | embedded-hal = "0.2.6" |
| 26 | static_cell = { version = "2" } | 26 | static_cell = { version = "2" } |
diff --git a/examples/stm32l1/Cargo.toml b/examples/stm32l1/Cargo.toml index 6066b6dc7..a780f9290 100644 --- a/examples/stm32l1/Cargo.toml +++ b/examples/stm32l1/Cargo.toml | |||
| @@ -12,13 +12,13 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [ | |||
| 12 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } | 12 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } |
| 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 14 | 14 | ||
| 15 | defmt = "0.3" | 15 | defmt = "1.0.1" |
| 16 | defmt-rtt = "0.4" | 16 | defmt-rtt = "1.0.0" |
| 17 | 17 | ||
| 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 19 | cortex-m-rt = "0.7.0" | 19 | cortex-m-rt = "0.7.0" |
| 20 | embedded-hal = "0.2.6" | 20 | embedded-hal = "0.2.6" |
| 21 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 21 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 22 | heapless = { version = "0.8", default-features = false } | 22 | heapless = { version = "0.8", default-features = false } |
| 23 | embedded-storage = "0.3.1" | 23 | embedded-storage = "0.3.1" |
| 24 | 24 | ||
diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml index 239bfcd79..5c4dce482 100644 --- a/examples/stm32l4/Cargo.toml +++ b/examples/stm32l4/Cargo.toml | |||
| @@ -18,8 +18,8 @@ embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | |||
| 18 | embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } | 18 | embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } |
| 19 | embedded-io = { version = "0.6.0", features = ["defmt-03"] } | 19 | embedded-io = { version = "0.6.0", features = ["defmt-03"] } |
| 20 | 20 | ||
| 21 | defmt = "0.3" | 21 | defmt = "1.0.1" |
| 22 | defmt-rtt = "0.4" | 22 | defmt-rtt = "1.0.0" |
| 23 | 23 | ||
| 24 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } | 24 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 25 | cortex-m-rt = "0.7.0" | 25 | cortex-m-rt = "0.7.0" |
| @@ -27,10 +27,9 @@ embedded-hal = "0.2.6" | |||
| 27 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | 27 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } |
| 28 | embedded-hal-async = { version = "1.0" } | 28 | embedded-hal-async = { version = "1.0" } |
| 29 | embedded-hal-bus = { version = "0.1", features = ["async"] } | 29 | embedded-hal-bus = { version = "0.1", features = ["async"] } |
| 30 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 30 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 31 | heapless = { version = "0.8", default-features = false } | 31 | heapless = { version = "0.8", default-features = false } |
| 32 | chrono = { version = "^0.4", default-features = false } | 32 | chrono = { version = "^0.4", default-features = false } |
| 33 | rand = { version = "0.8.5", default-features = false } | ||
| 34 | static_cell = "2" | 33 | static_cell = "2" |
| 35 | 34 | ||
| 36 | micromath = "2.0.0" | 35 | micromath = "2.0.0" |
diff --git a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs index 4a7c01f9f..354ac90b2 100644 --- a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs +++ b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs | |||
| @@ -38,7 +38,6 @@ use embedded_io::Write as bWrite; | |||
| 38 | use embedded_io_async::Write; | 38 | use embedded_io_async::Write; |
| 39 | use heapless::Vec; | 39 | use heapless::Vec; |
| 40 | use panic_probe as _; | 40 | use panic_probe as _; |
| 41 | use rand::RngCore; | ||
| 42 | use static_cell::StaticCell; | 41 | use static_cell::StaticCell; |
| 43 | 42 | ||
| 44 | bind_interrupts!(struct Irqs { | 43 | bind_interrupts!(struct Irqs { |
diff --git a/examples/stm32l432/Cargo.toml b/examples/stm32l432/Cargo.toml index e155b3e66..ac7e507de 100644 --- a/examples/stm32l432/Cargo.toml +++ b/examples/stm32l432/Cargo.toml | |||
| @@ -10,8 +10,8 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [ | |||
| 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = [ "defmt" ] } | 10 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = [ "defmt" ] } |
| 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = [ "arch-cortex-m", "executor-thread", "defmt" ] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = [ "arch-cortex-m", "executor-thread", "defmt" ] } |
| 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = [ "defmt", "defmt-timestamp-uptime", "tick-hz-32_768" ] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = [ "defmt", "defmt-timestamp-uptime", "tick-hz-32_768" ] } |
| 13 | defmt = "0.3" | 13 | defmt = "1.0.1" |
| 14 | defmt-rtt = "0.4" | 14 | defmt-rtt = "1.0.0" |
| 15 | 15 | ||
| 16 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } | 16 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 17 | cortex-m-rt = "0.7.0" | 17 | cortex-m-rt = "0.7.0" |
| @@ -19,7 +19,7 @@ embedded-hal = "0.2.6" | |||
| 19 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | 19 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } |
| 20 | embedded-hal-async = { version = "1.0" } | 20 | embedded-hal-async = { version = "1.0" } |
| 21 | embedded-hal-bus = { version = "0.1", features = ["async"] } | 21 | embedded-hal-bus = { version = "0.1", features = ["async"] } |
| 22 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 22 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 23 | 23 | ||
| 24 | [profile.release] | 24 | [profile.release] |
| 25 | debug = 2 | 25 | debug = 2 |
diff --git a/examples/stm32l5/Cargo.toml b/examples/stm32l5/Cargo.toml index 4c372a554..138276b7f 100644 --- a/examples/stm32l5/Cargo.toml +++ b/examples/stm32l5/Cargo.toml | |||
| @@ -15,15 +15,14 @@ embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defm | |||
| 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 16 | usbd-hid = "0.8.1" | 16 | usbd-hid = "0.8.1" |
| 17 | 17 | ||
| 18 | defmt = "0.3" | 18 | defmt = "1.0.1" |
| 19 | defmt-rtt = "0.4" | 19 | defmt-rtt = "1.0.0" |
| 20 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 20 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 21 | 21 | ||
| 22 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 22 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 23 | cortex-m-rt = "0.7.0" | 23 | cortex-m-rt = "0.7.0" |
| 24 | embedded-hal = "0.2.6" | 24 | embedded-hal = "0.2.6" |
| 25 | heapless = { version = "0.8", default-features = false } | 25 | heapless = { version = "0.8", default-features = false } |
| 26 | rand_core = { version = "0.6.3", default-features = false } | ||
| 27 | embedded-io-async = { version = "0.6.1" } | 26 | embedded-io-async = { version = "0.6.1" } |
| 28 | static_cell = "2" | 27 | static_cell = "2" |
| 29 | 28 | ||
diff --git a/examples/stm32l5/src/bin/usb_ethernet.rs b/examples/stm32l5/src/bin/usb_ethernet.rs index 809ec6ab1..6c72132c6 100644 --- a/examples/stm32l5/src/bin/usb_ethernet.rs +++ b/examples/stm32l5/src/bin/usb_ethernet.rs | |||
| @@ -12,7 +12,6 @@ use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState | |||
| 12 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; | 12 | use embassy_usb::class::cdc_ncm::{CdcNcmClass, State}; |
| 13 | use embassy_usb::{Builder, UsbDevice}; | 13 | use embassy_usb::{Builder, UsbDevice}; |
| 14 | use embedded_io_async::Write; | 14 | use embedded_io_async::Write; |
| 15 | use rand_core::RngCore; | ||
| 16 | use static_cell::StaticCell; | 15 | use static_cell::StaticCell; |
| 17 | use {defmt_rtt as _, panic_probe as _}; | 16 | use {defmt_rtt as _, panic_probe as _}; |
| 18 | 17 | ||
diff --git a/examples/stm32u0/Cargo.toml b/examples/stm32u0/Cargo.toml index efcb9bf4d..86cff2321 100644 --- a/examples/stm32u0/Cargo.toml +++ b/examples/stm32u0/Cargo.toml | |||
| @@ -13,13 +13,13 @@ embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["de | |||
| 13 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] } | 13 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | 15 | ||
| 16 | defmt = "0.3" | 16 | defmt = "1.0.1" |
| 17 | defmt-rtt = "0.4" | 17 | defmt-rtt = "1.0.0" |
| 18 | 18 | ||
| 19 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } | 19 | cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] } |
| 20 | cortex-m-rt = "0.7.0" | 20 | cortex-m-rt = "0.7.0" |
| 21 | embedded-hal = "0.2.6" | 21 | embedded-hal = "0.2.6" |
| 22 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 22 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 23 | heapless = { version = "0.8", default-features = false } | 23 | heapless = { version = "0.8", default-features = false } |
| 24 | 24 | ||
| 25 | micromath = "2.0.0" | 25 | micromath = "2.0.0" |
diff --git a/examples/stm32u5/Cargo.toml b/examples/stm32u5/Cargo.toml index 886c5cb2e..94f77ce2f 100644 --- a/examples/stm32u5/Cargo.toml +++ b/examples/stm32u5/Cargo.toml | |||
| @@ -13,13 +13,13 @@ embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["de | |||
| 13 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } | 13 | embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | 15 | ||
| 16 | defmt = "0.3" | 16 | defmt = "1.0.1" |
| 17 | defmt-rtt = "0.4" | 17 | defmt-rtt = "1.0.0" |
| 18 | 18 | ||
| 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 20 | cortex-m-rt = "0.7.0" | 20 | cortex-m-rt = "0.7.0" |
| 21 | embedded-hal = "0.2.6" | 21 | embedded-hal = "0.2.6" |
| 22 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 22 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 23 | heapless = { version = "0.8", default-features = false } | 23 | heapless = { version = "0.8", default-features = false } |
| 24 | embedded-graphics = { version = "0.8.1" } | 24 | embedded-graphics = { version = "0.8.1" } |
| 25 | tinybmp = { version = "0.6.0" } | 25 | tinybmp = { version = "0.6.0" } |
diff --git a/examples/stm32wb/Cargo.toml b/examples/stm32wb/Cargo.toml index 96f66f3af..a83871d4d 100644 --- a/examples/stm32wb/Cargo.toml +++ b/examples/stm32wb/Cargo.toml | |||
| @@ -11,15 +11,15 @@ embassy-stm32-wpan = { version = "0.1.0", path = "../../embassy-stm32-wpan", fea | |||
| 11 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } | 11 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } |
| 12 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 12 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 13 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 13 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 14 | embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "udp", "proto-ipv6", "medium-ieee802154", ], optional=true } | 14 | embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "udp", "proto-ipv6", "medium-ieee802154", ], optional = true } |
| 15 | 15 | ||
| 16 | defmt = "0.3" | 16 | defmt = "1.0.1" |
| 17 | defmt-rtt = "0.4" | 17 | defmt-rtt = "1.0.0" |
| 18 | 18 | ||
| 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 19 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 20 | cortex-m-rt = "0.7.0" | 20 | cortex-m-rt = "0.7.0" |
| 21 | embedded-hal = "0.2.6" | 21 | embedded-hal = "1.0.0" |
| 22 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 22 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 23 | heapless = { version = "0.8", default-features = false } | 23 | heapless = { version = "0.8", default-features = false } |
| 24 | static_cell = "2" | 24 | static_cell = "2" |
| 25 | 25 | ||
diff --git a/examples/stm32wba/Cargo.toml b/examples/stm32wba/Cargo.toml index 60b09adb4..b87ca88bf 100644 --- a/examples/stm32wba/Cargo.toml +++ b/examples/stm32wba/Cargo.toml | |||
| @@ -9,15 +9,15 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [ | |||
| 9 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } | 9 | embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } |
| 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 12 | embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "udp", "proto-ipv6", "medium-ieee802154", ], optional=true } | 12 | embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "udp", "proto-ipv6", "medium-ieee802154", ], optional = true } |
| 13 | 13 | ||
| 14 | defmt = "0.3" | 14 | defmt = "1.0.1" |
| 15 | defmt-rtt = "0.4" | 15 | defmt-rtt = "1.0.0" |
| 16 | 16 | ||
| 17 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 17 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 18 | cortex-m-rt = "0.7.0" | 18 | cortex-m-rt = "0.7.0" |
| 19 | embedded-hal = "0.2.6" | 19 | embedded-hal = "1.0.0" |
| 20 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 20 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 21 | heapless = { version = "0.8", default-features = false } | 21 | heapless = { version = "0.8", default-features = false } |
| 22 | static_cell = "2" | 22 | static_cell = "2" |
| 23 | 23 | ||
diff --git a/examples/stm32wl/Cargo.toml b/examples/stm32wl/Cargo.toml index 6b677914e..1b6a23bed 100644 --- a/examples/stm32wl/Cargo.toml +++ b/examples/stm32wl/Cargo.toml | |||
| @@ -12,14 +12,14 @@ embassy-executor = { version = "0.7.0", path = "../../embassy-executor", feature | |||
| 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.3.0", path = "../../embassy-embedded-hal" } |
| 14 | 14 | ||
| 15 | defmt = "0.3" | 15 | defmt = "1.0.1" |
| 16 | defmt-rtt = "0.4" | 16 | defmt-rtt = "1.0.0" |
| 17 | 17 | ||
| 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 18 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 19 | cortex-m-rt = "0.7.0" | 19 | cortex-m-rt = "0.7.0" |
| 20 | embedded-hal = "0.2.6" | 20 | embedded-hal = "0.2.6" |
| 21 | embedded-storage = "0.3.1" | 21 | embedded-storage = "0.3.1" |
| 22 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 22 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 23 | heapless = { version = "0.8", default-features = false } | 23 | heapless = { version = "0.8", default-features = false } |
| 24 | chrono = { version = "^0.4", default-features = false } | 24 | chrono = { version = "^0.4", default-features = false } |
| 25 | 25 | ||
