HAL_ChibiOS: allow for ADC and clock overrides

This commit is contained in:
Andrew Tridgell 2019-07-26 07:46:53 +10:00
parent dc89d10ccf
commit 5cbe85ee19
1 changed files with 12 additions and 0 deletions

View File

@ -94,9 +94,15 @@
#define STM32_PLLQ_VALUE 7
#endif
#ifndef STM32_HPRE
#define STM32_HPRE STM32_HPRE_DIV1
#endif
#ifndef STM32_PPRE1
#define STM32_PPRE1 STM32_PPRE1_DIV4
#endif
#ifndef STM32_PPRE2
#define STM32_PPRE2 STM32_PPRE2_DIV2
#endif
#define STM32_RTCSEL STM32_RTCSEL_LSI
#define STM32_RTCPRE_VALUE 8
#define STM32_MCO1SEL STM32_MCO1SEL_HSI
@ -114,9 +120,15 @@
* ADC driver system settings.
*/
#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4
#ifndef STM32_ADC_USE_ADC1
#define STM32_ADC_USE_ADC1 TRUE
#endif
#ifndef STM32_ADC_USE_ADC2
#define STM32_ADC_USE_ADC2 FALSE
#endif
#ifndef STM32_ADC_USE_ADC3
#define STM32_ADC_USE_ADC3 FALSE
#endif
#define STM32_ADC_ADC1_DMA_PRIORITY 2
#define STM32_ADC_ADC2_DMA_PRIORITY 2
#define STM32_ADC_ADC3_DMA_PRIORITY 2