Skip to content

embedded-hal version conflicts #18

@pdgilbert

Description

@pdgilbert

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 using stm32f4xx_hal, which still uses embedded-hal 0.2.4, does not mix well with the Sx127x::spi() use of the spi. One problem was that the mode argument for stm32f4xx_hal::spi::Spi::spi1 wants the older version. I fixed this by importing these from stm32f4xx_hal rather than from embedded-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 call

       let lora = Sx127x::spi(
    	    spi,                                                       //Spi
    	    gpioa.pa1.into_push_pull_output(),                         //CsPin         on PA1
    	    gpiob.pb8.into_floating_input(),                           //BusyPin  DI00 on PB8
            gpiob.pb9.into_floating_input(),                           //ReadyPin DI01 on PB9
    	    gpioa.pa0.into_push_pull_output(),                         //ResetPin      on PA0
    	    delay,					               //Delay
    	    &CONFIG_RADIO,					       //&Config
    	    ).unwrap();     

Sx127x::spi is using the new version of embedded-hal while spi, 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 forking rust-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 same embedded-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 the color-backtrace dependency because I could not get it to stop looking for std 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. Possibly InputPin and OutputPin 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 default

warning: 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 for 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>>)>
|
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> for 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>>)>
= 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 for 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>>)>
|
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> for 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>>)>
= 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 for 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>>)>
|
= note: required because of the requirements on the impl of embedded_hal::blocking::spi::Transactional<u8> for 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>>)>
= 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 for stm32f4xx_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 for stm32f4xx_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 for stm32f4xx_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 for stm32f4xx_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 for stm32f4xx_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 for stm32f4xx_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 struct 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, _>, _, _, _> 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 struct 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, _>, _, _, _> 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 struct 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, _>, _, _, _> 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.

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions