lib/utils: Protect all of mpirq.c with MICROPY_ENABLE_SCHEDULER.

So it can be unconditionally included in a port's build even if certain
configurations in that port do not use its features, to simplify the
Makefile.

Signed-off-by: Damien George <damien@micropython.org>
pull/6146/head
Damien George 2020-06-14 16:22:29 +10:00
rodzic b572aa5721
commit 9d5edb3559
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -31,6 +31,8 @@
#include "py/gc.h"
#include "lib/utils/mpirq.h"
#if MICROPY_ENABLE_SCHEDULER
/******************************************************************************
DECLARE PUBLIC DATA
******************************************************************************/
@ -125,3 +127,5 @@ const mp_obj_type_t mp_irq_type = {
.call = mp_irq_call,
.locals_dict = (mp_obj_dict_t *)&mp_irq_locals_dict,
};
#endif // MICROPY_ENABLE_SCHEDULER