ensure pin DIO0 is set to input

mkr-wan-1300
Morgan Allen 2018-02-02 09:18:49 -08:00 committed by Sandeep Mistry
parent 7798532435
commit 61c390f837
1 changed files with 2 additions and 0 deletions

View File

@ -279,6 +279,8 @@ void LoRaClass::onReceive(void(*callback)(int))
_onReceive = callback;
if (callback) {
pinMode(_dio0, INPUT);
writeRegister(REG_DIO_MAPPING_1, 0x00);
attachInterrupt(digitalPinToInterrupt(_dio0), LoRaClass::onDio0Rise, RISING);