Hello Greger, I used to get these errors when the embassy dependencies in the Cargo.toml weren't pointing at the correct repo and version. Here's what I have:
embassy-sync = { version = "0.1.0", git = "github.com/embassy-rs/embassy"}
embassy-executor = { version = "0.1.0", git = "github.com/embassy-rs/embassy", features = ["integrated-timers"] }
embassy-time = { version = "0.1.0", git = "github.com/embassy-rs/embassy", features = ["unstable-traits", "tick-hz-32_768"] }
embassy-stm32 = { version = "0.1.0", git = "github.com/embassy-rs/embassy", features = ["nightly", "unstable-traits", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-any", "exti"] }
Hello Omar,
I try to test this example but I get compile errors! Do you know what is the problem? Regards, Greger Sernemar
error[E0635]: unknown feature
impl_trait_projections--> /Users/greggoogelgs/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-io-0.4.0/src/lib.rs:2:59 | 2 | #![cfg_attr(feature = "async", feature(async_fn_in_trait, impl_trait_projections))] | ^^^^^^^^^^^^^^^^^^^^^^Compiling cortex-m v0.7.7 Compiling futures-channel v0.3.25 error[E0760]:
async fnreturn type cannot contain a projection orSelfthat references lifetimes from a parent scope --> /Users/greggoogelgs/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-io-0.4.0/src/asynch.rs:86:49 | 86 | async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> { | ^^^^^^^^^^^^^^----^^^^^^^^ | | | help: consider spelling out the type instead:<&mut T as asynch::Read>