fix compilation error on F1

This commit is contained in:
Daniel Fekete 2017-06-24 08:24:37 +02:00
parent 4b4323cd53
commit b27e9e6981
2 changed files with 9 additions and 0 deletions

View File

@ -43,6 +43,9 @@ void stm32_adc_init(ADC_HandleTypeDef *handle);
#define ADC_CLOCK_DIV ADC_CLOCK_ASYNC_DIV1
#elif defined(ADC_CLOCKPRESCALER_PCLK_DIV2)
#define ADC_CLOCK_DIV ADC_CLOCKPRESCALER_PCLK_DIV2
#elif defined(STM32F1)
#define ADC_CLOCK_DIV
#else
#error "Unknown clock"
#endif

View File

@ -134,7 +134,13 @@ uint8_t SDIOClass::begin() {
hdma_sdio.Init.MemInc = DMA_MINC_ENABLE;
hdma_sdio.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
hdma_sdio.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
#ifdef DMA_PFCTRL
hdma_sdio.Init.Mode = DMA_PFCTRL;
#else
hdma_sdio.Init.Mode = DMA_NORMAL;
#endif
hdma_sdio.Init.Priority = DMA_PRIORITY_LOW;
_SDIOSetDMAFIFO(hdma_sdio);