1-添加自己的Lua执行函数(ESP8266-SDK开发(lua版本))


基础

lua_pushnumber (L, 1);
lua_pushnumber (L,3);
lua_pushnumber (L,4);
return 3;

 

 

c_sprintf(temp, "%d.%d.%d.%d", IP2STR(&pTempIp.ip) );
lua_pushstring( L, temp );
c_sprintf(temp, "%d.%d.%d.%d", IP2STR(&pTempIp.netmask) );
lua_pushstring( L, temp );
c_sprintf(temp, "%d.%d.%d.%d", IP2STR(&pTempIp.gw) );
lua_pushstring( L, temp );
return 3;

 

 

 添加的测试程序

 

编译下载固件,(请自行编译Lua版本固件)

 

 

测试 

 

 

 

 为以后做更为实用的功能做铺垫

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM