1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/msba2: add ADC configuration

ADC pins are on the AD/DA pins (JP8).
Configure AD0.0 - AD0.2 as laid out on the board schematics.
This commit is contained in:
Benjamin Valentin 2019-12-09 19:53:00 +01:00 committed by Benjamin Valentin
parent 13e578bc84
commit 9c0dfaada9
2 changed files with 27 additions and 0 deletions

View File

@ -1,6 +1,7 @@
CPU = lpc2387
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_rtc
FEATURES_PROVIDED += periph_spi

View File

@ -121,6 +121,32 @@ static const uart_conf_t uart_config[] = {
#define SPI_NUMOF (1)
/** @} */
/**
* @name ADC configuration
* @{
*/
static const adc_conf_t adc_config[] = {
{ /* P0.23 */
.chan = 0,
.pinsel = 1,
.pinsel_msk = BIT14,
},
{ /* P0.24 */
.chan = 1,
.pinsel = 1,
.pinsel_msk = BIT16,
},
{ /* P0.25 */
.chan = 2,
.pinsel = 1,
.pinsel_msk = BIT18,
},
};
#define ADC_NUMOF ARRAY_SIZE(adc_config)
/** @} */
#ifdef __cplusplus
}
#endif