Closed BlinkyStitt closed 3 years ago
It looks like new
expects a Base
and not a Wrapper
. I'm not sure how best to use these traits. Let me know, or feel free to commandeer this PR.
hey thanks, the trait bounds one these are a bit tricky because it's meant to be abstract over both SPI and UART, but Base
is implemented for Wrapper
, there's just a missing trait bound (see comment).
I also dropped the patch versions from the cargo.toml. I've had a few headaches before dealing with mismatched match versions when a pin to the minor version is almost always fine. I can include the patch version if you prefer that though.
it doesn't really matter imo. 0.2.1
will pull anything newer than that in the 0.2
series which is basically the same as not having the patch, though it means no regression is possible, and it's up to us (maintainers) to do our best not to break things across patches anyway.
(there's also rust-radio-sx128x to look at but, it's patched up for the embedded-hal
alpha release and my spi-transactions
patch, both of which will be huge simplifications when they're landed).
I think it is working. I don't have hardware setup to test it yet, but it compiles
I'm trying to test this, but I'm a bit stuck. Do you have any examples of this code being used? I'm not sure what to pass for delay
EDIT: I think this is right
let delay = hal::delay::Delay::new(device.SYST, &mut clocks);
OR
let delay = AsmDelay::new(asm_delay::bitrate::U32BitrateExt::mhz(48));
yeah that's right, just needs something that implements DelayMs
and DelayUs
from embedded-hal
. There's a utility in the repo that demonstrates use, though linux-embedded-hal
provides a Delay
object.
Tested with embedded-spi 0.6.2 and it resolves the compilation errors also there.
Are there any plans to merge this soon?
thanks for the reminder, looks good to me
Upgrade embedded-spi, structopt, radio, simplelog, humantime, color-backtrace.
I also dropped the patch versions from the cargo.toml. I've had a few headaches before dealing with mismatched match versions when a pin to the minor version is almost always fine. I can include the patch version if you prefer that though.
I was able to figure out some of the changes by looking at https://github.com/ryankurte/rust-embedded-spi/pull/2.
This doesn't compile yet though. I'm sure I'm missing something small.