maixbit (interruptions): fix fpioa function test

This commit is contained in:
Yannis Huber
2020-07-01 18:03:18 +02:00
committed by Ron Evans
parent a9568932be
commit 66b21b4c86
+1 -1
View File
@@ -183,7 +183,7 @@ func (p Pin) SetInterrupt(change PinChange, callback func(Pin)) error {
// Check if the pin is a GPIOHS pin.
f := p.FPIOAFunction()
if f >= FUNC_GPIOHS0 && f <= FUNC_GPIOHS31 {
if f < FUNC_GPIOHS0 || f > FUNC_GPIOHS31 {
return ErrInvalidDataPin
}