Commit 5e9bf95c authored by devsaurus's avatar devsaurus
Browse files

cpol=high is not implemented due to insufficient hw docs

parent 0386ae65
...@@ -33,6 +33,10 @@ static int spi_setup( lua_State *L ) ...@@ -33,6 +33,10 @@ static int spi_setup( lua_State *L )
if (cpol != PLATFORM_SPI_CPOL_LOW && cpol != PLATFORM_SPI_CPOL_HIGH) { if (cpol != PLATFORM_SPI_CPOL_LOW && cpol != PLATFORM_SPI_CPOL_HIGH) {
return luaL_error( L, "wrong arg type" ); return luaL_error( L, "wrong arg type" );
} }
// CPOL_HIGH is not implemented, see app/driver/spi.c spi_master_init()
if (cpol == PLATFORM_SPI_CPOL_HIGH) {
return luaL_error( L, "cpol=high is not implemented" );
}
if (cpha != PLATFORM_SPI_CPHA_LOW && cpha != PLATFORM_SPI_CPHA_HIGH) { if (cpha != PLATFORM_SPI_CPHA_LOW && cpha != PLATFORM_SPI_CPHA_HIGH) {
return luaL_error( L, "wrong arg type" ); return luaL_error( L, "wrong arg type" );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment