Files
OpenCellular/include/peci.h
Randall Spangler 6b8e8be703 Fix discovery and bds builds, which don't have temp sensor or peci
Remove id field from temp_sensor_t struct, since it's only used by the
console command (which already knows the id, because it's looping over
it).

Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=none
TEST='temps'

Change-Id: I0970850073d644509cd5501d7ac4421c7373143b
2012-02-13 10:41:34 -08:00

30 lines
825 B
C

/* Copyright (c) 2012 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.
*/
/* PECI module for Chrome EC */
#ifndef __CROS_EC_PECI_H
#define __CROS_EC_PECI_H
#include "common.h"
struct temp_sensor_t;
/* Initializes the module. */
int peci_init(void);
/* Returns the current CPU temperature in degrees K, or -1 if error.
*
* Note that the PECI interface is currently a little flaky; if you get an
* error, retry a bit later. */
int peci_get_cpu_temp(void);
/* Reads the CPU temperature sensor via PECI. This interface is for the
* temperature sensor module. Returns the temperature in degrees K, or -1 if
* error. */
int peci_temp_sensor_read(const struct temp_sensor_t *sensor);
#endif /* __CROS_EC_PECI_H */