主函数
int main(void)
{
HAL_Init();
LED_Init(); /* LED初始化 */
Stm32_Clock_Init(336,8,2,7);/* 时钟初始化 */
delay_init(168);
lua_State *L; /* 创建Lua编译器*/
L = luaL_newstate(); /* 建立Lua运行环境 */
luaopen_base(L); /* 注册基本函数 */
luaL_setfuncs(L, mylib, 0);
luaL_dostring(L, LUA_SCRIPT_GLOBAL); /* 运行Lua脚本 */
while(1)
{
}
}
|