boards/nucleo-l476rg: declare adc_config[] directly in periph_conf.h

This commit is contained in:
hugues 2020-08-25 16:06:29 +02:00
parent cbd60b68a3
commit d1a7ecb60e

View File

@ -209,15 +209,16 @@ static const spi_conf_t spi_config[] = {
* *
* @{ * @{
*/ */
#define ADC_NUMOF (6U) static const adc_conf_t adc_config[] = {
#define ADC_CONFIG { \ {GPIO_PIN(PORT_A, 0), 0, 5}, /*< ADC12_IN5 */
{GPIO_PIN(PORT_A, 0), 0, 5}, /*< ADC12_IN5 */ \ {GPIO_PIN(PORT_A, 1), 0, 6}, /*< ADC12_IN6 */
{GPIO_PIN(PORT_A, 1), 0, 6}, /*< ADC12_IN6 */ \ {GPIO_PIN(PORT_A, 4), 1, 9}, /*< ADC12_IN9 */
{GPIO_PIN(PORT_A, 4), 1, 9}, /*< ADC12_IN9 */ \ {GPIO_PIN(PORT_B, 0), 1, 15}, /*< ADC12_IN15 */
{GPIO_PIN(PORT_B, 0), 1, 15}, /*< ADC12_IN15 */ \ {GPIO_PIN(PORT_C, 1), 2, 2}, /*< ADC123_IN_2 */
{GPIO_PIN(PORT_C, 1), 2, 2}, /*< ADC123_IN_2 */ \ {GPIO_PIN(PORT_C, 0), 2, 1}, /*< ADC123_IN_1 */
{GPIO_PIN(PORT_C, 0), 2, 1}, /*< ADC123_IN_1 */ \ };
}
#define ADC_NUMOF ARRAY_SIZE(adc_config)
/** @} */ /** @} */
#ifdef __cplusplus #ifdef __cplusplus