@@ -4,7 +4,7 @@
#include "luat_base.h"
int luat_i2c_exist(int id);
-int luat_i2c_setup(int id, int speed, int slaveaddr);
+int luat_i2c_setup(int id, int speed);
int luat_i2c_close(int id);
int luat_i2c_send(int id, int addr, void* buff, size_t len, uint8_t stop);
int luat_i2c_recv(int id, int addr, void* buff, size_t len);
@@ -209,7 +209,7 @@ end
*/
static int l_i2c_setup(lua_State *L)
{
- int re = luat_i2c_setup(luaL_checkinteger(L, 1), luaL_optinteger(L, 2, 0), luaL_optinteger(L, 3, 0));
+ int re = luat_i2c_setup(luaL_checkinteger(L, 1), luaL_optinteger(L, 2, 0));
lua_pushinteger(L, re == 0 ? luaL_optinteger(L, 2, 0) : -1);
return 1;
}