mirror of
https://github.com/liberatedsystems/RNode_Firmware_CE.git
synced 2025-04-28 03:16:20 -04:00
Fix potential bugs
This commit is contained in:
parent
1d62fdd52e
commit
a39357d332
@ -645,7 +645,7 @@ void sx126x::onReceive(void(*callback)(uint8_t, int))
|
|||||||
_spiModem->usingInterrupt(digitalPinToInterrupt(_dio0));
|
_spiModem->usingInterrupt(digitalPinToInterrupt(_dio0));
|
||||||
#endif
|
#endif
|
||||||
// make function available
|
// make function available
|
||||||
extern void (*onIntRise[INTERFACE_COUNT])();
|
extern void (*onIntRise[INTERFACE_COUNT])(void);
|
||||||
|
|
||||||
attachInterrupt(digitalPinToInterrupt(_dio0), onIntRise[_index], RISING);
|
attachInterrupt(digitalPinToInterrupt(_dio0), onIntRise[_index], RISING);
|
||||||
} else {
|
} else {
|
||||||
@ -1297,7 +1297,7 @@ void sx127x::onReceive(void(*callback)(uint8_t, int)) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// make function available
|
// make function available
|
||||||
extern void (*onIntRise[INTERFACE_COUNT])();
|
extern void (*onIntRise[INTERFACE_COUNT])(void);
|
||||||
|
|
||||||
attachInterrupt(digitalPinToInterrupt(_dio0), onIntRise[_index], RISING);
|
attachInterrupt(digitalPinToInterrupt(_dio0), onIntRise[_index], RISING);
|
||||||
} else {
|
} else {
|
||||||
@ -2081,7 +2081,7 @@ void sx128x::onReceive(void(*callback)(uint8_t, int))
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// make function available
|
// make function available
|
||||||
extern void (*onIntRise[INTERFACE_COUNT])();
|
extern void (*onIntRise[INTERFACE_COUNT])(void);
|
||||||
|
|
||||||
attachInterrupt(digitalPinToInterrupt(_dio0), onIntRise[_index], RISING);
|
attachInterrupt(digitalPinToInterrupt(_dio0), onIntRise[_index], RISING);
|
||||||
} else {
|
} else {
|
||||||
|
@ -39,7 +39,7 @@ void onInt1Rise() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setup_interfaces() {
|
void setup_interfaces() {
|
||||||
onIntRise[0] = &onInt0Rise;
|
onIntRise[0] = onInt0Rise;
|
||||||
onIntRise[1] = &onInt1Rise;
|
onIntRise[1] = onInt1Rise;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user