From 66b21b4c86eb1b4d0ba7a97d1c8efc9090669b0c Mon Sep 17 00:00:00 2001 From: Yannis Huber Date: Wed, 1 Jul 2020 18:03:18 +0200 Subject: [PATCH] maixbit (interruptions): fix fpioa function test --- src/machine/machine_k210.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/machine_k210.go b/src/machine/machine_k210.go index b92eab91..eea477f2 100644 --- a/src/machine/machine_k210.go +++ b/src/machine/machine_k210.go @@ -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 }