summaryrefslogtreecommitdiff
path: root/cts/gpio
diff options
context:
space:
mode:
authorChris Chen <twothreecc@google.com>2016-07-06 14:07:00 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-09 01:41:01 -0700
commitaae621d6c52467bb814b12d73a1851463d9b4a58 (patch)
treea5d6e2ed469202d9ab3dc7680579f40916f2b5bd /cts/gpio
parent24abdc9a4e2dc056815feea2150b1d50f4d7c836 (diff)
downloadchrome-ec-aae621d6c52467bb814b12d73a1851463d9b4a58.tar.gz
cts: First patch flashes blank tests
The first time you use this with a particular th, connect only th and run ./cts.py --th Then connect both boards and you can run ./cts.py to build/flash both boards. BRANCH=None BUG=None TEST=manual - Enter chroot - Navigate to ec/cts - Connect only th - 'sudo ./cts.py --th' - './cts.py -b' - Exit chroot - Connect both boards - './cts.py -f' Each board should flash successfully Change-Id: Ib14fccabcd9fdad04f9b92817da597bc0dcb3d89 Reviewed-on: https://chromium-review.googlesource.com/358100 Commit-Ready: Chris Chen <twothreecc@google.com> Tested-by: Chris Chen <twothreecc@google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'cts/gpio')
-rw-r--r--cts/gpio/dut.c15
-rw-r--r--cts/gpio/th.c15
2 files changed, 30 insertions, 0 deletions
diff --git a/cts/gpio/dut.c b/cts/gpio/dut.c
new file mode 100644
index 0000000000..bdcd4938f7
--- /dev/null
+++ b/cts/gpio/dut.c
@@ -0,0 +1,15 @@
+/* Copyright 2016 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "timer.h"
+#include "watchdog.h"
+
+void cts_task(void)
+{
+ while (1) {
+ watchdog_reload();
+ sleep(1);
+ }
+}
diff --git a/cts/gpio/th.c b/cts/gpio/th.c
new file mode 100644
index 0000000000..bdcd4938f7
--- /dev/null
+++ b/cts/gpio/th.c
@@ -0,0 +1,15 @@
+/* Copyright 2016 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "timer.h"
+#include "watchdog.h"
+
+void cts_task(void)
+{
+ while (1) {
+ watchdog_reload();
+ sleep(1);
+ }
+}