Hung-Te Lin | ce7a5a7 | 2013-06-20 18:57:04 +0800 | [diff] [blame] | 1 | /* |
Jon Murphy | c4e9045 | 2022-06-28 10:36:23 -0600 | [diff] [blame] | 2 | * ChromiumOS Matrix Keyboard Message Protocol definitions |
Patrick Georgi | afd4c87 | 2020-05-05 23:43:18 +0200 | [diff] [blame] | 3 | */ |
Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame] | 4 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Hung-Te Lin | ce7a5a7 | 2013-06-20 18:57:04 +0800 | [diff] [blame] | 5 | |
| 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 Murphy | c4e9045 | 2022-06-28 10:36:23 -0600 | [diff] [blame] | 12 | * This is copied from the ChromiumOS Open Source Embedded Controller code. |
Hung-Te Lin | ce7a5a7 | 2013-06-20 18:57:04 +0800 | [diff] [blame] | 13 | */ |
| 14 | enum { |
| 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'Callaghan | b57fef9 | 2014-06-17 20:13:08 +1000 | [diff] [blame] | 26 | #endif /* _CROS_MESSAGE_H */ |