mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/samd5x: define ADC pins
rg define\ PIN_.*_AIN | grep ADC | cut -d' ' -f2 | sort | uniq | sed -E "s/PIN_(P[A-F])([0-9][0-9])B_ADC0_AIN([0-9]*)/\3 GPIO_PIN(\1, \2),/" | sort -n | grep GPIO | cut -d ' ' -f2- | sed -E "s/0([0-9])/\1/" rg define\ PIN_.*_AIN | grep ADC | cut -d' ' -f2 | sort | uniq | sed -E "s/PIN_(P[A-F])([0-9][0-9])B_ADC1_AIN([0-9]*)/\3 GPIO_PIN(\1, \2),/" | sort -n | grep GPIO | cut -d ' ' -f2- | sed -E "s/0([0-9])/\1/"
This commit is contained in:
parent
8075b69275
commit
75ee373b01
@ -95,6 +95,24 @@ typedef enum {
|
||||
} adc_res_t;
|
||||
#endif /* DOXYGEN */
|
||||
|
||||
/**
|
||||
* @brief Pins that can be used for ADC input
|
||||
*/
|
||||
static const gpio_t sam0_adc_pins[2][16] = {
|
||||
{ /* ADC0 pins */
|
||||
GPIO_PIN(PA, 2), GPIO_PIN(PA, 3), GPIO_PIN(PB, 8), GPIO_PIN(PB, 9),
|
||||
GPIO_PIN(PA, 4), GPIO_PIN(PA, 5), GPIO_PIN(PA, 6), GPIO_PIN(PA, 7),
|
||||
GPIO_PIN(PA, 8), GPIO_PIN(PA, 9), GPIO_PIN(PA, 10), GPIO_PIN(PA, 11),
|
||||
GPIO_PIN(PB, 0), GPIO_PIN(PB, 1), GPIO_PIN(PB, 2), GPIO_PIN(PB, 3)
|
||||
},
|
||||
{ /* ADC1 pins */
|
||||
GPIO_PIN(PB, 8), GPIO_PIN(PB, 9), GPIO_PIN(PA, 8), GPIO_PIN(PA, 9),
|
||||
GPIO_PIN(PC, 2), GPIO_PIN(PC, 3), GPIO_PIN(PB, 4), GPIO_PIN(PB, 5),
|
||||
GPIO_PIN(PB, 6), GPIO_PIN(PB, 7), GPIO_PIN(PC, 0), GPIO_PIN(PC, 1),
|
||||
GPIO_PIN(PC, 30), GPIO_PIN(PC, 31), GPIO_PIN(PD, 0), GPIO_PIN(PD, 1)
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The MCU has a 12 bit DAC
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user