From 49926786fe5207225c5b9baf304ff36c0c8a3162 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 13 Feb 2024 16:10:59 +1100 Subject: [PATCH] lora sx127x: Implement missing syncword support. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton --- micropython/lora/lora-sx127x/lora/sx127x.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/micropython/lora/lora-sx127x/lora/sx127x.py b/micropython/lora/lora-sx127x/lora/sx127x.py index 3f94aaf0c..0226c9696 100644 --- a/micropython/lora/lora-sx127x/lora/sx127x.py +++ b/micropython/lora/lora-sx127x/lora/sx127x.py @@ -519,6 +519,9 @@ def configure(self, lora_cfg): self._reg_update(_REG_MODEM_CONFIG3, update_mask, modem_config3) + if "syncword" in lora_cfg: + self._reg_write(_REG_SYNC_WORD, lora_cfg["syncword"]) + def _reg_write(self, reg, value): self._cs(0) if isinstance(value, int):