Files
OpenCellular/include/keyboard_mkbp.h
Randall Spangler d16a246ea9 cleanup: mkbp keyboard module
Rather than compile it by default for host-based tests, only compile
it for the few tests that actually use it.  Since those (and all
boards) now only use if if they also have a keyscan task, we can get
rid of the #ifdefs in keyboard_mkbp.c as well.

And remove a TODO we'll never do...

BUG=chrome-os-partner:18343
BRANCH=none
TEST=build all boards; pass unit tests.  These pass:
     util/make_all.sh
     make BOARD=pit tests

Change-Id: I44d1806cfb375027a7ed0b33a5e9bdbbed8ccddc
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174513
2013-10-30 23:10:13 +00:00

30 lines
680 B
C

/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* MKBP keyboard protocol
*/
#ifndef __CROS_EC_KEYBOARD_MKBP_H
#define __CROS_EC_KEYBOARD_MKBP_H
#include "common.h"
/**
* Add keyboard state into FIFO
*
* @return EC_SUCCESS if entry added, EC_ERROR_OVERFLOW if FIFO is full
*/
int keyboard_fifo_add(const uint8_t *buffp);
/**
* Send KEY_BATTERY keystroke.
*/
#ifdef CONFIG_KEYBOARD_PROTOCOL_MKBP
void keyboard_send_battery_key(void);
#else
static inline void keyboard_send_battery_key(void) { }
#endif
#endif /* __CROS_EC_KEYBOARD_MKBP_H */