blob: be0b08ab0317ea92b575a2c628b2f2b18e1f2128 [file] [log] [blame]
Hung-Te Lince7a5a72013-06-20 18:57:04 +08001/*
2 * Chromium OS Matrix Keyboard Message Protocol definitions
3 *
4 * Copyright (c) 2012 The Chromium OS Authors.
Hung-Te Lince7a5a72013-06-20 18:57:04 +08005 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Hung-Te Lince7a5a72013-06-20 18:57:04 +080015 */
16
17#ifndef _CROS_MESSAGE_H
18#define _CROS_MESSAGE_H
19
20/*
21 * Command interface between EC and AP, for LPC, I2C and SPI interfaces.
22 *
23 * This is copied from the Chromium OS Open Source Embedded Controller code.
24 */
25enum {
26 /* The header byte, which follows the preamble */
27 MSG_HEADER = 0xec,
28
29 MSG_HEADER_BYTES = 3,
30 MSG_TRAILER_BYTES = 2,
31 MSG_PROTO_BYTES = MSG_HEADER_BYTES + MSG_TRAILER_BYTES,
32
33 /* Max length of messages */
34 MSG_BYTES = EC_HOST_PARAM_SIZE + MSG_PROTO_BYTES,
35};
36
Edward O'Callaghanb57fef92014-06-17 20:13:08 +100037#endif /* _CROS_MESSAGE_H */