blob: 4423bd87e2883048c210bed7be68cb7d9fad9b1e [file] [log] [blame]
Hung-Te Lince7a5a72013-06-20 18:57:04 +08001/*
Jon Murphyc4e90452022-06-28 10:36:23 -06002 * ChromiumOS Matrix Keyboard Message Protocol definitions
Patrick Georgiafd4c872020-05-05 23:43:18 +02003 */
Patrick Georgiac959032020-05-05 22:49:26 +02004/* SPDX-License-Identifier: GPL-2.0-or-later */
Hung-Te Lince7a5a72013-06-20 18:57:04 +08005
6#ifndef _CROS_MESSAGE_H
7#define _CROS_MESSAGE_H
8
9/*
10 * Command interface between EC and AP, for LPC, I2C and SPI interfaces.
11 *
Jon Murphyc4e90452022-06-28 10:36:23 -060012 * This is copied from the ChromiumOS Open Source Embedded Controller code.
Hung-Te Lince7a5a72013-06-20 18:57:04 +080013 */
14enum {
15 /* The header byte, which follows the preamble */
16 MSG_HEADER = 0xec,
17
18 MSG_HEADER_BYTES = 3,
19 MSG_TRAILER_BYTES = 2,
20 MSG_PROTO_BYTES = MSG_HEADER_BYTES + MSG_TRAILER_BYTES,
21
22 /* Max length of messages */
23 MSG_BYTES = EC_HOST_PARAM_SIZE + MSG_PROTO_BYTES,
24};
25
Edward O'Callaghanb57fef92014-06-17 20:13:08 +100026#endif /* _CROS_MESSAGE_H */