aboutsummaryrefslogtreecommitdiffstats
path: root/src/sam3/adc.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-12-26 20:31:23 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-01-07 19:34:31 -0500
commit75ad16ea1a3ffcb7026c69f6f1ea78197b055779 (patch)
tree98273f13f386e9da0378a6f9c3d109b652865c63 /src/sam3/adc.c
parent519f2cff4123b8cd8e18ca5342e1bf8c4d01cd5a (diff)
downloadkutter-75ad16ea1a3ffcb7026c69f6f1ea78197b055779.tar.gz
kutter-75ad16ea1a3ffcb7026c69f6f1ea78197b055779.tar.xz
kutter-75ad16ea1a3ffcb7026c69f6f1ea78197b055779.zip
sam3: Add support for sam4s8c chips
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/sam3/adc.c')
-rw-r--r--src/sam3/adc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sam3/adc.c b/src/sam3/adc.c
index 0baf9118..425d60a9 100644
--- a/src/sam3/adc.c
+++ b/src/sam3/adc.c
@@ -13,10 +13,17 @@
#include "sched.h" // sched_shutdown
static const uint8_t adc_pins[] = {
+#if CONFIG_MACH_SAM3X8E
GPIO('A', 2), GPIO('A', 3), GPIO('A', 4), GPIO('A', 6),
GPIO('A', 22), GPIO('A', 23), GPIO('A', 24), GPIO('A', 16),
GPIO('B', 12), GPIO('B', 13), GPIO('B', 17), GPIO('B', 18),
GPIO('B', 19), GPIO('B', 20)
+#elif CONFIG_MACH_SAM4S8C
+ GPIO('A', 17), GPIO('A', 18), GPIO('A', 19), GPIO('A', 20),
+ GPIO('B', 0), GPIO('B', 1), GPIO('B', 2), GPIO('B', 3),
+ GPIO('A', 21), GPIO('A', 22), GPIO('C', 13), GPIO('C', 15),
+ GPIO('C', 12), GPIO('C', 29), GPIO('C', 30)
+#endif
};
#define ADC_FREQ_MAX 20000000