mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-06 23:51:28 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user