mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-07 16:11:43 +00:00
In preparation for being able to copy ec_commands.h to u-boot, which is itself in preparation for u-boot picking it up from /usr/src/ec/ BUG=none TEST=make link, snow, bds Change-Id: If256434b6722ff0787ce21a8ed4c7035c28024a8 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/26451 Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
35 lines
1015 B
C
35 lines
1015 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.
|
|
*/
|
|
|
|
#ifndef COMM_HOST_H
|
|
#define COMM_HOST_H
|
|
|
|
#include "common.h"
|
|
#include "ec_commands.h"
|
|
|
|
/* Perform initializations needed for subsequent requests
|
|
*
|
|
* returns 0 in case of success or error code. */
|
|
int comm_init(void);
|
|
|
|
/*
|
|
* Send a command to the EC. Returns the length of output data returned (0 if
|
|
* none), or a negative number if error; errors are -EC_RES_* constants from
|
|
* ec_commands.h.
|
|
*/
|
|
int ec_command(int command, const void *indata, int insize,
|
|
void *outdata, int outsize);
|
|
|
|
/*
|
|
* Return the content of the EC information area mapped as "memory".
|
|
* The offsets are defined by the EC_MEMMAP_ constants.
|
|
*/
|
|
uint8_t read_mapped_mem8(uint8_t offset);
|
|
uint16_t read_mapped_mem16(uint8_t offset);
|
|
uint32_t read_mapped_mem32(uint8_t offset);
|
|
int read_mapped_string(uint8_t offset, char *buf);
|
|
|
|
#endif /* COMM_HOST_H */
|