embassy-traits have not made a release for 2 years, even though the embassy project has been expanding. As embassy now implements the embedded-hal-async traits, replacing embassy-traits with embedded-hal-async traits should be a drop-in replacement.
Also, embassy-traits does not even compile anymore on latest nightlies.
Summary of changes:
Update dependency
Update from embassy_traits::delay::Delay to embedded_hal_async::delay::DelayUs
Update from embassy_traits::i2c::I2c to embedded_hal_async::i2c::I2c
The Delay trait in embedded-hal-async is narrower than the one in embassy-traits. I do not know why there were 5u8 as u64 instances, but the embedded-hal trait only supports u32, so I removed all casts from the delay calls.
The min_type_alias_impl_trait feature is not needed anymore
The impl_trait_in_assoc_type feature is now required
A constraint on the DelayUs trait was needed in DataBus::WriteFuture for the D parameter.
where Self: 'a is currently required on DataBus::WriteFuture to ensure that impls have maximum flexibility (See rust-lang/rust#87479)
embassy-traits have not made a release for 2 years, even though the embassy project has been expanding. As embassy now implements the embedded-hal-async traits, replacing embassy-traits with embedded-hal-async traits should be a drop-in replacement.
Also, embassy-traits does not even compile anymore on latest nightlies.
Summary of changes:
embassy_traits::delay::Delay
toembedded_hal_async::delay::DelayUs
embassy_traits::i2c::I2c
toembedded_hal_async::i2c::I2c
5u8 as u64
instances, but the embedded-hal trait only supportsu32
, so I removed all casts from the delay calls.min_type_alias_impl_trait
feature is not needed anymoreimpl_trait_in_assoc_type
feature is now requiredDelayUs
trait was needed inDataBus::WriteFuture
for theD
parameter.where Self: 'a
is currently required onDataBus::WriteFuture
to ensure that impls have maximum flexibility (Seerust-lang/rust#87479
)