Skip to content

Commit f823b40

Browse files
authored
Merge pull request #32 from Nikotine1/bugfix/initial-rx_en-pin-state
Bugfix/initial rx en pin state
2 parents e80275d + 7bf965e commit f823b40

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/pymc_core/hardware/sx1262_wrapper.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,11 @@ def begin(self) -> bool:
544544
else:
545545
logger.warning(f"Could not setup RXEN pin {self.rxen_pin}")
546546

547+
# Ensure TX/RX pins are in default state (RX mode)
548+
if self.txen_pin != -1 or self.rxen_pin != -1:
549+
self._control_tx_rx_pins(tx_mode=False)
550+
logger.debug("TX/RX control pins set to RX mode")
551+
547552
# Setup LED pins if specified
548553
if self.txled_pin != -1 and not self._txled_pin_setup:
549554
if self._gpio_manager.setup_output_pin(self.txled_pin, initial_value=False):

0 commit comments

Comments
 (0)