Skip to content

Instantly share code, notes, and snippets.

@randrews
randrews / lua_map.c
Created April 23, 2011 22:16
Example of embedding Lua in C
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include <stdlib.h>
int map_create(lua_State *lua);
int map_slice(lua_State *lua);
int main(int argc, char **argv){
lua_State *lua = lua_open();
@voidlizard
voidlizard / gist:1735496
Created February 4, 2012 05:07
lwIP PPP initialization
I have ppp working in both lwip 1.3.0 and lwip 1.3.2 and would recommend 1.3.2
First you need ti init the stack and the init ppp
sys_sem_t sem;
sem = sys_sem_new(0); // Create a new semaphore.
tcpip_init(tcpip_init_done, &sem);
sys_sem_wait(sem); // Block until the lwIP stack is initialized.
sys_sem_free(sem); // Free the semaphore.