nrf5: Adding display module to port builtins.

This commit is contained in:
Glenn Ruben Bakke 2017-01-04 17:14:44 +01:00
parent f97eded57e
commit bace74fba4

View File

@ -129,7 +129,73 @@
#define MICROPY_PY_NETWORK (1)
#endif
#define MICROPY_PY_LCD_MONO_FB (0)
#ifndef MICROPY_PY_DISPLAY
#define MICROPY_PY_DISPLAY (0)
#define MICROPY_PY_DISPLAY_EPAPER (0)
#define MICROPY_PY_DISPLAY_EPAPER_SLD0020P (0)
#define MICROPY_PY_DISPLAY_LCD (0)
#define MICROPY_PY_DISPLAY_LCD_SLD10261P (0)
#define MICROPY_PY_DISPLAY_OLED (0)
#define MICROPY_PY_DISPLAY_OLED_SSD1306 (0)
#define MICROPY_PY_DISPLAY_OLED_SSD1305 (0)
#elif MICROPY_PY_DISPLAY
// Default to include Monochrome Framebuffer
// if display module is selected.
#ifndef MICROPY_PY_LCD_MONO_FB
#define MICROPY_PY_LCD_MONO_FB (1)
#endif
#ifndef MICROPY_PY_DISPLAY_EPAPER_SLD0020P
#define MICROPY_PY_DISPLAY_EPAPER_SLD0020P (0)
#else
#if MICROPY_PY_DISPLAY_EPAPER_SLD0020P
#define MICROPY_PY_DISPLAY_EPAPER (1)
#endif
#endif // MICROPY_PY_DISPLAY_EPAPER_SLD0020P
#ifndef MICROPY_PY_DISPLAY_LCD_SLD10261P
#define MICROPY_PY_DISPLAY_LCD_SLD10261P (0)
#else
#if MICROPY_PY_DISPLAY_LCD_SLD10261P
#define MICROPY_PY_DISPLAY_LCD (1)
#endif
#endif // MICROPY_PY_DISPLAY_LCD_SLD10261P
#ifndef MICROPY_PY_DISPLAY_OLED_SSD1305
#define MICROPY_PY_DISPLAY_OLED_SSD1305 (0)
#else
#if MICROPY_PY_DISPLAY_OLED_SSD1305
#define MICROPY_PY_DISPLAY_OLED (1)
#endif
#endif // MICROPY_PY_DISPLAY_OLED_SSD1305
#ifndef MICROPY_PY_DISPLAY_OLED_SSD1306
#define MICROPY_PY_DISPLAY_OLED_SSD1306 (0)
#else
#if MICROPY_PY_DISPLAY_OLED_SSD1306
#define MICROPY_PY_DISPLAY_OLED (1)
#endif
#endif // MICROPY_PY_DISPLAY_OLED_SSD1306
#endif // MICROPY_PY_DISPLAY
#ifndef MICROPY_PY_DISPLAY_EPAPER
#define MICROPY_PY_DISPLAY_EPAPER (0)
#endif
#ifndef MICROPY_PY_DISPLAY_LCD
#define MICROPY_PY_DISPLAY_LCD (0)
#endif
#ifndef MICROPY_PY_DISPLAY_OLED
#define MICROPY_PY_DISPLAY_OLED (0)
#endif
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
#define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (0)
@ -163,6 +229,7 @@ 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;
extern const struct _mp_obj_module_t mp_module_display;
#if MICROPY_PY_USOCKET
#define SOCKET_BUILTIN_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_usocket), (mp_obj_t)&mp_module_usocket },
@ -184,6 +251,12 @@ extern const struct _mp_obj_module_t mp_module_lcd_mono_fb;
#define LCD_MONO_FB_MODULE
#endif
#if MICROPY_PY_DISPLAY
#define DISPLAY_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_display), (mp_obj_t)&mp_module_display },
#else
#define DISPLAY_MODULE
#endif
#if BLUETOOTH_SD
extern const struct _mp_obj_module_t ble_module;
#define MICROPY_PORT_BUILTIN_MODULES \
@ -196,6 +269,7 @@ extern const struct _mp_obj_module_t ble_module;
SOCKET_BUILTIN_MODULE \
NETWORK_BUILTIN_MODULE \
LCD_MONO_FB_MODULE \
DISPLAY_MODULE \
#else
@ -206,6 +280,7 @@ extern const struct _mp_obj_module_t ble_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 \
DISPLAY_MODULE \
#endif // BLUETOOTH_SD