mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 12:04:03 +00:00
maixbit (interruptions): fix fpioa function test
This commit is contained in:
@@ -183,7 +183,7 @@ func (p Pin) SetInterrupt(change PinChange, callback func(Pin)) error {
|
|||||||
|
|
||||||
// Check if the pin is a GPIOHS pin.
|
// Check if the pin is a GPIOHS pin.
|
||||||
f := p.FPIOAFunction()
|
f := p.FPIOAFunction()
|
||||||
if f >= FUNC_GPIOHS0 && f <= FUNC_GPIOHS31 {
|
if f < FUNC_GPIOHS0 || f > FUNC_GPIOHS31 {
|
||||||
return ErrInvalidDataPin
|
return ErrInvalidDataPin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user