From c37ade9aeba3c0608c8e8591e999871d96dadda8 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 13 Mar 2018 12:44:00 -0700 Subject: [PATCH] Correct NO_TIMER index value for SAMD21. We check validity by ensuring it's lower than the total number of timers. 0 is a terrible number for the NO_TIMER value because its valid even though it shouldn't be. Fixes https://github.com/adafruit/Adafruit_CircuitPython_SimpleIO/issues/29 --- ports/atmel-samd/samd21_pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/atmel-samd/samd21_pins.c b/ports/atmel-samd/samd21_pins.c index f1d006de8b..a6b19730f7 100644 --- a/ports/atmel-samd/samd21_pins.c +++ b/ports/atmel-samd/samd21_pins.c @@ -57,7 +57,7 @@ .wave_output = p_wave_output \ } -#define NO_TIMER TCC(0, 0) +#define NO_TIMER TCC(0xff, 0) #define TOUCH(y_line) \ .has_touch = true, \