STM32: remove F3 spi_api.c warning

Solve below warning:

"...\targets\TARGET_STM\TARGET_STM32F3\spi_api.c", line 73:
Warning:  #111-D: statement is unreachable
pull/3628/head
Laurent MEUNIER 2017-01-23 17:06:00 +01:00
parent 04a31f3b39
commit c6a898d71b
1 changed files with 10 additions and 4 deletions

View File

@ -62,16 +62,22 @@ int spi_get_clock_freq(spi_t *obj) {
#endif
#if defined SPI2_BASE
case SPI_2:
/* SPI_2 and SPI_3. Source CLK is PCKL1 */
spi_hz = HAL_RCC_GetPCLK1Freq();
break;
#endif
#if defined SPI3_BASE
case SPI_3:
#endif
#if defined SPI4_BASE
case SPI_4:
#endif
/* SPI_2 and SPI_3. Source CLK is PCKL1 */
spi_hz = HAL_RCC_GetPCLK1Freq();
break;
#endif
#if defined SPI4_BASE
case SPI_4:
/* SPI_4. Source CLK is PCKL2 */
spi_hz = HAL_RCC_GetPCLK2Freq();
break;
#endif
default:
error("CLK: SPI instance not set");
break;