Merge pull request #857 from devsaurus/dev-spi_cpol
SPI: cpol=high is not implemented due to insufficient hw docs
This commit is contained in:
commit
6d82f8da9d
|
@ -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" );
|
||||||
|
|
Loading…
Reference in New Issue