diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32l0/Cargo.toml | 9 | ||||
| -rw-r--r-- | examples/stm32l0/src/bin/lorawan.rs | 17 | ||||
| -rw-r--r-- | examples/stm32wl55/Cargo.toml | 4 |
3 files changed, 12 insertions, 18 deletions
diff --git a/examples/stm32l0/Cargo.toml b/examples/stm32l0/Cargo.toml index 6fe744f03..53ba6ba39 100644 --- a/examples/stm32l0/Cargo.toml +++ b/examples/stm32l0/Cargo.toml | |||
| @@ -10,16 +10,17 @@ embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } | |||
| 10 | embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } | 10 | embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l072cz", "time-driver-tim3"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l072cz", "time-driver-tim3"] } |
| 12 | 12 | ||
| 13 | embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["sx127x", "time"] } | 13 | embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["sx127x", "time", "defmt"] } |
| 14 | lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "4bff2e0021103adfbccedcbf49dbcd0474adc4b2", default-features = false, features = ["async"] } | 14 | |
| 15 | lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "4bff2e0021103adfbccedcbf49dbcd0474adc4b2", default-features = false, features = ["default-crypto"] } | 15 | lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "53d2feb43e2f3ddcdc55f0587391b0d3f02d8d93", default-features = false, features = ["async"] } |
| 16 | lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "53d2feb43e2f3ddcdc55f0587391b0d3f02d8d93", default-features = false, features = ["default-crypto"] } | ||
| 16 | 17 | ||
| 17 | defmt = "0.3" | 18 | defmt = "0.3" |
| 18 | defmt-rtt = "0.3" | 19 | defmt-rtt = "0.3" |
| 19 | 20 | ||
| 20 | cortex-m = "0.7.3" | 21 | cortex-m = "0.7.3" |
| 21 | cortex-m-rt = "0.7.0" | 22 | cortex-m-rt = "0.7.0" |
| 22 | embedded-hal = "0.2.6" | ||
| 23 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 23 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 24 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 24 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 25 | heapless = { version = "0.7.5", default-features = false } | 25 | heapless = { version = "0.7.5", default-features = false } |
| 26 | embedded-hal = "0.2.6" | ||
diff --git a/examples/stm32l0/src/bin/lorawan.rs b/examples/stm32l0/src/bin/lorawan.rs index 5ca69f9a7..cbae88356 100644 --- a/examples/stm32l0/src/bin/lorawan.rs +++ b/examples/stm32l0/src/bin/lorawan.rs | |||
| @@ -12,7 +12,6 @@ mod example_common; | |||
| 12 | use embassy_lora::{sx127x::*, LoraTimer}; | 12 | use embassy_lora::{sx127x::*, LoraTimer}; |
| 13 | use embassy_stm32::{ | 13 | use embassy_stm32::{ |
| 14 | dbgmcu::Dbgmcu, | 14 | dbgmcu::Dbgmcu, |
| 15 | dma::NoDma, | ||
| 16 | exti::ExtiInput, | 15 | exti::ExtiInput, |
| 17 | gpio::{Input, Level, Output, Pull, Speed}, | 16 | gpio::{Input, Level, Output, Pull, Speed}, |
| 18 | rcc, | 17 | rcc, |
| @@ -45,8 +44,8 @@ async fn main(_spawner: embassy::executor::Spawner, mut p: Peripherals) { | |||
| 45 | p.PB3, | 44 | p.PB3, |
| 46 | p.PA7, | 45 | p.PA7, |
| 47 | p.PA6, | 46 | p.PA6, |
| 48 | NoDma, | 47 | p.DMA1_CH3, |
| 49 | NoDma, | 48 | p.DMA1_CH2, |
| 50 | 200_000.hz(), | 49 | 200_000.hz(), |
| 51 | spi::Config::default(), | 50 | spi::Config::default(), |
| 52 | ); | 51 | ); |
| @@ -58,15 +57,9 @@ async fn main(_spawner: embassy::executor::Spawner, mut p: Peripherals) { | |||
| 58 | let ready = Input::new(p.PB4, Pull::Up); | 57 | let ready = Input::new(p.PB4, Pull::Up); |
| 59 | let ready_pin = ExtiInput::new(ready, p.EXTI4); | 58 | let ready_pin = ExtiInput::new(ready, p.EXTI4); |
| 60 | 59 | ||
| 61 | let radio = Sx127xRadio::new( | 60 | let radio = Sx127xRadio::new(spi, cs, reset, ready_pin, DummySwitch) |
| 62 | spi, | 61 | .await |
| 63 | cs, | 62 | .unwrap(); |
| 64 | reset, | ||
| 65 | ready_pin, | ||
| 66 | DummySwitch, | ||
| 67 | &mut embassy::time::Delay, | ||
| 68 | ) | ||
| 69 | .unwrap(); | ||
| 70 | 63 | ||
| 71 | let region = region::EU868::default().into(); | 64 | let region = region::EU868::default().into(); |
| 72 | let mut radio_buffer = [0; 256]; | 65 | let mut radio_buffer = [0; 256]; |
diff --git a/examples/stm32wl55/Cargo.toml b/examples/stm32wl55/Cargo.toml index 7a7621230..c7344152d 100644 --- a/examples/stm32wl55/Cargo.toml +++ b/examples/stm32wl55/Cargo.toml | |||
| @@ -11,8 +11,8 @@ embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = | |||
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32wl55jc-cm4", "time-driver-tim2", "memory-x", "subghz", "unstable-pac"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32wl55jc-cm4", "time-driver-tim2", "memory-x", "subghz", "unstable-pac"] } |
| 12 | embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["stm32wl", "time"] } | 12 | embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["stm32wl", "time"] } |
| 13 | 13 | ||
| 14 | lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "4bff2e0021103adfbccedcbf49dbcd0474adc4b2", default-features = false, features = ["async"] } | 14 | lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "53d2feb43e2f3ddcdc55f0587391b0d3f02d8d93", default-features = false, features = ["async"] } |
| 15 | lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "4bff2e0021103adfbccedcbf49dbcd0474adc4b2", default-features = false, features = ["default-crypto"] } | 15 | lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "53d2feb43e2f3ddcdc55f0587391b0d3f02d8d93", default-features = false, features = ["default-crypto"] } |
| 16 | 16 | ||
| 17 | defmt = "0.3" | 17 | defmt = "0.3" |
| 18 | defmt-rtt = "0.3" | 18 | defmt-rtt = "0.3" |
