aboutsummaryrefslogtreecommitdiffstats
path: root/src/atsamd/gpio.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-01-14 18:21:50 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-01-28 20:02:16 -0500
commit8cd83b4c2dcaeac1fe68f18eadd7f25ff42476c2 (patch)
tree780a7aa17ffd41969e5e6d63751b0efe7a9d108c /src/atsamd/gpio.c
parentf6ce875818a1341ff7a0279699505453d8ca0db4 (diff)
downloadkutter-8cd83b4c2dcaeac1fe68f18eadd7f25ff42476c2.tar.gz
kutter-8cd83b4c2dcaeac1fe68f18eadd7f25ff42476c2.tar.xz
kutter-8cd83b4c2dcaeac1fe68f18eadd7f25ff42476c2.zip
atsamd: Initial support for SAMD51
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/atsamd/gpio.c')
-rw-r--r--src/atsamd/gpio.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/atsamd/gpio.c b/src/atsamd/gpio.c
index 045dc003..2e26fa66 100644
--- a/src/atsamd/gpio.c
+++ b/src/atsamd/gpio.c
@@ -1,6 +1,6 @@
-// samd21 gpio functions
+// samd gpio functions
//
-// Copyright (C) 2018 Kevin O'Connor <kevin@koconnor.net>
+// Copyright (C) 2018-2019 Kevin O'Connor <kevin@koconnor.net>
//
// This file may be distributed under the terms of the GNU GPLv3 license.
@@ -9,7 +9,6 @@
#include "command.h" // shutdown
#include "gpio.h" // gpio_out_setup
#include "internal.h" // gpio_peripheral
-#include "samd21.h" // PORT
#include "sched.h" // sched_shutdown
@@ -43,7 +42,11 @@ gpio_peripheral(uint32_t gpio, char ptype, int32_t pull_up)
* General Purpose Input Output (GPIO) pins
****************************************************************/
+#if CONFIG_MACH_SAMD21
#define NUM_PORT 2
+#elif CONFIG_MACH_SAMD51
+#define NUM_PORT 4
+#endif
struct gpio_out
gpio_out_setup(uint8_t pin, uint8_t val)