File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ extern const mp_obj_module_t mp_module_lwip;
113113extern const mp_obj_module_t mp_module_websocket ;
114114extern const mp_obj_module_t mp_module_webrepl ;
115115extern const mp_obj_module_t mp_module_framebuf ;
116+ extern const mp_obj_module_t mp_module_btree ;
116117
117118// extmod functions
118119MP_DECLARE_CONST_FUN_OBJ (pyb_mount_obj );
Original file line number Diff line number Diff line change @@ -205,6 +205,9 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
205205#if MICROPY_PY_FRAMEBUF
206206 { MP_ROM_QSTR (MP_QSTR_framebuf ), MP_ROM_PTR (& mp_module_framebuf ) },
207207#endif
208+ #if MICROPY_PY_BTREE
209+ { MP_ROM_QSTR (MP_QSTR_btree ), MP_ROM_PTR (& mp_module_btree ) },
210+ #endif
208211
209212 // extra builtin modules as defined by a port
210213 MICROPY_PORT_BUILTIN_MODULES
Original file line number Diff line number Diff line change 1616# some code is performance bottleneck and compiled with other optimization options
1717CSUPEROPT = -O3
1818
19+ INC += -I../lib
1920INC += -I../lib/netutils
2021
2122ifeq ($(MICROPY_PY_USSL ) ,1)
@@ -63,6 +64,30 @@ SRC_MOD += $(LWIP_DIR)/netif/slipif.c
6364endif
6465endif
6566
67+ ifeq ($(MICROPY_PY_BTREE ) ,1)
68+ BTREE_DIR = lib/berkeley-db-1.xx
69+ CFLAGS_MOD += -D__DBINTERFACE_PRIVATE=1
70+ INC += -I../$(BTREE_DIR ) /PORT/include
71+ SRC_MOD += extmod/modbtree.c
72+ SRC_MOD += $(addprefix $(BTREE_DIR ) /,\
73+ btree/bt_close.c \
74+ btree/bt_conv.c \
75+ btree/bt_debug.c \
76+ btree/bt_delete.c \
77+ btree/bt_get.c \
78+ btree/bt_open.c \
79+ btree/bt_overflow.c \
80+ btree/bt_page.c \
81+ btree/bt_put.c \
82+ btree/bt_search.c \
83+ btree/bt_seq.c \
84+ btree/bt_split.c \
85+ btree/bt_utils.c \
86+ mpool/mpool.c \
87+ )
88+ CFLAGS_MOD += -DMICROPY_PY_BTREE=1
89+ endif
90+
6691# py object files
6792PY_O_BASENAME = \
6893 mpstate.o \
You can’t perform that action at this time.
0 commit comments