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:
Stig Bjørlykke 2018-09-25 21:41:17 +02:00
parent 67689bfd7e
commit 98f790b03a
1 changed files with 3 additions and 1 deletions

View File

@ -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)},