diff options
author | Damien George <damien.p.george@gmail.com> | 2016-04-08 11:08:37 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-04-12 14:06:53 +0100 |
commit | 53ad681ed1786601ca5eccb60f8fd950b8bc47d7 (patch) | |
tree | a6bf5beb1f2b8b8c06ae05135af59d5ac31872be /py | |
parent | 3a37426b29451cd51e444526c803ba7905c6b151 (diff) | |
download | micropython-53ad681ed1786601ca5eccb60f8fd950b8bc47d7.tar.gz micropython-53ad681ed1786601ca5eccb60f8fd950b8bc47d7.zip |
extmod: Add initial framebuf module.
Diffstat (limited to 'py')
-rw-r--r-- | py/builtin.h | 1 | ||||
-rw-r--r-- | py/mpconfig.h | 4 | ||||
-rw-r--r-- | py/objmodule.c | 3 | ||||
-rw-r--r-- | py/py.mk | 1 | ||||
-rw-r--r-- | py/qstrdefs.h | 9 |
5 files changed, 18 insertions, 0 deletions
diff --git a/py/builtin.h b/py/builtin.h index e3e68e1519..35d8910bd8 100644 --- a/py/builtin.h +++ b/py/builtin.h @@ -106,6 +106,7 @@ extern const mp_obj_module_t mp_module_ussl; extern const mp_obj_module_t mp_module_machine; extern const mp_obj_module_t mp_module_lwip; extern const mp_obj_module_t mp_module_websocket; +extern const mp_obj_module_t mp_module_framebuf; // extmod functions MP_DECLARE_CONST_FUN_OBJ(pyb_mount_obj); diff --git a/py/mpconfig.h b/py/mpconfig.h index 6c2db2f1fc..bbf0555137 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -845,6 +845,10 @@ typedef double mp_float_t; #define MICROPY_PY_WEBSOCKET (0) #endif +#ifndef MICROPY_PY_FRAMEBUF +#define MICROPY_PY_FRAMEBUF (0) +#endif + /*****************************************************************************/ /* Hooks for a port to add builtins */ diff --git a/py/objmodule.c b/py/objmodule.c index 5fd7b82c5b..d2a4d893c9 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -196,6 +196,9 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = { #if MICROPY_PY_WEBSOCKET { MP_ROM_QSTR(MP_QSTR_websocket), MP_ROM_PTR(&mp_module_websocket) }, #endif +#if MICROPY_PY_FRAMEBUF + { MP_ROM_QSTR(MP_QSTR_framebuf), MP_ROM_PTR(&mp_module_framebuf) }, +#endif // extra builtin modules as defined by a port MICROPY_PORT_BUILTIN_MODULES @@ -170,6 +170,7 @@ PY_O_BASENAME = \ ../extmod/modussl.o \ ../extmod/modurandom.o \ ../extmod/modwebsocket.o \ + ../extmod/modframebuf.o \ ../extmod/fsusermount.o \ ../extmod/vfs_fat.o \ ../extmod/vfs_fat_ffconf.o \ diff --git a/py/qstrdefs.h b/py/qstrdefs.h index f5e06f1a52..d8c7ccc428 100644 --- a/py/qstrdefs.h +++ b/py/qstrdefs.h @@ -761,3 +761,12 @@ Q(flush) #if MICROPY_PY_WEBSOCKET Q(websocket) #endif + +#if MICROPY_PY_FRAMEBUF +Q(framebuf) +Q(FrameBuffer1) +Q(fill) +Q(pixel) +Q(scroll) +Q(text) +#endif |