mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 00:51:29 +00:00
Add host command to read temperature sensor value
Add a LPC host command to read temperature sensor value with given sensor id. Add ectool command to read temperature sensor value through LPC. BUG=chrome-os-partner:7329 TEST=Manual check the reading received is the same as value printed by console command. Change-Id: Id3386774435be6c3ae010a143f4fa894568efdb8
This commit is contained in:
@@ -205,4 +205,16 @@ struct lpc_response_flash_checksum {
|
||||
#endif /* SUPPORT_CHECKSUM */
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Temperature sensor commands */
|
||||
|
||||
/* Get temperature readings */
|
||||
#define EC_LPC_COMMAND_TEMP_SENSOR_GET_READINGS 0x30
|
||||
struct lpc_params_temp_sensor_get_readings {
|
||||
uint8_t temp_sensor_id;
|
||||
} __attribute__ ((packed));
|
||||
struct lpc_response_temp_sensor_get_readings {
|
||||
uint32_t value;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#endif /* __CROS_EC_LPC_COMMANDS_H */
|
||||
|
||||
19
include/temp_sensor_commands.h
Normal file
19
include/temp_sensor_commands.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Copyright (c) 2011 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.
|
||||
*/
|
||||
|
||||
/* Temperature sensor commands for Chrome EC */
|
||||
|
||||
#ifndef __CROS_EC_TEMP_SENSOR_COMMANDS_H
|
||||
#define __CROS_EC_TEMP_SENSOR_COMMANDS_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/* Initializes the module. */
|
||||
int temp_sensor_commands_init(void);
|
||||
|
||||
/* Host command handlers. */
|
||||
enum lpc_status temp_sensor_command_get_readings(uint8_t *data);
|
||||
|
||||
#endif /* __CROS_EC_TEMP_SENSOR_COMMANDS_H */
|
||||
Reference in New Issue
Block a user