nrf5/modules/machine: Update timer init to set default IRQ priority before initializing Timer instance.

This commit is contained in:
Glenn Ruben Bakke 2017-06-02 18:25:28 +02:00 committed by glennrub
parent ea95dcba4d
commit db0f4963b7
1 changed files with 6 additions and 0 deletions

View File

@ -137,6 +137,12 @@ STATIC mp_obj_t machine_timer_make_new(const mp_obj_type_t *type, size_t n_args,
self->callback = args[3].u_obj; self->callback = args[3].u_obj;
} }
#ifdef NRF51
self->p_config->irq_priority = 3;
#else
self->p_config->irq_priority = 6;
#endif
hal_timer_init(self->p_config); hal_timer_init(self->p_config);
return MP_OBJ_FROM_PTR(self); return MP_OBJ_FROM_PTR(self);