blob: 977951b30d9bb7607258a3f569a3ffa42eef5a13 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Hung-ying Tyan88364382013-05-15 18:27:28 +08002/*
3 * Chromium OS Matrix Keyboard Message Protocol definitions
4 *
5 * Copyright (c) 2012 The Chromium OS Authors.
Hung-ying Tyan88364382013-05-15 18:27:28 +08006 */
7
8#ifndef _CROS_MESSAGE_H
9#define _CROS_MESSAGE_H
10
11/*
12 * Command interface between EC and AP, for LPC, I2C and SPI interfaces.
13 *
14 * This is copied from the Chromium OS Open Source Embedded Controller code.
15 */
16enum {
17 /* The header byte, which follows the preamble */
18 MSG_HEADER = 0xec,
19
20 MSG_HEADER_BYTES = 3,
21 MSG_TRAILER_BYTES = 2,
22 MSG_PROTO_BYTES = MSG_HEADER_BYTES + MSG_TRAILER_BYTES,
23
24 /* Max length of messages */
Simon Glass836bb6e2014-02-27 13:26:07 -070025 MSG_BYTES = EC_PROTO2_MAX_PARAM_SIZE + MSG_PROTO_BYTES,
Hung-ying Tyan88364382013-05-15 18:27:28 +080026};
27
28#endif