cros_ec_message.h 651 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Chromium OS Matrix Keyboard Message Protocol definitions
  3. *
  4. * Copyright (c) 2012 The Chromium OS Authors.
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef _CROS_MESSAGE_H
  9. #define _CROS_MESSAGE_H
  10. /*
  11. * Command interface between EC and AP, for LPC, I2C and SPI interfaces.
  12. *
  13. * This is copied from the Chromium OS Open Source Embedded Controller code.
  14. */
  15. enum {
  16. /* The header byte, which follows the preamble */
  17. MSG_HEADER = 0xec,
  18. MSG_HEADER_BYTES = 3,
  19. MSG_TRAILER_BYTES = 2,
  20. MSG_PROTO_BYTES = MSG_HEADER_BYTES + MSG_TRAILER_BYTES,
  21. /* Max length of messages */
  22. MSG_BYTES = EC_PROTO2_MAX_PARAM_SIZE + MSG_PROTO_BYTES,
  23. };
  24. #endif