nrf5/lcd: Adding lcd_mono_fb.c to source list in the makefile. Adding define in implementation to de-select the file from being included. Adding module to PORT BUILTIN in mpconfigport.h

This commit is contained in:
Glenn Ruben Bakke 2016-12-29 17:03:15 +01:00
parent a7832a203f
commit 64d2827233
3 changed files with 15 additions and 1 deletions

View File

@ -146,6 +146,7 @@ SRC_C += \
modnetwork.c \
timer.c \
rtc.c \
lcd_mono_fb.c \
#ifeq ($(SD), )

View File

@ -34,6 +34,8 @@
#include "lcd_mono_fb.h"
#include "font_petme128_8x8.h"
#if MICROPY_PY_LCD_MONO_FB
#define LCD_BLACK 0
#define LCD_WHITE 1
@ -312,3 +314,5 @@ const mp_obj_module_t mp_module_lcd_mono_fb = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&lcd_mono_fb_module_globals,
};
#endif // MICROPY_PY_LCD_MONO_FB

View File

@ -129,6 +129,8 @@
#define MICROPY_PY_NETWORK (1)
#endif
#define MICROPY_PY_LCD_MONO_FB (0)
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
#define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (0)
@ -160,6 +162,7 @@ extern const struct _mp_obj_module_t mp_module_utime;
extern const struct _mp_obj_module_t mp_module_uos;
extern const struct _mp_obj_module_t mp_module_usocket;
extern const struct _mp_obj_module_t mp_module_network;
extern const struct _mp_obj_module_t mp_module_lcd_mono_fb;
#if MICROPY_PY_USOCKET
#define SOCKET_BUILTIN_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_usocket), (mp_obj_t)&mp_module_usocket },
@ -175,6 +178,11 @@ extern const struct _mp_obj_module_t mp_module_network;
#define NETWORK_BUILTIN_MODULE
#endif
#if MICROPY_PY_LCD_MONO_FB
#define LCD_MONO_FB_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_lcd_mono_fb), (mp_obj_t)&mp_module_lcd_mono_fb },
#else
#define LCD_MONO_FB_MODULE
#endif
#if BLUETOOTH_SD
extern const struct _mp_obj_module_t ble_module;
@ -187,6 +195,7 @@ extern const struct _mp_obj_module_t ble_module;
{ MP_OBJ_NEW_QSTR(MP_QSTR_uos), (mp_obj_t)&mp_module_uos }, \
SOCKET_BUILTIN_MODULE \
NETWORK_BUILTIN_MODULE \
LCD_MONO_FB_MODULE \
#else
@ -196,7 +205,7 @@ extern const struct _mp_obj_module_t ble_module;
{ MP_OBJ_NEW_QSTR(MP_QSTR_machine), (mp_obj_t)&machine_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_utime), (mp_obj_t)&mp_module_utime }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_uos), (mp_obj_t)&mp_module_uos }, \
LCD_MONO_FB_MODULE \
#endif // BLUETOOTH_SD