aboutsummaryrefslogtreecommitdiff
path: root/embassy-lora
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-01-14 22:02:00 +0100
committerDario Nieuwenhuis <[email protected]>2022-01-19 17:59:55 +0100
commit58fc64722c65bbdc209ae0fd1700f03702bbcd08 (patch)
tree77f9412b47259cd4cf4170b0a257b371398d4f2c /embassy-lora
parent52e156b429417bde59d0ea67d11256866f1dcec9 (diff)
stm32/gpio: expose all functionality as inherent methods.
Diffstat (limited to 'embassy-lora')
-rw-r--r--embassy-lora/src/stm32wl/mod.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/embassy-lora/src/stm32wl/mod.rs b/embassy-lora/src/stm32wl/mod.rs
index 8cac46f7a..783140cb3 100644
--- a/embassy-lora/src/stm32wl/mod.rs
+++ b/embassy-lora/src/stm32wl/mod.rs
@@ -16,7 +16,6 @@ use embassy_stm32::{
16 TxParams, 16 TxParams,
17 }, 17 },
18}; 18};
19use embedded_hal::digital::v2::OutputPin;
20use lorawan_device::async_device::{ 19use lorawan_device::async_device::{
21 radio::{Bandwidth, PhyRxTx, RfConfig, RxQuality, SpreadingFactor, TxConfig}, 20 radio::{Bandwidth, PhyRxTx, RfConfig, RxQuality, SpreadingFactor, TxConfig},
22 Timings, 21 Timings,
@@ -329,22 +328,22 @@ impl<'a> RadioSwitch<'a> {
329 } 328 }
330 329
331 pub(crate) fn set_rx(&mut self) { 330 pub(crate) fn set_rx(&mut self) {
332 self.ctrl1.set_high().unwrap(); 331 self.ctrl1.set_high();
333 self.ctrl2.set_low().unwrap(); 332 self.ctrl2.set_low();
334 self.ctrl3.set_high().unwrap(); 333 self.ctrl3.set_high();
335 } 334 }
336 335
337 pub(crate) fn set_tx_lp(&mut self) { 336 pub(crate) fn set_tx_lp(&mut self) {
338 self.ctrl1.set_high().unwrap(); 337 self.ctrl1.set_high();
339 self.ctrl2.set_high().unwrap(); 338 self.ctrl2.set_high();
340 self.ctrl3.set_high().unwrap(); 339 self.ctrl3.set_high();
341 } 340 }
342 341
343 #[allow(dead_code)] 342 #[allow(dead_code)]
344 pub(crate) fn set_tx_hp(&mut self) { 343 pub(crate) fn set_tx_hp(&mut self) {
345 self.ctrl2.set_high().unwrap(); 344 self.ctrl2.set_high();
346 self.ctrl1.set_low().unwrap(); 345 self.ctrl1.set_low();
347 self.ctrl3.set_high().unwrap(); 346 self.ctrl3.set_high();
348 } 347 }
349} 348}
350 349