spi_software: save mode setting in config structure.

Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
This commit is contained in:
Matt Baker 2019-05-06 11:52:18 -07:00 committed by KevinOConnor
parent f444177bb4
commit c95705ba3a
1 changed files with 1 additions and 0 deletions

View File

@ -30,6 +30,7 @@ command_config_software_spi(uint32_t *args)
spi->sclk = gpio_out_setup(sclk_pin, 0); spi->sclk = gpio_out_setup(sclk_pin, 0);
spi->mosi = gpio_out_setup(mosi_pin, 0); spi->mosi = gpio_out_setup(mosi_pin, 0);
spi->miso = gpio_in_setup(miso_pin, 1); spi->miso = gpio_in_setup(miso_pin, 1);
spi->mode = mode;
} }
DECL_COMMAND(command_config_software_spi, DECL_COMMAND(command_config_software_spi,
"config_software_spi oid=%c sclk_pin=%u mosi_pin=%u miso_pin=%u" "config_software_spi oid=%c sclk_pin=%u mosi_pin=%u miso_pin=%u"