spicmds: Check for an incorrect mode in spicmds.c

Check the mode parameter in spicmds.c so that the mcu code does not
need to check it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2018-11-26 22:38:46 -05:00
parent 6b108aa885
commit db4f0c24cd
6 changed files with 12 additions and 10 deletions

View File

@@ -30,8 +30,6 @@ static void spi_set_mode(SPI_TypeDef *spi, uint8_t mode)
LL_SPI_SetClockPolarity(spi, LL_SPI_POLARITY_HIGH);
LL_SPI_SetClockPhase(spi, LL_SPI_PHASE_2EDGE);
break;
default:
shutdown("Invalid SPI mode");
}
}