+static int l_clearCommandBuffer(lua_State *L){
+ clearCommandBuffer();
+}
+/**
+ * @brief l_foobar is a dummy function to test lua-integration with
+ * @param L
+ * @return
+ */
+static int l_foobar(lua_State *L)
+{
+ //Check number of arguments
+ int n = lua_gettop(L);
+ printf("foobar called with %d arguments" , n);
+ lua_settop(L, 0);
+ printf("Arguments discarded, stack now contains %d elements", lua_gettop(L));
+ UsbCommand response = {CMD_MIFARE_READBL, {1337, 1338, 1339}};
+ printf("Now returning a UsbCommand as a string");
+ lua_pushlstring(L,&response,sizeof(UsbCommand));
+ return 1;
+}
+
+/**
+ * @brief Utility to check if a key has been pressed by the user. This method does not block.
+ * @param L
+ * @return boolean, true if kbhit, false otherwise.
+ */
+static int l_ukbhit(lua_State *L)
+{
+ lua_pushboolean(L,ukbhit() ? true : false);
+ return 1;
+}