Skip to content
Merged
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
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=STM32duino S2-LP
version=1.1.1
version=1.1.2
author=SRA
maintainer=stm32duino
sentence=This library includes drivers for ST S2-LP sub-1GHz transceiver.
Expand Down
7 changes: 5 additions & 2 deletions src/S2LP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void S2LP::begin(void)
/* Go to RX state */
S2LPCmdStrobeCommand(CMD_RX);

enableS2LPIrq();
attachInterrupt(irq_pin, irq_handler, FALLING);
}

/**
Expand Down Expand Up @@ -569,7 +569,10 @@ void S2LP::S2LPIrqHandler(void)
*/
void S2LP::disableS2LPIrq(void)
{
detachInterrupt(irq_pin);
if(nr_of_irq_disabled == 0)
{
detachInterrupt(irq_pin);
}
nr_of_irq_disabled++;
}

Expand Down