json port from cjson. not work yet
This commit is contained in:
parent
9818c5063b
commit
9c0c960e84
|
@ -36,7 +36,8 @@ SUBDIRS= \
|
|||
smart \
|
||||
wofs \
|
||||
modules \
|
||||
spiffs
|
||||
spiffs \
|
||||
cjson
|
||||
|
||||
endif # } PDIR
|
||||
|
||||
|
@ -84,6 +85,7 @@ COMPONENTS_eagle.app.v6 = \
|
|||
smart/smart.a \
|
||||
wofs/wofs.a \
|
||||
spiffs/spiffs.a \
|
||||
cjson/libcjson.a \
|
||||
modules/libmodules.a
|
||||
|
||||
LINKFLAGS_eagle.app.v6 = \
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d59326b2d718e1a140b9b396ffe0a557b2d93fe0
|
|
@ -4,7 +4,7 @@
|
|||
#define LUA_USE_BUILTIN_STRING // for string.xxx()
|
||||
#define LUA_USE_BUILTIN_TABLE // for table.xxx()
|
||||
#define LUA_USE_BUILTIN_COROUTINE // for coroutine.xxx()
|
||||
#define LUA_USE_BUILTIN_MATH // for math.xxx(), partially work
|
||||
// #define LUA_USE_BUILTIN_MATH // for math.xxx(), partially work
|
||||
// #define LUA_USE_BUILTIN_IO // for io.xxx(), partially work
|
||||
|
||||
// #define LUA_USE_BUILTIN_OS // for os.xxx(), not work
|
||||
|
@ -30,6 +30,7 @@
|
|||
#define LUA_USE_MODULES_COAP
|
||||
#define LUA_USE_MODULES_U8G
|
||||
#define LUA_USE_MODULES_WS2812
|
||||
#define LUA_USE_MODULES_CJSON
|
||||
#endif /* LUA_USE_MODULES */
|
||||
|
||||
#endif /* __USER_MODULES_H__ */
|
||||
|
|
|
@ -47,6 +47,7 @@ INCLUDES += -I ../platform
|
|||
INCLUDES += -I ../wofs
|
||||
INCLUDES += -I ../spiffs
|
||||
INCLUDES += -I ../smart
|
||||
INCLUDES += -I ../cjson
|
||||
PDIR := ../$(PDIR)
|
||||
sinclude $(PDIR)Makefile
|
||||
|
||||
|
|
|
@ -79,6 +79,9 @@ LUALIB_API int ( luaopen_file )( lua_State *L );
|
|||
#define AUXLIB_OW "ow"
|
||||
LUALIB_API int ( luaopen_ow )( lua_State *L );
|
||||
|
||||
#define AUXLIB_CJSON "cjson"
|
||||
LUALIB_API int ( luaopen_ow )( lua_State *L );
|
||||
|
||||
// Helper macros
|
||||
#define MOD_CHECK_ID( mod, id )\
|
||||
if( !platform_ ## mod ## _exists( id ) )\
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -338,7 +338,7 @@ LUALIB_API int luaopen_file( lua_State *L )
|
|||
#if LUA_OPTIMIZE_MEMORY > 0
|
||||
return 0;
|
||||
#else // #if LUA_OPTIMIZE_MEMORY > 0
|
||||
luaL_register( L, AUXLIB_NODE, file_map );
|
||||
luaL_register( L, AUXLIB_FILE, file_map );
|
||||
// Add constants
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -141,6 +141,13 @@
|
|||
#define ROM_MODULES_WS2812
|
||||
#endif
|
||||
|
||||
#if defined(LUA_USE_MODULES_CJSON)
|
||||
#define MODULES_CJSON "cjson"
|
||||
#define ROM_MODULES_CJSON \
|
||||
_ROM(MODULES_CJSON, luaopen_cjson, cjson_map)
|
||||
#else
|
||||
#define ROM_MODULES_CJSON
|
||||
#endif
|
||||
|
||||
#define LUA_MODULES_ROM \
|
||||
ROM_MODULES_GPIO \
|
||||
|
@ -159,7 +166,8 @@
|
|||
ROM_MODULES_UART \
|
||||
ROM_MODULES_OW \
|
||||
ROM_MODULES_BIT \
|
||||
ROM_MODULES_WS2812
|
||||
ROM_MODULES_WS2812 \
|
||||
ROM_MODULES_CJSON
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue