From aae621d6c52467bb814b12d73a1851463d9b4a58 Mon Sep 17 00:00:00 2001 From: Chris Chen Date: Wed, 6 Jul 2016 14:07:00 -0700 Subject: 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 Tested-by: Chris Chen Reviewed-by: Daisuke Nojiri --- cts/gpio/dut.c | 15 +++++++++++++++ cts/gpio/th.c | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 cts/gpio/dut.c create mode 100644 cts/gpio/th.c (limited to 'cts/gpio') 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); + } +} -- cgit v1.2.1