diff --git a/app/nano_shell_command.c b/app/nano_shell_command.c index b07fea2..5fa5195 100644 --- a/app/nano_shell_command.c +++ b/app/nano_shell_command.c @@ -137,12 +137,6 @@ int _bus(const shell_cmd_t *pcmd, int argc, char *const argv[]) { if(strcmp(argv[1], "spi_init") == 0) { - //Let's set the IO's up - wm_spi_cs_config(WM_IO_PB_14); - wm_spi_ck_config(WM_IO_PB_15); - wm_spi_di_config(WM_IO_PB_16); - wm_spi_do_config(WM_IO_PB_17); - shell_printf("SPI init : %d"NEW_LINE, tls_spi_setup(SPI_DEFAULT_MODE, SPI_CS_ACTIVE_MODE, SPI_DEFAULT_SPEED)); } else if(strcmp(argv[1], "spi_w") == 0) diff --git a/platform/sys/wm_main.c b/platform/sys/wm_main.c index e8911bf..b5a954b 100644 --- a/platform/sys/wm_main.c +++ b/platform/sys/wm_main.c @@ -182,11 +182,18 @@ void wm_gpio_config() } #endif -#if (TLS_CONFIG_LS_SPI) - wm_spi_cs_config(WM_IO_PB_04); - wm_spi_ck_config(WM_IO_PB_02); - wm_spi_di_config(WM_IO_PB_03); - wm_spi_do_config(WM_IO_PB_05); +#if (TLS_CONFIG_LS_SPI) + #if 1 + wm_spi_cs_config(WM_IO_PB_14); + wm_spi_ck_config(WM_IO_PB_15); + wm_spi_di_config(WM_IO_PB_16); + wm_spi_do_config(WM_IO_PB_17); + #elif + wm_spi_cs_config(WM_IO_PB_04); + wm_spi_ck_config(WM_IO_PB_02); + wm_spi_di_config(WM_IO_PB_03); + wm_spi_do_config(WM_IO_PB_05); + #endif #endif } #if MAIN_TASK_DELETE_AFTER_START_FTR