fix compilation error on F1
This commit is contained in:
parent
4b4323cd53
commit
b27e9e6981
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue