nodemcu-firmware/app/include/user_modules.h
Johny Mattsson 4e8ef87d03 Reworked module registration, removed modules.h
Module creation & registration now made a lot simpler. In essence,
each module file is now self-contained and only needs a

  NODEMCU_MODULE(MYNAME, "myname", myname_map, luaopen_myname);

line to both be automatically recognised by the Lua initialization
as well as honor the LUA_USE_MODULES_MYNAME #define.
2015-12-16 16:09:16 +11:00

51 lines
1.6 KiB
C

#ifndef __USER_MODULES_H__
#define __USER_MODULES_H__
#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_IO // for io.xxx(), partially work
// #define LUA_USE_BUILTIN_OS // for os.xxx(), not work
// #define LUA_USE_BUILTIN_DEBUG
#define LUA_USE_BUILTIN_DEBUG_MINIMAL // for debug.getregistry() and debug.traceback()
#ifndef LUA_CROSS_COMPILER
#define LUA_USE_MODULES_ADC
#define LUA_USE_MODULES_BIT
//#define LUA_USE_MODULES_BMP085
#define LUA_USE_MODULES_CJSON
#define LUA_USE_MODULES_COAP
#define LUA_USE_MODULES_CRYPTO
#define LUA_USE_MODULES_DHT
//#define LUA_USE_MODULES_ENDUSER_SETUP // USE_DNS in dhcpserver.h needs to be enabled for this module to work.
#define LUA_USE_MODULES_FILE
#define LUA_USE_MODULES_GPIO
//#define LUA_USE_MODULES_HX711
#define LUA_USE_MODULES_I2C
#define LUA_USE_MODULES_MQTT
#define LUA_USE_MODULES_NET
#define LUA_USE_MODULES_NODE
#define LUA_USE_MODULES_OW
#define LUA_USE_MODULES_PWM
#define LUA_USE_MODULES_RC
#define LUA_USE_MODULES_RTCFIFO
#define LUA_USE_MODULES_RTCMEM
#define LUA_USE_MODULES_RTCTIME
#define LUA_USE_MODULES_SNTP
#define LUA_USE_MODULES_SPI
#define LUA_USE_MODULES_TMR
#define LUA_USE_MODULES_TSL2561
#define LUA_USE_MODULES_U8G
#define LUA_USE_MODULES_UART
//#define LUA_USE_MODULES_UCG
#define LUA_USE_MODULES_WIFI
//#define LUA_USE_MODULES_WS2801
#define LUA_USE_MODULES_WS2812
#endif /* LUA_CROSS_COMPILER */
#endif /* __USER_MODULES_H__ */