[CC1101] Fixed inverted check (#167)
This commit is contained in:
parent
99d296e524
commit
8d92a5f402
1 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ void CC1101::clearGdo0Action() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CC1101::setGdo2Action(void (*func)(void), RADIOLIB_INTERRUPT_STATUS dir) {
|
void CC1101::setGdo2Action(void (*func)(void), RADIOLIB_INTERRUPT_STATUS dir) {
|
||||||
if(_mod->getGpio() != RADIOLIB_NC) {
|
if(_mod->getGpio() == RADIOLIB_NC) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Module::pinMode(_mod->getGpio(), INPUT);
|
Module::pinMode(_mod->getGpio(), INPUT);
|
||||||
|
@ -206,7 +206,7 @@ void CC1101::setGdo2Action(void (*func)(void), RADIOLIB_INTERRUPT_STATUS dir) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CC1101::clearGdo2Action() {
|
void CC1101::clearGdo2Action() {
|
||||||
if(_mod->getGpio() != RADIOLIB_NC) {
|
if(_mod->getGpio() == RADIOLIB_NC) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
detachInterrupt(RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(_mod->getGpio()));
|
detachInterrupt(RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(_mod->getGpio()));
|
||||||
|
|
Loading…
Add table
Reference in a new issue