Skip to content
Snippets Groups Projects
Unverified Commit f74a1df8 authored by Francisco Acosta's avatar Francisco Acosta Committed by GitHub
Browse files

Merge pull request #9763 from gebart/pr/frdm-k64f-adc

frdm-k64f: Update ADC configuration 
parents e7b554ba 45edfa43
No related branches found
No related tags found
No related merge requests found
...@@ -120,12 +120,32 @@ static const uart_conf_t uart_config[] = { ...@@ -120,12 +120,32 @@ static const uart_conf_t uart_config[] = {
* @{ * @{
*/ */
static const adc_conf_t adc_config[] = { static const adc_conf_t adc_config[] = {
{ .dev = ADC0, .pin = GPIO_PIN(PORT_B, 10), .chan = 14 }, [ 0] = { .dev = ADC0, .pin = GPIO_PIN(PORT_B, 2), .chan = 12 }, /* PTB2 (Arduino A0) */
{ .dev = ADC0, .pin = GPIO_PIN(PORT_B, 11), .chan = 15 }, [ 1] = { .dev = ADC0, .pin = GPIO_PIN(PORT_B, 3), .chan = 13 }, /* PTB3 (Arduino A1) */
{ .dev = ADC0, .pin = GPIO_PIN(PORT_C, 11), .chan = 7 }, [ 2] = { .dev = ADC1, .pin = GPIO_PIN(PORT_B, 10), .chan = 14 }, /* PTB10 (Arduino A2) */
{ .dev = ADC0, .pin = GPIO_PIN(PORT_C, 10), .chan = 6 }, [ 3] = { .dev = ADC1, .pin = GPIO_PIN(PORT_B, 11), .chan = 15 }, /* PTB11 (Arduino A3) */
{ .dev = ADC0, .pin = GPIO_PIN(PORT_C, 8), .chan = 4 }, [ 4] = { .dev = ADC1, .pin = GPIO_PIN(PORT_C, 11), .chan = 7 }, /* PTC11 (Arduino A4) */
{ .dev = ADC0, .pin = GPIO_PIN(PORT_C, 9), .chan = 5 } [ 5] = { .dev = ADC1, .pin = GPIO_PIN(PORT_C, 10), .chan = 6 }, /* PTC10 (Arduino A5) */
[ 6] = { .dev = ADC0, .pin = GPIO_UNDEF , .chan = 0 }, /* ADC0_DP0 */
[ 7] = { .dev = ADC0, .pin = GPIO_UNDEF , .chan = 19 }, /* ADC0_DM0 */
[ 8] = { .dev = ADC0, .pin = GPIO_UNDEF , .chan = (0 | ADC_SC1_DIFF_MASK) }, /* ADC0_DP0 - ADC0_DM0 */
[ 9] = { .dev = ADC1, .pin = GPIO_UNDEF , .chan = 0 }, /* ADC1_DP0 */
[10] = { .dev = ADC1, .pin = GPIO_UNDEF , .chan = 19 }, /* ADC1_DM0 */
[11] = { .dev = ADC1, .pin = GPIO_UNDEF , .chan = (0 | ADC_SC1_DIFF_MASK) }, /* ADC1_DP0 - ADC1_DM0 */
[12] = { .dev = ADC0, .pin = GPIO_UNDEF , .chan = 1 }, /* ADC0_DP1 */
[13] = { .dev = ADC0, .pin = GPIO_UNDEF , .chan = 20 }, /* ADC0_DM1 */
[14] = { .dev = ADC0, .pin = GPIO_UNDEF , .chan = (1 | ADC_SC1_DIFF_MASK) }, /* ADC0_DP1 - ADC0_DM1 */
[15] = { .dev = ADC1, .pin = GPIO_UNDEF , .chan = 1 }, /* ADC1_DP1 */
[16] = { .dev = ADC1, .pin = GPIO_UNDEF , .chan = 20 }, /* ADC1_DM1 */
[17] = { .dev = ADC1, .pin = GPIO_UNDEF , .chan = (1 | ADC_SC1_DIFF_MASK) }, /* ADC1_DP1 - ADC1_DM1 */
/* internal: temperature sensor */
/* The temperature sensor has a very high output impedance, it must not be
* sampled using hardware averaging, or the sampled values will be garbage */
[18] = { .dev = ADC0, .pin = GPIO_UNDEF, .chan = 26 },
/* internal: band gap */
/* Note: the band gap buffer uses a bit of current and is turned off by default,
* Set PMC->REGSC |= PMC_REGSC_BGBE_MASK before reading or the input will be floating */
[19] = { .dev = ADC0, .pin = GPIO_UNDEF, .chan = 27 },
}; };
#define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0])) #define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment