nrf/timer: Fix disabling Timer 1 when using soft PWM.
Don't exclude the Timer instance 1 entry from machine_timer_obj[] when using soft PWM. The usage is already checked when creating the Timer, so just create an empty entry.
This commit is contained in:
parent
67689bfd7e
commit
98f790b03a
|
@ -53,7 +53,9 @@ STATIC mp_obj_t machine_timer_callbacks[] = {
|
|||
|
||||
STATIC const machine_timer_obj_t machine_timer_obj[] = {
|
||||
{{&machine_timer_type}, NRFX_TIMER_INSTANCE(0)},
|
||||
#if !defined(MICROPY_PY_MACHINE_SOFT_PWM) || (MICROPY_PY_MACHINE_SOFT_PWM == 0)
|
||||
#if MICROPY_PY_MACHINE_SOFT_PWM
|
||||
{ },
|
||||
#else
|
||||
{{&machine_timer_type}, NRFX_TIMER_INSTANCE(1)},
|
||||
#endif
|
||||
{{&machine_timer_type}, NRFX_TIMER_INSTANCE(2)},
|
||||
|
|
Loading…
Reference in New Issue