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.
pull/4188/head
Stig Bjørlykke 2018-09-25 21:41:17 +02:00
rodzic 67689bfd7e
commit 98f790b03a
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

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