From 4342d81220d0aa8cc950d7a5d7dd211a97fc9e8f Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Mon, 9 Dec 2019 20:24:05 +0100 Subject: [PATCH] boards/mcb2388: add ADC configuration The MCB2388 has a potentiometer connected to an ADC input. --- boards/mcb2388/Makefile.features | 1 + boards/mcb2388/include/periph_conf.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/boards/mcb2388/Makefile.features b/boards/mcb2388/Makefile.features index fdfda71073..b18154210e 100644 --- a/boards/mcb2388/Makefile.features +++ b/boards/mcb2388/Makefile.features @@ -2,6 +2,7 @@ CPU = lpc2387 CPU_MODEL = lpc2388 # Put defined MCU peripherals here (in alphabetical order) +FEATURES_PROVIDED += periph_adc FEATURES_PROVIDED += periph_rtc FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer diff --git a/boards/mcb2388/include/periph_conf.h b/boards/mcb2388/include/periph_conf.h index f6e5babfc2..09839fe873 100644 --- a/boards/mcb2388/include/periph_conf.h +++ b/boards/mcb2388/include/periph_conf.h @@ -79,6 +79,21 @@ static const uart_conf_t uart_config[] = { #define SPI_NUMOF (1) /** @} */ +/** + * @name ADC configuration + * @{ + */ +static const adc_conf_t adc_config[] = { + { + .chan = 0, + .pinsel = 1, + .pinsel_msk = BIT14, + }, +}; + +#define ADC_NUMOF (1) +/** @} */ + #ifdef __cplusplus } #endif