mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 04:23:41 +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.
|
||||
f := p.FPIOAFunction()
|
||||
if f >= FUNC_GPIOHS0 && f <= FUNC_GPIOHS31 {
|
||||
if f < FUNC_GPIOHS0 || f > FUNC_GPIOHS31 {
|
||||
return ErrInvalidDataPin
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user