mirror of
https://github.com/sandeepmistry/arduino-LoRa.git
synced 2025-04-19 13:02:14 +03:00
ensure pin DIO0 is set to input
This commit is contained in:
parent
7798532435
commit
61c390f837
@ -279,6 +279,8 @@ void LoRaClass::onReceive(void(*callback)(int))
|
|||||||
_onReceive = callback;
|
_onReceive = callback;
|
||||||
|
|
||||||
if (callback) {
|
if (callback) {
|
||||||
|
pinMode(_dio0, INPUT);
|
||||||
|
|
||||||
writeRegister(REG_DIO_MAPPING_1, 0x00);
|
writeRegister(REG_DIO_MAPPING_1, 0x00);
|
||||||
|
|
||||||
attachInterrupt(digitalPinToInterrupt(_dio0), LoRaClass::onDio0Rise, RISING);
|
attachInterrupt(digitalPinToInterrupt(_dio0), LoRaClass::onDio0Rise, RISING);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user