Files
OpenCellular/include/ec_ec_comm_slave.h
Nicolas Boichat 6f9b5d62a0 ec_ec_comm_slave: EC-EC communication slave task and functions
This adds functions required for the slave in EC-EC communication,
including the task that processes requests from the master.

This also adds required CONFIG_EC_EC_COMM_SLAVE/MASTER/BATTERY
config options.

BRANCH=none
BUG=b:65697962
TEST=Build wand and lux boards, flash it, EC-EC communication works.

Change-Id: I772d9023a830f4fbc37316ca31e4da8240de7324
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/828180
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2017-12-20 05:49:33 -08:00

29 lines
908 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.
*
* EC-EC communication, functions and definition for slave.
*/
#ifndef EC_EC_COMM_SLAVE_H_
#define EC_EC_COMM_SLAVE_H_
#include <stdint.h>
#include "consumer.h"
#include "queue.h"
#if defined(CONFIG_EC_EC_COMM_SLAVE) && defined(CONFIG_EC_EC_COMM_BATTERY)
#define CONFIG_EC_EC_COMM_BATTERY_SLAVE
#endif
/* TODO(b:65697620): Move these to battery.h, depending on a config option. */
extern struct ec_response_battery_static_info base_battery_static;
extern struct ec_response_battery_dynamic_info base_battery_dynamic;
extern struct queue const ec_ec_comm_slave_input;
extern struct queue const ec_ec_comm_slave_output;
void ec_ec_comm_slave_written(struct consumer const *consumer, size_t count);
#endif /* EC_EC_COMM_SLAVE_H_ */