diff --git a/nrf5/drivers/display/epaper/moddisplay_epaper.c b/nrf5/drivers/display/epaper/moddisplay_epaper.c index 7a08e19a1f..3b2aafa2f0 100644 --- a/nrf5/drivers/display/epaper/moddisplay_epaper.c +++ b/nrf5/drivers/display/epaper/moddisplay_epaper.c @@ -26,6 +26,7 @@ #include "py/obj.h" +#if MICROPY_PY_DISPLAY_EPAPER STATIC const mp_map_elem_t epaper_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_epaper) }, #if 0 @@ -39,3 +40,5 @@ const mp_obj_module_t display_epaper_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t*)&epaper_module_globals, }; + +#endif // MICROPY_PY_DISPLAY_EPAPER diff --git a/nrf5/drivers/display/lcd/moddisplay_lcd.c b/nrf5/drivers/display/lcd/moddisplay_lcd.c index a456c326d4..7b871521ec 100644 --- a/nrf5/drivers/display/lcd/moddisplay_lcd.c +++ b/nrf5/drivers/display/lcd/moddisplay_lcd.c @@ -26,6 +26,8 @@ #include "py/obj.h" +#if MICROPY_PY_DISPLAY_LCD + STATIC const mp_map_elem_t lcd_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_lcd) }, #if 0 @@ -41,3 +43,5 @@ const mp_obj_module_t display_lcd_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t*)&lcd_module_globals, }; + +#endif // MICROPY_PY_DISPLAY_LCD diff --git a/nrf5/drivers/display/oled/moddisplay_oled.c b/nrf5/drivers/display/oled/moddisplay_oled.c index e0b4237241..bb39d46f6f 100644 --- a/nrf5/drivers/display/oled/moddisplay_oled.c +++ b/nrf5/drivers/display/oled/moddisplay_oled.c @@ -26,6 +26,8 @@ #include "py/obj.h" +#if MICROPY_PY_DISPLAY_OLED + STATIC const mp_map_elem_t oled_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_oled) }, #if 0 @@ -40,3 +42,5 @@ const mp_obj_module_t display_oled_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t*)&oled_module_globals, }; + +#endif // MICROPY_PY_DISPLAY_OLED