-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
embedded-hal version conflicts #18
Comments
yep, you'll need to be running exactly the same version of the alpha hal everywhere as the traits are not compatible (and the errors, difficult to interpret).
PRs are only created when you click something to do so, pushing to a your fork will output a link you can open to the correct page to do so but not create a PR itself. You can also always open a PR as a draft to indicate it's for discussion / not ready for merging. i haven't looked at the example yet but, i think the first comment should help. fyi when you do attach big outputs / logs / sources / whatever to GH issues i'd generally recommend either an uploaded text file you use collapse tags like i have edited above. |
Sorry to be a bit slow, I thought I could "patch"
or
in my Cargo.toml, but I tried several variations which all give 404 errors. How does one do this "patch"? |
you're super close, need to split the git path and branch. should be something like: [patch.crates-io]
stm32f4xx-hal = { git = "https://github.com/maxekman/stm32f4xx-hal", branch="update-to-try-functions" } |
So in my forked version of
when I do
and if I rm Cargo tree output$ cargo tree -p embedded-hal:1.0.0-alpha.4warning: Patch $ cargo tree -i embedded-hal $ cargo tree -p embedded-hal:1.0.0-alpha.4 $ cargo tree -p embedded-hal:0.2.4 |
Possibly I have to apply the patch to a specific (release?) version of stm32f4xx-hal rather than the latest git version? When I specify
I do seem to be getting closer. |
After more careful reading of the appropriate section of The Cargo Book (https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html) I see I should be doing either
or
or one of the commented out alternatives. All give the conflict reported in the comment just above. If I understand correctly, the problem is that the patch is moving the stm32f4xx-hal dependency on e-h to alpha.1 but rust-radio-sx127x needs it moved up to alpha.4. I don't see any way to make either part of this into a caret specification on the alpha version. Is there a way to do that, or do I have to make my own patch? Would it be useful or not for me to do a PR as a draft? |
ahh, yes that'd do it. there's a loose preference to use strict matches for alpha releases because they can be breaking, the side-effect in this instance is that the |
I seem to have similiar issues with
Leads to:
|
yeeah, you'll need to run a version of wrt. |
I was having similar problems so wrote a quick adapter that might help you here, you should hopefully be able to |
This looks like the problem I was having in December before I had to put it aside to deal with some other things. Hoping to get back to it in the next few days so please keep posting progress/problem reports. |
heads up i've published releases against |
I seem to have fallen into dependency version hell with the switch to
embedded-hal 1.0.0-alpha.4
. I think the main problem is that the spi setup usingstm32f4xx_hal
, which still usesembedded-hal 0.2.4
, does not mix well with theSx127x::spi()
use of thespi
. One problem was that themode
argument forstm32f4xx_hal::spi::Spi::spi1
wants the older version. I fixed this by importing these fromstm32f4xx_hal
rather than fromembedded-hal
. (I suppose that is probably the correct way to do it anyway.)The next problem I think is related but I don't really understand it. There is lots of trouble satisfying traits and I think this is because of the mix of
embedded-hal
versions being used in the callSx127x::spi
is using the new version ofembedded-hal
whilespi,
is set up with the old version.I have tried to get this to work two different ways, one with my usual setup which allows me to specify the version of
embedded-hal
my code uses, and the other by forkingrust-radio-sx127x
and putting an example in an examples-testing branch at https://github.com/pdgilbert/rust-radio-sx127x. (BTW, I am confused about whether the push of a branch on my fork automatically made a pull request upstream. If so, I did not intend to do that yet.) The latter way seems to force using the sameembedded-hal
as specified in the crate. Trying to build the example forced some Cargo.toml changes in the branch of the fork. Most notably I had to comment out thecolor-backtrace
dependency because I could not get it to stop looking forstd
and thus failing. (Possibly there are other more notable changes that I don`t recognize which are causing the example build failure?)The example has been stripped down to remove the
setup()
function that causes additional difficulties, and some warnings are caused by not using imports for that. PossiblyInputPin
andOutputPin
are getting messed up by no longer having a v2 reference? The error seem to be pretty much the same for the two different ways:Build output
``` $ cargo build --target thumbv7em-none-eabihf --no-default-features --features="stm32f411, stm32f4xx" --example lora_spi_send Compiling radio-sx127x v0.10.1 (/home/paul/githubClones/rust-radio-sx127x) warning: unused import: `blocking::delay::DelayMs` --> examples/lora_spi_send.rs:36:20 | 36 | use embedded_hal::{blocking::delay::DelayMs, | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by defaultwarning: unused import:
Error as WrapError
--> examples/lora_spi_send.rs:41:50
|
41 | use driver_pal::{wrapper::Wrapper as SpiWrapper, Error as WrapError};
| ^^^^^^^^^^^^^^^^^^
warning: unused import:
radio_sx127x::Error as sx127xError
--> examples/lora_spi_send.rs:47:5
|
47 | use radio_sx127x::Error as sx127xError; // Error name conflict with hals
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound
stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>: embedded_hal::blocking::spi::transfer::Default<u8>
is not satisfied--> examples/lora_spi_send.rs:626:19
|
626 | let lora = Sx127x::spi(
| ^^^^^^^^^^^ the trait
embedded_hal::blocking::spi::transfer::Default<u8>
is not implemented forstm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>
|
help: trait impl with same name found
--> /home/paul/.cargo/git/checkouts/stm32f4xx-hal-fe8350cc04cacf3f/4b04112/src/spi.rs:1072:1
|
1072 | / impl<SPI, PINS> embedded_hal::blocking::spi::transfer::Default for Spi<SPI, PINS> where
1073 | | SPI: Deref<Target = spi1::RegisterBlock>
1074 | | {
1075 | | }
| |_^
= note: perhaps two different versions of crate
embedded_hal
are being used?= note: required because of the requirements on the impl of
embedded_hal::blocking::spi::Transfer<u8>
forstm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>
= note: required by
radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi
error[E0277]: the trait bound
stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>: embedded_hal::blocking::spi::write::Default<u8>
is not satisfied--> examples/lora_spi_send.rs:626:19
|
626 | let lora = Sx127x::spi(
| ^^^^^^^^^^^ the trait
embedded_hal::blocking::spi::write::Default<u8>
is not implemented forstm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>
|
help: trait impl with same name found
--> /home/paul/.cargo/git/checkouts/stm32f4xx-hal-fe8350cc04cacf3f/4b04112/src/spi.rs:1077:1
|
1077 | / impl<SPI, PINS> embedded_hal::blocking::spi::write::Default for Spi<SPI, PINS> where
1078 | | SPI: Deref<Target = spi1::RegisterBlock>
1079 | | {
1080 | | }
| |_^
= note: perhaps two different versions of crate
embedded_hal
are being used?= note: required because of the requirements on the impl of
embedded_hal::blocking::spi::Write<u8>
forstm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>
= note: required by
radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi
error[E0277]: the trait bound
stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>: embedded_hal::blocking::spi::transactional::Default<u8>
is not satisfied--> examples/lora_spi_send.rs:626:19
|
626 | let lora = Sx127x::spi(
| ^^^^^^^^^^^ the trait
embedded_hal::blocking::spi::transactional::Default<u8>
is not implemented forstm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>
|
= note: required because of the requirements on the impl of
embedded_hal::blocking::spi::Transactional<u8>
forstm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>
= note: required by
radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi
error[E0277]: the trait bound
stm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>: embedded_hal::digital::OutputPin
is not satisfied--> examples/lora_spi_send.rs:626:19
|
626 | let lora = Sx127x::spi(
| ^^^^^^^^^^^ the trait
embedded_hal::digital::OutputPin
is not implemented forstm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>
|
= note: required by
radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi
error[E0277]: the trait bound
stm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>: embedded_hal::digital::InputPin
is not satisfied--> examples/lora_spi_send.rs:626:19
|
626 | let lora = Sx127x::spi(
| ^^^^^^^^^^^ the trait
embedded_hal::digital::InputPin
is not implemented forstm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>
|
= note: required by
radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi
error[E0277]: the trait bound
stm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>: embedded_hal::digital::InputPin
is not satisfied--> examples/lora_spi_send.rs:626:19
|
626 | let lora = Sx127x::spi(
| ^^^^^^^^^^^ the trait
embedded_hal::digital::InputPin
is not implemented forstm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>
|
= note: required by
radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi
error[E0277]: the trait bound
stm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>: embedded_hal::digital::OutputPin
is not satisfied--> examples/lora_spi_send.rs:626:19
|
626 | let lora = Sx127x::spi(
| ^^^^^^^^^^^ the trait
embedded_hal::digital::OutputPin
is not implemented forstm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>
|
= note: required by
radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi
error[E0277]: the trait bound
stm32f4xx_hal::delay::Delay: embedded_hal::blocking::delay::DelayMs<u32>
is not satisfied--> examples/lora_spi_send.rs:632:10
|
632 | delay, //Delay
| ^^^^^ the trait
embedded_hal::blocking::delay::DelayMs<u32>
is not implemented forstm32f4xx_hal::delay::Delay
|
help: trait impl with same name found
--> /home/paul/.cargo/git/checkouts/stm32f4xx-hal-fe8350cc04cacf3f/4b04112/src/delay.rs:30:1
|
30 | / impl DelayMs for Delay {
31 | | fn delay_ms(&mut self, ms: u32) {
32 | | self.delay_us(ms * 1_000);
33 | | }
34 | | }
| |_^
= note: perhaps two different versions of crate
embedded_hal
are being used?= note: required by
radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi
error[E0277]: the trait bound
stm32f4xx_hal::delay::Delay: embedded_hal::blocking::delay::DelayUs<u32>
is not satisfied--> examples/lora_spi_send.rs:632:10
|
632 | delay, //Delay
| ^^^^^ the trait
embedded_hal::blocking::delay::DelayUs<u32>
is not implemented forstm32f4xx_hal::delay::Delay
|
help: trait impl with same name found
--> /home/paul/.cargo/git/checkouts/stm32f4xx-hal-fe8350cc04cacf3f/4b04112/src/delay.rs:82:1
|
82 | / impl DelayUs for Delay {
83 | | fn delay_us(&mut self, us: u8) {
84 | | self.delay_us(u32(us))
85 | | }
86 | | }
| |_^
= note: perhaps two different versions of crate
embedded_hal
are being used?= note: required by
radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi
error[E0599]: no method named
start_transmit
found for structradio_sx127x::Sx127x<driver_pal::wrapper::Wrapper<stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>, _, stm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, stm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, _, stm32f4xx_hal::delay::Delay, _>, _, _, _>
in the current scope--> examples/lora_spi_send.rs:679:13
|
679 | lora.start_transmit(message).unwrap(); // should handle error
| ^^^^^^^^^^^^^^ method not found in
radio_sx127x::Sx127x<driver_pal::wrapper::Wrapper<stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>, _, stm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, stm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, _, stm32f4xx_hal::delay::Delay, _>, _, _, _>
|
::: /home/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/driver-pal-0.8.0-alpha.0/src/wrapper.rs:12:1
|
12 | pub struct Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError> {
| -------------------------------------------------------------------------------------------------- doesn't satisfy
_: radio_sx127x::base::Base<_, _, _>
|
::: /home/paul/githubClones/rust-radio-sx127x/src/lib.rs:56:1
|
56 | pub struct Sx127x<Base, CommsError, PinError, DelayError> {
| --------------------------------------------------------- doesn't satisfy
_: radio::Transmit
|
= note: the method
start_transmit
exists but the following trait bounds were not satisfied:driver_pal::wrapper::Wrapper<stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>, _, stm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, stm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, _, stm32f4xx_hal::delay::Delay, _>: radio_sx127x::base::Base<_, _, _>
which is required by
radio_sx127x::Sx127x<driver_pal::wrapper::Wrapper<stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>, _, stm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, stm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, _, stm32f4xx_hal::delay::Delay, _>, _, _, _>: radio::Transmit
error[E0599]: no method named
check_transmit
found for structradio_sx127x::Sx127x<driver_pal::wrapper::Wrapper<stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>, _, stm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, stm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, _, stm32f4xx_hal::delay::Delay, _>, _, _, _>
in the current scope--> examples/lora_spi_send.rs:681:19
|
681 | match lora.check_transmit() {
| ^^^^^^^^^^^^^^ method not found in
radio_sx127x::Sx127x<driver_pal::wrapper::Wrapper<stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>, _, stm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, stm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, _, stm32f4xx_hal::delay::Delay, _>, _, _, _>
|
::: /home/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/driver-pal-0.8.0-alpha.0/src/wrapper.rs:12:1
|
12 | pub struct Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError> {
| -------------------------------------------------------------------------------------------------- doesn't satisfy
_: radio_sx127x::base::Base<_, _, _>
|
::: /home/paul/githubClones/rust-radio-sx127x/src/lib.rs:56:1
|
56 | pub struct Sx127x<Base, CommsError, PinError, DelayError> {
| --------------------------------------------------------- doesn't satisfy
_: radio::Transmit
|
= note: the method
check_transmit
exists but the following trait bounds were not satisfied:driver_pal::wrapper::Wrapper<stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>, _, stm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, stm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, _, stm32f4xx_hal::delay::Delay, _>: radio_sx127x::base::Base<_, _, _>
which is required by
radio_sx127x::Sx127x<driver_pal::wrapper::Wrapper<stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>, _, stm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, stm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, _, stm32f4xx_hal::delay::Delay, _>, _, _, _>: radio::Transmit
error[E0599]: no method named
delay_ms
found for structradio_sx127x::Sx127x<driver_pal::wrapper::Wrapper<stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>, _, stm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, stm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, _, stm32f4xx_hal::delay::Delay, _>, _, _, _>
in the current scope--> examples/lora_spi_send.rs:688:13
|
688 | lora.delay_ms(5000u32);
| ^^^^^^^^ method not found in
radio_sx127x::Sx127x<driver_pal::wrapper::Wrapper<stm32f4xx_hal::spi::Spi<stm32f4::stm32f411::SPI1, (stm32f4xx_hal::gpio::gpioa::PA5<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA6<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>, stm32f4xx_hal::gpio::gpioa::PA7<stm32f4xx_hal::gpio::Alternate<stm32f4xx_hal::gpio::AF5>>)>, _, stm32f4xx_hal::gpio::gpioa::PA1<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, stm32f4xx_hal::gpio::gpiob::PB8<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpiob::PB9<stm32f4xx_hal::gpio::Input<stm32f4xx_hal::gpio::Floating>>, stm32f4xx_hal::gpio::gpioa::PA0<stm32f4xx_hal::gpio::Output<stm32f4xx_hal::gpio::PushPull>>, _, stm32f4xx_hal::delay::Delay, _>, _, _, _>
warning: unused import:
Transmit
--> examples/lora_spi_send.rs:65:13
|
65 | use radio::{Transmit}; // trait needs to be in scope to find methods start_transmit and check_transmit.
| ^^^^^^^^
error: aborting due to 12 previous errors; 4 warnings emitted
Some errors have detailed explanations: E0277, E0599.
For more information about an error, try
rustc --explain E0277
.error: could not compile
radio-sx127x
.The text was updated successfully, but these errors were encountered: