1*88364387SHung-ying Tyan /* 2*88364387SHung-ying Tyan * Chromium OS Matrix Keyboard Message Protocol definitions 3*88364387SHung-ying Tyan * 4*88364387SHung-ying Tyan * Copyright (c) 2012 The Chromium OS Authors. 5*88364387SHung-ying Tyan * See file CREDITS for list of people who contributed to this 6*88364387SHung-ying Tyan * project. 7*88364387SHung-ying Tyan * 8*88364387SHung-ying Tyan * This program is free software; you can redistribute it and/or 9*88364387SHung-ying Tyan * modify it under the terms of the GNU General Public License as 10*88364387SHung-ying Tyan * published by the Free Software Foundation; either version 2 of 11*88364387SHung-ying Tyan * the License, or (at your option) any later version. 12*88364387SHung-ying Tyan * 13*88364387SHung-ying Tyan * This program is distributed in the hope that it will be useful, 14*88364387SHung-ying Tyan * but WITHOUT ANY WARRANTY; without even the implied warranty of 15*88364387SHung-ying Tyan * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*88364387SHung-ying Tyan * GNU General Public License for more details. 17*88364387SHung-ying Tyan * 18*88364387SHung-ying Tyan * You should have received a copy of the GNU General Public License 19*88364387SHung-ying Tyan * along with this program; if not, write to the Free Software 20*88364387SHung-ying Tyan * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21*88364387SHung-ying Tyan * MA 02111-1307 USA 22*88364387SHung-ying Tyan */ 23*88364387SHung-ying Tyan 24*88364387SHung-ying Tyan #ifndef _CROS_MESSAGE_H 25*88364387SHung-ying Tyan #define _CROS_MESSAGE_H 26*88364387SHung-ying Tyan 27*88364387SHung-ying Tyan /* 28*88364387SHung-ying Tyan * Command interface between EC and AP, for LPC, I2C and SPI interfaces. 29*88364387SHung-ying Tyan * 30*88364387SHung-ying Tyan * This is copied from the Chromium OS Open Source Embedded Controller code. 31*88364387SHung-ying Tyan */ 32*88364387SHung-ying Tyan enum { 33*88364387SHung-ying Tyan /* The header byte, which follows the preamble */ 34*88364387SHung-ying Tyan MSG_HEADER = 0xec, 35*88364387SHung-ying Tyan 36*88364387SHung-ying Tyan MSG_HEADER_BYTES = 3, 37*88364387SHung-ying Tyan MSG_TRAILER_BYTES = 2, 38*88364387SHung-ying Tyan MSG_PROTO_BYTES = MSG_HEADER_BYTES + MSG_TRAILER_BYTES, 39*88364387SHung-ying Tyan 40*88364387SHung-ying Tyan /* Max length of messages */ 41*88364387SHung-ying Tyan MSG_BYTES = EC_HOST_PARAM_SIZE + MSG_PROTO_BYTES, 42*88364387SHung-ying Tyan }; 43*88364387SHung-ying Tyan 44*88364387SHung-ying Tyan #endif 45