aboutsummaryrefslogtreecommitdiff
path: root/embassy-lora/src
diff options
context:
space:
mode:
authorceekdee <[email protected]>2022-09-28 14:27:34 -0500
committerceekdee <[email protected]>2022-09-28 14:27:34 -0500
commit526e90d3f3b986fedc55ec421178b7b2ec954abf (patch)
treebffc8288f5df367b300c3aba9bbf8fe7cab641cc /embassy-lora/src
parenta89a0c2f122759a7e743e75152f7af7f67b4387b (diff)
Update some outstanding questions
Diffstat (limited to 'embassy-lora/src')
-rw-r--r--embassy-lora/src/sx126x/sx126x_lora/mod.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/embassy-lora/src/sx126x/sx126x_lora/mod.rs b/embassy-lora/src/sx126x/sx126x_lora/mod.rs
index 02f5f83a2..53fbde749 100644
--- a/embassy-lora/src/sx126x/sx126x_lora/mod.rs
+++ b/embassy-lora/src/sx126x/sx126x_lora/mod.rs
@@ -511,22 +511,23 @@ where
511 cad_activity_detected: Option<&mut bool>, 511 cad_activity_detected: Option<&mut bool>,
512 ) -> Result<(), RadioError<BUS>> { 512 ) -> Result<(), RadioError<BUS>> {
513 loop { 513 loop {
514 info!("process_irq loop entered"); // debug ??? 514 trace!("process_irq loop entered");
515 515
516 let de = self.sub_get_device_errors().await?; 516 let de = self.sub_get_device_errors().await?;
517 info!("device_errors: rc_64khz_calibration = {}, rc_13mhz_calibration = {}, pll_calibration = {}, adc_calibration = {}, image_calibration = {}, xosc_start = {}, pll_lock = {}, pa_ramp = {}", 517 trace!("device_errors: rc_64khz_calibration = {}, rc_13mhz_calibration = {}, pll_calibration = {}, adc_calibration = {}, image_calibration = {}, xosc_start = {}, pll_lock = {}, pa_ramp = {}",
518 de.rc_64khz_calibration, de.rc_13mhz_calibration, de.pll_calibration, de.adc_calibration, de.image_calibration, de.xosc_start, de.pll_lock, de.pa_ramp); 518 de.rc_64khz_calibration, de.rc_13mhz_calibration, de.pll_calibration, de.adc_calibration, de.image_calibration, de.xosc_start, de.pll_lock, de.pa_ramp);
519 let st = self.sub_get_status().await?; 519 let st = self.sub_get_status().await?;
520 info!( 520 trace!(
521 "radio status: cmd_status: {:x}, chip_mode: {:x}", 521 "radio status: cmd_status: {:x}, chip_mode: {:x}",
522 st.cmd_status, st.chip_mode 522 st.cmd_status,
523 st.chip_mode
523 ); 524 );
524 525
525 self.dio1.wait_for_high().await.map_err(|_| DIO1)?; 526 self.dio1.wait_for_high().await.map_err(|_| DIO1)?;
526 let operating_mode = self.brd_get_operating_mode(); 527 let operating_mode = self.brd_get_operating_mode();
527 let irq_flags = self.sub_get_irq_status().await?; 528 let irq_flags = self.sub_get_irq_status().await?;
528 self.sub_clear_irq_status(irq_flags).await?; 529 self.sub_clear_irq_status(irq_flags).await?;
529 info!("process_irq DIO1 satisfied: irq_flags = {:x}", irq_flags); // debug ??? 530 trace!("process_irq DIO1 satisfied: irq_flags = {:x}", irq_flags);
530 531
531 // check for errors and unexpected interrupt masks (based on operation mode) 532 // check for errors and unexpected interrupt masks (based on operation mode)
532 if (irq_flags & IrqMask::HeaderError.value()) == IrqMask::HeaderError.value() { 533 if (irq_flags & IrqMask::HeaderError.value()) == IrqMask::HeaderError.value() {
@@ -568,13 +569,12 @@ where
568 return Err(RadioError::CADUnexpected); 569 return Err(RadioError::CADUnexpected);
569 } 570 }
570 571
571 // debug ???
572 if (irq_flags & IrqMask::HeaderValid.value()) == IrqMask::HeaderValid.value() { 572 if (irq_flags & IrqMask::HeaderValid.value()) == IrqMask::HeaderValid.value() {
573 info!("HeaderValid"); 573 trace!("HeaderValid");
574 } else if (irq_flags & IrqMask::PreambleDetected.value()) == IrqMask::PreambleDetected.value() { 574 } else if (irq_flags & IrqMask::PreambleDetected.value()) == IrqMask::PreambleDetected.value() {
575 info!("PreambleDetected"); 575 trace!("PreambleDetected");
576 } else if (irq_flags & IrqMask::SyncwordValid.value()) == IrqMask::SyncwordValid.value() { 576 } else if (irq_flags & IrqMask::SyncwordValid.value()) == IrqMask::SyncwordValid.value() {
577 info!("SyncwordValid"); 577 trace!("SyncwordValid");
578 } 578 }
579 579
580 // handle completions 580 // handle completions