mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-12 01:08:00 -06:00
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:
parent
6b108aa885
commit
db4f0c24cd
6 changed files with 12 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue