ec_als: ALS now uses CPRINT macros

Modify ALS module to use CPRINT macros with
channel support.

BRANCH=none
BUG=
TEST=Build board(s) with ALS support such glados.
Test ALS CPRINT messages go out over EC UART and
can be masked off by channel mask UART command.

Change-Id: I65ffc889d63a778f3fb8995f508773842ba875ef
Signed-off-by: Scott Worley <scott.worley@microchip.corp-partner.google.com>
This commit is contained in:
Scott Worley
2017-12-20 15:03:39 -05:00
committed by chrome-bot
parent 5b6ec95320
commit 304bb8b09c
2 changed files with 9 additions and 1 deletions

View File

@@ -18,6 +18,11 @@
#include "timer.h"
#include "util.h"
#define CPUTS(outstr) cputs(CC_ALS, outstr)
#define CPRINTS(format, args...) cprints(CC_ALS, format, ## args)
#define CPRINTF(format, args...) cprintf(CC_ALS, format, ## args)
#define ALS_POLL_PERIOD SECOND
static int task_timeout = -1;
@@ -58,7 +63,7 @@ static void als_task_enable(void)
err = als[i].init();
if (err) {
fail_count++;
ccprintf("%s ALS sensor failed to initialize, err=%d\n",
CPRINTF("%s ALS sensor failed to initialize, err=%d\n",
als[i].name, err);
}
}

View File

@@ -78,6 +78,9 @@ CONSOLE_CHANNEL(CC_TOUCHPAD, "touchpad")
#ifdef CONFIG_DPTF
CONSOLE_CHANNEL(CC_DPTF, "dptf")
#endif
#ifdef CONFIG_ALS
CONSOLE_CHANNEL(CC_ALS, "als")
#endif
CONSOLE_CHANNEL(CC_THERMAL, "thermal")
CONSOLE_CHANNEL(CC_TPM, "tpm")
CONSOLE_CHANNEL(CC_USB, "usb")