码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2018-07-14 22:41:14      阅读:451      评论:0      收藏:0      [点我收藏+]

标签:技术分享   基础   执行   hnu   src   str   printf   技术   执行函数   

基础

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版本固件)

 

 

测试 

 

 技术分享图片

 

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

 

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

标签:技术分享   基础   执行   hnu   src   str   printf   技术   执行函数   

原文地址:https://www.cnblogs.com/yangfengwu/p/9311130.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!