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:
parent
13e578bc84
commit
9c0dfaada9
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user