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

@ -39,7 +39,7 @@ spi_init(void)
struct spi_config
spi_setup(uint32_t bus, uint8_t mode, uint32_t rate)
{
if (bus || mode > 3)
if (bus)
shutdown("Invalid spi_setup parameters");
// Make sure the SPI interface is enabled