summaryrefslogtreecommitdiff
path: root/common/als.c
diff options
context:
space:
mode:
authorScott Worley <scott.worley@microchip.corp-partner.google.com>2017-12-20 15:03:39 -0500
committerchrome-bot <chrome-bot@chromium.org>2017-12-28 14:50:29 -0800
commit304bb8b09c60a75ac8eae72ab017a5996b76afeb (patch)
treeb0b85a518305b921cabf983ceb28a2e102ba0df3 /common/als.c
parent5b6ec95320d231fb15a9ec69e2eefeb5eed1fd25 (diff)
downloadchrome-ec-304bb8b09c60a75ac8eae72ab017a5996b76afeb.tar.gz
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>
Diffstat (limited to 'common/als.c')
-rw-r--r--common/als.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/als.c b/common/als.c
index c671aacf12..fee478c280 100644
--- a/common/als.c
+++ b/common/als.c
@@ -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);
}
}