NXP KL43Z/KL27Z: fix spi format bits check
pull/3732/merge
Martin Kojtal 2017-02-21 17:13:07 +00:00 committed by GitHub
commit ff41cc97ae
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ void spi_format(spi_t *obj, int bits, int mode, int slave)
spi_master_config_t master_config;
spi_slave_config_t slave_config;
if ((bits != 8) || (bits != 16)) {
if ((bits != 8) && (bits != 16)) {
error("Only 8bits and 16bits SPI supported");
return;
}

View File

@ -65,7 +65,7 @@ void spi_format(spi_t *obj, int bits, int mode, int slave)
spi_master_config_t master_config;
spi_slave_config_t slave_config;
if ((bits != 8) || (bits != 16)) {
if ((bits != 8) && (bits != 16)) {
error("Only 8bits and 16bits SPI supported");
return;
}