atmel-samd: Fix A1 and A2 analog inputs.

Fixes #3.
This commit is contained in:
Scott Shawcroft 2016-10-07 15:01:26 -07:00
parent afedba5c2f
commit 67372b369e
2 changed files with 5 additions and 6 deletions

View File

@ -3,12 +3,12 @@
PIN(PA02, true, ADC_POSITIVE_INPUT_PIN0, NO_TIMER, NO_TIMER, NO_SERCOM,
NO_SERCOM);
PIN(PB08, true, ADC_POSITIVE_INPUT_PIN8,
PIN(PB08, true, ADC_POSITIVE_INPUT_PIN2,
TIMER(TC4, 0, 0, 0, PIN_PB08E_TC4_WO0, MUX_PB08E_TC4_WO0),
NO_TIMER,
SERCOM(SERCOM4, 0, PINMUX_PB08D_SERCOM4_PAD0),
NO_SERCOM);
PIN(PB09, true, ADC_POSITIVE_INPUT_PIN9,
PIN(PB09, true, ADC_POSITIVE_INPUT_PIN3,
TIMER(TC4, 0, 1, 1, PIN_PB09E_TC4_WO1, MUX_PB09E_TC4_WO1),
NO_TIMER,
SERCOM(SERCOM4, 1, PINMUX_PB09D_SERCOM4_PAD1),

View File

@ -1,15 +1,14 @@
#include "pins.h"
#include "asf/sam0/drivers/system/system.h"
// S0/S2 S2/S4 S1/S3 S3/S5
// i2c pins PA08, PA09, PA12, PA13, PA16, PA17, PA22, PA23
PIN(PA02, true, ADC_POSITIVE_INPUT_PIN0, NO_TIMER, NO_TIMER, NO_SERCOM, \
NO_SERCOM);
PIN(PB08, true, ADC_POSITIVE_INPUT_PIN8,
PIN(PB08, true, ADC_POSITIVE_INPUT_PIN2,
TIMER(TC4, 0, 0, 0, PIN_PB08E_TC4_WO0, MUX_PB08E_TC4_WO0),
NO_TIMER,
SERCOM(SERCOM4, 0, PINMUX_PB08D_SERCOM4_PAD0),
NO_SERCOM);
PIN(PB09, true, ADC_POSITIVE_INPUT_PIN9,
PIN(PB09, true, ADC_POSITIVE_INPUT_PIN3,
TIMER(TC4, 0, 1, 1, PIN_PB09E_TC4_WO1, MUX_PB09E_TC4_WO1),
NO_TIMER,
SERCOM(SERCOM4, 1, PINMUX_PB09D_SERCOM4_PAD1),