summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavePutz <dwputz@gmail.com>2020-05-21 11:08:26 -0500
committerGitHub <noreply@github.com>2020-05-21 11:08:26 -0500
commit2e05f628f0ce09bcd411fab8406b4675c40a0dab (patch)
tree0359afd15cd0909453d9c585bc3d2ea5a66575ea
parent1f40f9e04ff9be0eb82f56014bde5749be604ad9 (diff)
Add an increment to tcc_refcount to allow deinits to work properly
-rw-r--r--ports/atmel-samd/common-hal/pulseio/PWMOut.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/atmel-samd/common-hal/pulseio/PWMOut.c b/ports/atmel-samd/common-hal/pulseio/PWMOut.c
index 1da0da844..b627dadc5 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]++;
}
}
}