summaryrefslogtreecommitdiff
path: root/zephyr/shim/include/shimmed_tasks.h
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2020-11-30 23:15:20 -0700
committerCommit Bot <commit-bot@chromium.org>2020-12-05 05:16:48 +0000
commit9094a1b13aaec6863d263042bdb4b6d9ecc48a65 (patch)
tree532ef942b6bb804ee0415b93de5ae588afe45a56 /zephyr/shim/include/shimmed_tasks.h
parent8483283989e7d6080b1d757cf5309a97efd2950d (diff)
downloadchrome-ec-9094a1b13aaec6863d263042bdb4b6d9ecc48a65.tar.gz
zephyr: fix build for keyboard shim
See platform/ec/common/build.mk for reference. The use of keyboard_scan.c should only be allowed when HAS_TASK_KEYSCAN is defined. As such, we should always set HAS_TASK_KEYSCAN to 1 if CONFIG_PLATFORM_EC_KEYBOARD is defined. Further, CROS_EC_TASK_LIST was defined per project and it doesn't need to be, we can instead define it once for all boards depending on which tasks are set to 1 in shimmed_tasks.h Note that shimmed_tasks.h can still be used in tests. BRANCH=none BUG=none TEST=zmake testall Cq-Depend: chromium:2566421 Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Id0ed49dd49e3c4eb2ac23184cf943c91dcd261eb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567560
Diffstat (limited to 'zephyr/shim/include/shimmed_tasks.h')
-rw-r--r--zephyr/shim/include/shimmed_tasks.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/zephyr/shim/include/shimmed_tasks.h b/zephyr/shim/include/shimmed_tasks.h
new file mode 100644
index 0000000000..3a34e79715
--- /dev/null
+++ b/zephyr/shim/include/shimmed_tasks.h
@@ -0,0 +1,30 @@
+/* Copyright 2020 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.
+ */
+
+#ifndef __CROS_EC_SHIMMED_TASKS_H
+#define __CROS_EC_SHIMMED_TASKS_H
+
+#ifdef CONFIG_PLATFORM_EC_POWERSEQ
+#define HAS_TASK_CHIPSET 1
+#endif /* CONFIG_PLATFORM_EC_POWERSEQ */
+
+#ifdef CONFIG_PLATFORM_EC_HOSTCMD
+#define HAS_TASK_HOSTCMD 1
+#define CONFIG_HOSTCMD_EVENTS
+#endif /* CONFIG_PLATFORM_EC_HOSTCMD */
+
+#ifdef CONFIG_PLATFORM_EC_KEYBOARD
+#define HAS_TASK_KEYSCAN 1
+#endif /* CONFIG_PLATFORM_EC_KEYBOARD */
+
+#ifdef CONFIG_HAS_TASK_KEYPROTO
+#define HAS_TASK_KEYPROTO 1
+#endif /* CONFIG_HAS_TASK_KEYPROTO */
+
+#ifdef CONFIG_HAS_TASK_POWERBTN
+#define HAS_TASK_POWERBTN 1
+#endif /* CONFIG_HAS_TASK_POWERBTN */
+
+#endif /* __CROS_EC_SHIMMED_TASKS_H */