mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/samd51: adapt ADC configuration
This commit is contained in:
parent
9feb1ffa68
commit
562cc9bba8
@ -238,16 +238,15 @@ static const sam0_common_usb_config_t sam_usbdev_config[] = {
|
||||
|
||||
#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG(0x18u)
|
||||
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
|
||||
#define ADC_DEV ADC0
|
||||
|
||||
static const adc_conf_chan_t adc_channels[] = {
|
||||
/* port, pin, muxpos */
|
||||
{GPIO_PIN(PA, 2), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN0)},
|
||||
{GPIO_PIN(PA, 5), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN5)},
|
||||
{GPIO_PIN(PB, 8), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN2)},
|
||||
{GPIO_PIN(PB, 9), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN3)},
|
||||
{GPIO_PIN(PA, 4), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN4)},
|
||||
{GPIO_PIN(PA, 6), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN6)},
|
||||
/* port, pin, muxpos, dev */
|
||||
{GPIO_PIN(PA, 2), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN0), ADC0},
|
||||
{GPIO_PIN(PA, 5), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN5), ADC0},
|
||||
{GPIO_PIN(PB, 8), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN2), ADC0},
|
||||
{GPIO_PIN(PB, 9), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN3), ADC0},
|
||||
{GPIO_PIN(PA, 4), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN4), ADC0},
|
||||
{GPIO_PIN(PA, 6), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN6), ADC0},
|
||||
};
|
||||
|
||||
#define ADC_NUMOF ARRAY_SIZE(adc_channels)
|
||||
|
@ -269,13 +269,12 @@ static const sam0_common_usb_config_t sam_usbdev_config[] = {
|
||||
|
||||
#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG(0x18u)
|
||||
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
|
||||
#define ADC_DEV ADC1
|
||||
|
||||
static const adc_conf_chan_t adc_channels[] = {
|
||||
/* port, pin, muxpos */
|
||||
{GPIO_PIN(PB, 8), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN2)}, /* A2 */
|
||||
{GPIO_PIN(PB, 9), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN3)}, /* A3 */
|
||||
{GPIO_PIN(PB, 4), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN6)}, /* A7 - Light sensor */
|
||||
/* port, pin, muxpos, dev */
|
||||
{GPIO_PIN(PB, 8), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN2), ADC1}, /* A2 */
|
||||
{GPIO_PIN(PB, 9), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN3), ADC1}, /* A3 */
|
||||
{GPIO_PIN(PB, 4), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN6), ADC1}, /* A7 - Light sensor */
|
||||
};
|
||||
|
||||
#define ADC_NUMOF ARRAY_SIZE(adc_channels)
|
||||
|
@ -337,13 +337,12 @@ static const sam0_common_usb_config_t sam_usbdev_config[] = {
|
||||
|
||||
#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG(0x18u)
|
||||
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
|
||||
#define ADC_DEV ADC0
|
||||
|
||||
static const adc_conf_chan_t adc_channels[] = {
|
||||
/* port, pin, muxpos */
|
||||
{GPIO_PIN(PA, 3), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN1)},
|
||||
{GPIO_PIN(PA, 5), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN5)},
|
||||
{GPIO_PIN(PA, 7), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN7)}
|
||||
/* port, pin, muxpos, dev */
|
||||
{GPIO_PIN(PA, 3), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN1), ADC0},
|
||||
{GPIO_PIN(PA, 5), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN5), ADC0},
|
||||
{GPIO_PIN(PA, 7), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN7), ADC0}
|
||||
};
|
||||
|
||||
#define ADC_NUMOF ARRAY_SIZE(adc_channels)
|
||||
|
Loading…
Reference in New Issue
Block a user