We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 387a8a4 commit b1a3ccbCopy full SHA for b1a3ccb
ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c
@@ -33,6 +33,7 @@
33
#include "shared-module/rgbmatrix/RGBMatrix.h"
34
35
#include "src/rp2_common/hardware_pwm/include/hardware/pwm.h"
36
+#include "src/rp2_common/hardware_irq/include/hardware/irq.h"
37
38
void *common_hal_rgbmatrix_timer_allocate(rgbmatrix_rgbmatrix_obj_t *self) {
39
// Choose a PWM channel based on the first RGB pin
@@ -65,6 +66,8 @@ void common_hal_rgbmatrix_timer_free(void *ptr) {
65
66
uint8_t slice = value & 0xff;
67
uint8_t channel = value >> 8;
68
pwm_set_enabled(slice, false);
69
+ irq_set_enabled(PWM_IRQ_WRAP, false);
70
+ pwm_clear_irq(slice);
71
pwmout_free(slice, channel);
72
return;
73
}
0 commit comments