Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions micropython/lora/lora-sx126x/lora/sx126x.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,13 @@ def __init__(

# If DIO1 is set, mask in just the IRQs that the driver may need to be
# interrupted by. This is important because otherwise an unrelated IRQ
# can trigger the ISR and may not be reset by the driver, leaving DIO1 high.
#
# If DIO1 is not set, all IRQs can stay masked which is the power-on state.
# can trigger the ISR and may not be reset by the driver, leaving DIO1
# high.
if dio1:
# Note: we set both Irq mask and DIO1 mask to the same value, which is redundant
# (one could be 0xFFFF) but may save a few bytes of bytecode.
self._cmd(
">BHHHH",
_CMD_CFG_DIO_IRQ,
(_IRQ_RX_DONE | _IRQ_TX_DONE | _IRQ_TIMEOUT), # IRQ mask
(_IRQ_RX_DONE | _IRQ_TX_DONE | _IRQ_TIMEOUT | _IRQ_CRC_ERR), # IRQ mask
(_IRQ_RX_DONE | _IRQ_TX_DONE | _IRQ_TIMEOUT), # DIO1 mask
0x0, # DIO2Mask, not used
0x0, # DIO3Mask, not used
Expand Down
2 changes: 1 addition & 1 deletion micropython/lora/lora-sx126x/manifest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
metadata(version="0.1.5")
metadata(version="0.1.6")
require("lora")
package("lora")
Loading