Files
OpenCellular/common/sensor_common.c
Shawn Nematbakhsh eb2e38ec56 console: Add non-verbose print config option
Shorten certain long prints and reduce the precision of timestamp prints
when CONFIG_CONSOLE_VERBOSE is undef'd.

BUG=chromium:688743
BRANCH=gru
TEST=On kevin, cold reset the EC, boot to OS, and verify cros_ec.log
contains all data since sysjump and is < 2K bytes (~1500 bytes).

Change-Id: Ia9390867788d0ab3087f827b0296107b4e9d4bca
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/438932
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-02-11 13:06:38 -08:00

26 lines
753 B
C

/* Copyright 2017 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.
*/
/* Sensor common routines. */
#include "common.h"
#include "console.h"
#include "motion_sense.h"
/* Console output macros */
#define CPUTS(outstr) cputs(CC_MOTION_SENSE, outstr)
#define CPRINTS(format, args...) cprints(CC_MOTION_SENSE, format, ## args)
#define CPRINTF(format, args...) cprintf(CC_MOTION_SENSE, format, ## args)
void sensor_init_done(const struct motion_sensor_t *s, int range)
{
#ifdef CONFIG_CONSOLE_VERBOSE
CPRINTS("%s: MS Done Init type:0x%X range:%d",
s->name, s->type, range);
#else
CPRINTS("%c%d InitDone r:%d", s->name[0], s->type, range);
#endif
}