Skip to content

Commit 7d4f84c

Browse files
authored
Merge pull request #8 from cparata/master
Fix small bugs
2 parents a6ef187 + 595ad6b commit 7d4f84c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=STM32duino S2-LP
2-
version=1.1.1
2+
version=1.1.2
33
author=SRA
44
maintainer=stm32duino
55
sentence=This library includes drivers for ST S2-LP sub-1GHz transceiver.

src/S2LP.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ void S2LP::begin(void)
229229
/* Go to RX state */
230230
S2LPCmdStrobeCommand(CMD_RX);
231231

232-
enableS2LPIrq();
232+
attachInterrupt(irq_pin, irq_handler, FALLING);
233233
}
234234

235235
/**
@@ -569,7 +569,10 @@ void S2LP::S2LPIrqHandler(void)
569569
*/
570570
void S2LP::disableS2LPIrq(void)
571571
{
572-
detachInterrupt(irq_pin);
572+
if(nr_of_irq_disabled == 0)
573+
{
574+
detachInterrupt(irq_pin);
575+
}
573576
nr_of_irq_disabled++;
574577
}
575578

0 commit comments

Comments
 (0)