[HAL][ARCH-MAX] SPI was fixed to minimum frequency

Due to typo in the #ifdef it would completely skip the ARCH-MAX when
changing the SPI code, causing it to be stuck at lowest frequency.
pull/1115/head
Sissors 2015-05-17 09:43:35 +02:00
parent 4d310b79d9
commit b5b96df58f
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ void spi_format(spi_t *obj, int bits, int mode, int slave)
void spi_frequency(spi_t *obj, int hz)
{
#if defined(TARGET_STM32F401RE) || defined(TARGET_STM32F401VC) || defined(TARGET_F407VG)
#if defined(TARGET_STM32F401RE) || defined(TARGET_STM32F401VC) || defined(TARGET_STM32F407VG)
// Note: The frequencies are obtained with SPI1 clock = 84 MHz (APB2 clock)
if (hz < 600000) {
obj->br_presc = SPI_BAUDRATEPRESCALER_256; // 330 kHz