From 75488639ebb2922df77687a34e19ef27399abe78 Mon Sep 17 00:00:00 2001 From: devsaurus Date: Mon, 19 Oct 2015 23:01:59 +0200 Subject: [PATCH] make spi.send() transparent for 32 bit data accept negative values as u32 --- app/modules/spi.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/modules/spi.c b/app/modules/spi.c index dce152de..6c98f7c2 100644 --- a/app/modules/spi.c +++ b/app/modules/spi.c @@ -71,8 +71,6 @@ static int spi_send( lua_State *L ) if( lua_type( L, argn ) == LUA_TNUMBER ) { numdata = ( int )luaL_checkinteger( L, argn ); - if( numdata < 0 ) - return luaL_error( L, "wrong arg range" ); platform_spi_send( id, spi_databits[id], numdata ); wrote ++; } @@ -84,8 +82,6 @@ static int spi_send( lua_State *L ) lua_rawgeti( L, argn, i + 1 ); numdata = ( int )luaL_checkinteger( L, -1 ); lua_pop( L, 1 ); - if( numdata < 0 ) - return luaL_error( L, "wrong arg range" ); platform_spi_send( id, spi_databits[id], numdata ); } wrote += i;