From db4f0c24cd04ca1b71a87b5fbc0c8bd9f0ffe500 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 26 Nov 2018 22:38:46 -0500 Subject: 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 --- src/avr/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/avr/spi.c') diff --git a/src/avr/spi.c b/src/avr/spi.c index bf0738c1..1216ad1b 100644 --- a/src/avr/spi.c +++ b/src/avr/spi.c @@ -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 -- cgit v1.2.3-70-g09d2