Hung-Te Lin | ce7a5a7 | 2013-06-20 18:57:04 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Chromium OS Matrix Keyboard Message Protocol definitions |
| 3 | * |
| 4 | * Copyright (c) 2012 The Chromium OS Authors. |
Hung-Te Lin | ce7a5a7 | 2013-06-20 18:57:04 +0800 | [diff] [blame] | 5 | * |
| 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 Lin | ce7a5a7 | 2013-06-20 18:57:04 +0800 | [diff] [blame] | 15 | */ |
| 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 | */ |
| 25 | enum { |
| 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'Callaghan | b57fef9 | 2014-06-17 20:13:08 +1000 | [diff] [blame] | 37 | #endif /* _CROS_MESSAGE_H */ |