nrf5/modules/machine: Update timer init to set default IRQ priority before initializing Timer instance.
This commit is contained in:
parent
ea95dcba4d
commit
db0f4963b7
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue