From 546284817af7840bf4e78539ca671371f9bbed23 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 +++ micropython/lora/lora-sx127x/manifest.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/micropython/lora/lora-sx127x/lora/sx127x.py b/micropython/lora/lora-sx127x/lora/sx127x.py index 3f94aaf0..0226c969 100644 --- a/micropython/lora/lora-sx127x/lora/sx127x.py +++ b/micropython/lora/lora-sx127x/lora/sx127x.py @@ -519,6 +519,9 @@ class _SX127x(BaseModem): 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): diff --git a/micropython/lora/lora-sx127x/manifest.py b/micropython/lora/lora-sx127x/manifest.py index 57b9d21d..1936a50e 100644 --- a/micropython/lora/lora-sx127x/manifest.py +++ b/micropython/lora/lora-sx127x/manifest.py @@ -1,3 +1,3 @@ -metadata(version="0.1.0") +metadata(version="0.1.1") require("lora") package("lora")