LuPPC/src/c/modules.c

34 lines
1.1 KiB
C
Raw Normal View History

2016-01-05 04:20:40 +11:00
#include "luares.h"
2016-01-19 11:25:14 +11:00
#include "res.h"
2016-01-05 04:20:40 +11:00
#include "lupi.h"
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include <stdlib.h>
void setup_modules(lua_State *L) {
2016-02-29 00:31:55 +11:00
lua_createtable (L, 0, 32);
2016-01-05 04:20:40 +11:00
2016-02-29 00:31:55 +11:00
pushstuple(L, "boot", lua_boot);
pushstuple(L, "color", lua_util_color);
pushstuple(L, "component", lua_component);
pushstuple(L, "computer", lua_computer);
pushstuple(L, "debug", lua_debug);
pushstuple(L, "eeprom", lua_eeprom);
pushstuple(L, "filesystem", lua_filesystem);
pushstuple(L, "gpio", lua_gpio);
pushstuple(L, "gpudetect", lua_gpudetect);
pushstuple(L, "internet", lua_internet);
pushstuple(L, "sandbox", lua_sandbox);
pushstuple(L, "textgpu", lua_textgpu);
pushstuple(L, "fbgpu", lua_fbgpu);
pushstuple(L, "color", lua_util_color);
pushstuple(L, "random", lua_util_random);
pushstuple(L, "buffer", lua_util_buffer);
2016-02-29 00:31:55 +11:00
pushstuple(L, "eepromDefault", res_eepromDefault);
pushstuple(L, "help", res_help);
2016-01-19 11:25:14 +11:00
2016-01-05 04:20:40 +11:00
lua_setglobal(L, "moduleCode");
2016-01-20 05:46:40 +11:00
}