From 2e05f628f0ce09bcd411fab8406b4675c40a0dab Mon Sep 17 00:00:00 2001 From: DavePutz Date: Thu, 21 May 2020 11:08:26 -0500 Subject: [PATCH] Add an increment to tcc_refcount to allow deinits to work properly --- ports/atmel-samd/common-hal/pulseio/PWMOut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/atmel-samd/common-hal/pulseio/PWMOut.c b/ports/atmel-samd/common-hal/pulseio/PWMOut.c index 1da0da8444f58..b627dadc546bc 100644 --- a/ports/atmel-samd/common-hal/pulseio/PWMOut.c +++ b/ports/atmel-samd/common-hal/pulseio/PWMOut.c @@ -181,7 +181,7 @@ pwmout_result_t common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self, mux_position = j; // Claim channel. tcc_channels[timer->index] |= (1 << tcc_channel(timer)); - + tcc_refcount[timer->index]++; } } }