My initial testing was always done with PWM slice 0, so it didn't matter that _PM_pwm_slice was never set to a nonzero value. Limor tested with the first pin as GPIO6, which led to use of slice 3 and after that everything got sad really quickly.
Since Arduino doesn't use _PM_pwm_slice now, this means that _PM_timerInit's implementation becomes unshared; because _PM_timerInit nees to refer to _PM_PWM_ISR or _PM_timerISR, those newly require forward (static) declarations. That makes this change look bigger than it is. The only "real" change is intended to be something like
My initial testing was always done with PWM slice 0, so it didn't matter that _PM_pwm_slice was never set to a nonzero value. Limor tested with the first pin as GPIO6, which led to use of slice 3 and after that everything got sad really quickly.
Since Arduino doesn't use _PM_pwm_slice now, this means that _PM_timerInit's implementation becomes unshared; because _PM_timerInit nees to refer to _PM_PWM_ISR or _PM_timerISR, those newly require forward (static) declarations. That makes this change look bigger than it is. The only "real" change is intended to be something like
With this iteration of the code, I successfully ran CircuitPython in these configurations:
... across resets, typing in the REPL, etc.