Commit 6d82f8da authored by Johny Mattsson's avatar Johny Mattsson
Browse files

Merge pull request #857 from devsaurus/dev-spi_cpol

SPI: cpol=high is not implemented due to insufficient hw docs
parents 53ee80e3 5e9bf95c
......@@ -33,6 +33,10 @@ static int spi_setup( lua_State *L )
if (cpol != PLATFORM_SPI_CPOL_LOW && cpol != PLATFORM_SPI_CPOL_HIGH) {
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) {
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