Merge pull request #16968 from Mesh4all/cpu/stm32_duplicated_defs

cpu/stm32: duplicated ADC devices definitions
This commit is contained in:
Jean Pierre Dudey 2021-10-11 12:58:05 +02:00 committed by GitHub
commit b965feb5ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 17 deletions

View File

@ -52,6 +52,11 @@ extern "C" {
#define RTT_MAX_FREQUENCY (RTT_CLOCK_FREQUENCY / 2) /* in Hz */
/** @} */
/**
* @brief Available number of ADC devices
*/
#define ADC_DEVS (2U)
#ifdef __cplusplus
}
#endif

View File

@ -485,23 +485,6 @@ typedef enum {
#define DMA_DATA_WIDTH_SHIFT (0)
/** @} */
/**
* @brief Available number of ADC devices
*/
#if defined(CPU_FAM_STM32F1) || defined(CPU_FAM_STM32F2)
#define ADC_DEVS (2U)
#elif defined(CPU_LINE_STM32F401xE) || defined(CPU_LINE_STM32F410Rx) \
|| defined(CPU_LINE_STM32F411xE) || defined(CPU_LINE_STM32F412Zx) \
|| defined(CPU_LINE_STM32F413xx) || defined(CPU_LINE_STM32F423xx) \
|| defined(CPU_MODEL_STM32L452RE) || defined(CPU_MODEL_STM32L432KC)
#define ADC_DEVS (1U)
#elif defined(CPU_LINE_STM32F405xx) || defined(CPU_LINE_STM32F407xx) \
|| defined(CPU_LINE_STM32F415xx) || defined(CPU_LINE_STM32F429xx) \
|| defined(CPU_LINE_STM32F437xx) || defined(CPU_LINE_STM32F446xx) \
|| defined(CPU_MODEL_STM32L476RG) || defined(CPU_MODEL_STM32L475VG)
#define ADC_DEVS (3U)
#endif
/**
* @brief ADC channel configuration data
*/