Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
bbef457e
Commit
bbef457e
authored
Mar 06, 2015
by
funshine
Browse files
seperate user_config.h to speed-up compile when modules disabled/enabled
parent
c309ae4c
Changes
7
Hide whitespace changes
Inline
Side-by-side
app/.gitignore
View file @
bbef457e
*.output*
*.output*
mapfile
!.gitignore
!.gitignore
app/include/user_config.h
View file @
bbef457e
#ifndef __USER_CONFIG_H__
#ifndef __USER_CONFIG_H__
#define __USER_CONFIG_H__
#define __USER_CONFIG_H__
#define NODE_VERSION_MAJOR 0U
#define NODE_VERSION_MINOR 9U
#define NODE_VERSION_REVISION 5U
#define NODE_VERSION_INTERNAL 0U
#define NODE_VERSION "NodeMCU 0.9.5"
#define BUILD_DATE "build 20150214"
// #define DEVKIT_VERSION_0_9 1 // define this only if you use NodeMCU devkit v0.9
// #define DEVKIT_VERSION_0_9 1 // define this only if you use NodeMCU devkit v0.9
// #define FLASH_512K
// #define FLASH_512K
...
@@ -51,33 +43,6 @@
...
@@ -51,33 +43,6 @@
// #define BUILD_WOFS 1
// #define BUILD_WOFS 1
#define BUILD_SPIFFS 1
#define BUILD_SPIFFS 1
#define LUA_USE_MODULES
#ifdef LUA_USE_MODULES
#define LUA_USE_MODULES_NODE
#define LUA_USE_MODULES_FILE
#define LUA_USE_MODULES_GPIO
#define LUA_USE_MODULES_WIFI
#define LUA_USE_MODULES_NET
#define LUA_USE_MODULES_PWM
#define LUA_USE_MODULES_I2C
#define LUA_USE_MODULES_SPI
#define LUA_USE_MODULES_TMR
#define LUA_USE_MODULES_ADC
#define LUA_USE_MODULES_UART
#define LUA_USE_MODULES_OW
#define LUA_USE_MODULES_BIT
#define LUA_USE_MODULES_U8G
#define LUA_USE_MODULES_MQTT
#define LUA_USE_MODULES_WS2812 // TODO: put this device specific module to device driver section.
#endif
/* LUA_USE_MODULES */
// TODO: put device specific module to device driver section.
#ifdef LUA_USE_DEVICE_DRIVER
#define LUA_USE_DEVICE_WS2812
#endif
/* LUA_USE_DEVICE_DRIVER */
// #define LUA_NUMBER_INTEGRAL
// #define LUA_NUMBER_INTEGRAL
#define LUA_OPTRAM
#define LUA_OPTRAM
...
@@ -99,7 +64,6 @@
...
@@ -99,7 +64,6 @@
#define LED_LOW_COUNT_DEFAULT 0
#define LED_LOW_COUNT_DEFAULT 0
#endif
#endif
// Configure U8glib fonts
// Configure U8glib fonts
// add a U8G_FONT_TABLE_ENTRY for each font you want to compile into the image
// add a U8G_FONT_TABLE_ENTRY for each font you want to compile into the image
#define U8G_FONT_TABLE_ENTRY(font)
#define U8G_FONT_TABLE_ENTRY(font)
...
...
app/include/user_modules.h
0 → 100644
View file @
bbef457e
#ifndef __USER_MODULES_H__
#define __USER_MODULES_H__
#define LUA_USE_MODULES
#ifdef LUA_USE_MODULES
#define LUA_USE_MODULES_NODE
#define LUA_USE_MODULES_FILE
#define LUA_USE_MODULES_GPIO
#define LUA_USE_MODULES_WIFI
#define LUA_USE_MODULES_NET
#define LUA_USE_MODULES_PWM
#define LUA_USE_MODULES_I2C
#define LUA_USE_MODULES_SPI
#define LUA_USE_MODULES_TMR
#define LUA_USE_MODULES_ADC
#define LUA_USE_MODULES_UART
#define LUA_USE_MODULES_OW
#define LUA_USE_MODULES_BIT
#define LUA_USE_MODULES_U8G
#define LUA_USE_MODULES_MQTT
#define LUA_USE_MODULES_WS2812
#endif
/* LUA_USE_MODULES */
#endif
/* __USER_MODULES_H__ */
app/include/user_version.h
0 → 100644
View file @
bbef457e
#ifndef __USER_VERSION_H__
#define __USER_VERSION_H__
#define NODE_VERSION_MAJOR 0U
#define NODE_VERSION_MINOR 9U
#define NODE_VERSION_REVISION 5U
#define NODE_VERSION_INTERNAL 0U
#define NODE_VERSION "NodeMCU 0.9.5"
#define BUILD_DATE "build 20150306"
#endif
/* __USER_VERSION_H__ */
app/lua/lua.c
View file @
bbef457e
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include "c_stdlib.h"
#include "c_stdlib.h"
#include "c_string.h"
#include "c_string.h"
#include "flash_fs.h"
#include "flash_fs.h"
#include "user_version.h"
#define lua_c
#define lua_c
...
...
app/
lua
/linit.c
→
app/
modules
/linit.c
View file @
bbef457e
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
#include "lrotable.h"
#include "lrotable.h"
#include "luaconf.h"
#include "luaconf.h"
#include "user_modules.h"
#if defined(LUA_USE_MODULES)
#if defined(LUA_USE_MODULES)
#include "modules.h"
#include "modules.h"
#endif
#endif
...
...
app/modules/node.c
View file @
bbef457e
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "user_interface.h"
#include "user_interface.h"
#include "flash_api.h"
#include "flash_api.h"
#include "flash_fs.h"
#include "flash_fs.h"
#include "user_version.h"
// Lua: restart()
// Lua: restart()
static
int
node_restart
(
lua_State
*
L
)
static
int
node_restart
(
lua_State
*
L
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment