summaryrefslogtreecommitdiff
path: root/include/console.h
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2016-03-22 11:06:25 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-03-22 19:54:46 -0700
commit57244d77083849f28101cc7b509e9fc39a7930d8 (patch)
tree0e12bf73928b307011cfb4f4ca125e0cdc731abf /include/console.h
parent4826d592ce100cd7b5086c4b0949ae3034b5a394 (diff)
downloadchrome-ec-57244d77083849f28101cc7b509e9fc39a7930d8.tar.gz
Console: Fix channel enum values
The channel enum and string name array were out of sync (when CONFIG_EXTENSION_COMMAND is defined). This was caused by the two lists being specified separately. I argue that this is a good reason to merge the lists into a separate X-Macro include file. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Change-Id: I81d143f550a0fe6ef0c64e3c8357ed18aee4bfdc Reviewed-on: https://chromium-review.googlesource.com/334381 Commit-Ready: Anton Staaf <robotboy@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/console.h')
-rw-r--r--include/console.h47
1 files changed, 4 insertions, 43 deletions
diff --git a/include/console.h b/include/console.h
index 1f7a24f0f3..75bbd6a335 100644
--- a/include/console.h
+++ b/include/console.h
@@ -26,49 +26,10 @@ struct console_command {
/* Console channels */
enum console_channel {
- CC_COMMAND = 0, /* Console command (interactive I/O). Use this only
- * inside a console command routine. */
- CC_ACCEL,
-#ifdef CONFIG_EXTENSION_COMMAND
- CC_EXTENSION,
-#endif
- CC_CHARGER,
- CC_CHIPSET,
- CC_CLOCK,
- CC_DMA,
- CC_EVENTS,
- CC_GESTURE,
- CC_GPIO,
- CC_HOSTCMD,
- CC_I2C,
- CC_KEYBOARD,
- CC_KEYSCAN,
- CC_LIDANGLE,
-#ifdef HAS_TASK_LIGHTBAR
- CC_LIGHTBAR,
-#endif
- CC_LPC,
- CC_MOTION_LID,
- CC_MOTION_SENSE,
-#ifdef HAS_TASK_PDCMD
- CC_PD_HOST_CMD,
-#endif
- CC_PORT80,
- CC_PWM,
- CC_SPI,
-#ifdef CONFIG_SPS
- CC_SPS,
-#endif
- CC_SWITCH,
- CC_SYSTEM,
- CC_TASK,
- CC_THERMAL,
- CC_TPM,
- CC_USB,
- CC_USBCHARGE,
- CC_USBPD,
- CC_VBOOT,
- CC_HOOK,
+ #define CONSOLE_CHANNEL(enumeration, string) enumeration,
+ #include "include/console_channel.inc"
+ #undef CONSOLE_CHANNEL
+
/* Channel count; not itself a channel */
CC_CHANNEL_COUNT
};