init: Air780EPM 官方 LuatOS 项目代码基线
- 来源: 合宙 LuatOS 官方仓库 air780epm 模块完整代码 - 路径: luatos/air780epm/module/Air780EPM/demo 含官方 demo(含 mqtt/mqtts/socket/uart 等) - 后续: 基于 demo 开发 UART<->MQTT 数据上报功能
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef ROTABLE_H_
|
||||
#define ROTABLE_H_
|
||||
|
||||
#include "lua.h"
|
||||
|
||||
/* exactly the same as luaL_Reg, but since we are on small embedded
|
||||
* microcontrollers, we don't assume that you have `lauxlib.h`
|
||||
* available in your build! */
|
||||
typedef struct rotable_Reg {
|
||||
char const* name;
|
||||
lua_CFunction func;
|
||||
lua_Integer value;
|
||||
} rotable_Reg;
|
||||
|
||||
/* compatible with `luaL_newlib()`, and works with `luaL_Reg` *and*
|
||||
* `rotable_Reg` arrays (in case you don't use `lauxlib.h`) */
|
||||
void rotable_newlib( lua_State* L, void const* reg );
|
||||
|
||||
/* Since userdatas can not be used as `__index` meta methods directly
|
||||
* this function creates a C closure that looks up keys in a given
|
||||
* `rotable_Reg` array. */
|
||||
void rotable_newidx( lua_State* L, void const* reg );
|
||||
|
||||
#endif /* ROTABLE_H_ */
|
||||
|
||||
Reference in New Issue
Block a user