1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

boards/nucleo-f410: add adc configuration

This commit is contained in:
Alexandre Abadie 2017-06-23 16:38:27 +02:00
parent e4cc780f71
commit 1fb6d5d314
2 changed files with 16 additions and 1 deletions

View File

@ -1,4 +1,5 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_gpio

View File

@ -181,9 +181,23 @@ static const spi_conf_t spi_config[] = {
/**
* @name ADC configuration
*
* Note that we do not configure all ADC channels,
* and not in the STM32F410 order. Instead, we
* just define 6 ADC channels, for the Nucleo
* Arduino header pins A0-A5
*
* @{
*/
#define ADC_NUMOF (0)
#define ADC_NUMOF (6U)
#define ADC_CONFIG { \
{GPIO_PIN(PORT_A, 0), 0, 0}, \
{GPIO_PIN(PORT_A, 1), 0, 1}, \
{GPIO_PIN(PORT_A, 4), 0, 4}, \
{GPIO_PIN(PORT_B, 0), 0, 8}, \
{GPIO_PIN(PORT_C, 1), 0, 11}, \
{GPIO_PIN(PORT_C, 0), 0, 10}, \
}
/** @} */
/**