aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTimo Kröger <[email protected]>2022-06-25 11:59:07 +0200
committerTimo Kröger <[email protected]>2022-08-26 15:44:58 +0200
commitf31116cafaeea7746aec19903fb1c73adaea9ea6 (patch)
tree8f735abceb824e60f757290062ff99428407b530 /examples
parent69d80c086d2f22f66aa25fafb55918cb1c5e3bdd (diff)
lora: Make some options configurable
Call `config()` only once at construction not with every RX and TX operation. The Lora-E5 only supports HP mode, use that instead. The nucleo board supports both HP and LP and should continue to work.
Diffstat (limited to 'examples')
-rw-r--r--examples/stm32wl/src/bin/lorawan.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/stm32wl/src/bin/lorawan.rs b/examples/stm32wl/src/bin/lorawan.rs
index 0ef13354d..83df0188a 100644
--- a/examples/stm32wl/src/bin/lorawan.rs
+++ b/examples/stm32wl/src/bin/lorawan.rs
@@ -60,7 +60,9 @@ async fn main(_spawner: Spawner) {
60 let radio = SubGhz::new(p.SUBGHZSPI, NoDma, NoDma); 60 let radio = SubGhz::new(p.SUBGHZSPI, NoDma, NoDma);
61 let irq = interrupt::take!(SUBGHZ_RADIO); 61 let irq = interrupt::take!(SUBGHZ_RADIO);
62 62
63 let radio = SubGhzRadio::new(radio, rfs, irq); 63 let mut radio_config = SubGhzRadioConfig::default();
64 radio_config.calibrate_image = CalibrateImage::ISM_863_870;
65 let radio = SubGhzRadio::new(radio, rfs, irq, radio_config).unwrap();
64 66
65 let mut region: region::Configuration = region::EU868::default().into(); 67 let mut region: region::Configuration = region::EU868::default().into();
66 68