Hung-ying Tyan | c48ca88f | 2013-05-15 18:27:28 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Chromium OS Matrix Keyboard Message Protocol definitions |
| 3 | * |
| 4 | * Copyright (c) 2012 The Chromium OS Authors. |
Hung-ying Tyan | c48ca88f | 2013-05-15 18:27:28 +0800 | [diff] [blame] | 5 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Hung-ying Tyan | c48ca88f | 2013-05-15 18:27:28 +0800 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef _CROS_MESSAGE_H |
| 10 | #define _CROS_MESSAGE_H |
| 11 | |
| 12 | /* |
| 13 | * Command interface between EC and AP, for LPC, I2C and SPI interfaces. |
| 14 | * |
| 15 | * This is copied from the Chromium OS Open Source Embedded Controller code. |
| 16 | */ |
| 17 | enum { |
| 18 | /* The header byte, which follows the preamble */ |
| 19 | MSG_HEADER = 0xec, |
| 20 | |
| 21 | MSG_HEADER_BYTES = 3, |
| 22 | MSG_TRAILER_BYTES = 2, |
| 23 | MSG_PROTO_BYTES = MSG_HEADER_BYTES + MSG_TRAILER_BYTES, |
| 24 | |
| 25 | /* Max length of messages */ |
| 26 | MSG_BYTES = EC_HOST_PARAM_SIZE + MSG_PROTO_BYTES, |
| 27 | }; |
| 28 | |
| 29 | #endif |