diff options
Diffstat (limited to 'cros_ec/lib/ec_keyboard.c')
-rw-r--r-- | cros_ec/lib/ec_keyboard.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cros_ec/lib/ec_keyboard.c b/cros_ec/lib/ec_keyboard.c new file mode 100644 index 0000000000..f126f9eed8 --- /dev/null +++ b/cros_ec/lib/ec_keyboard.c @@ -0,0 +1,24 @@ +/* Copyright (c) 2011 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. + * + * Chrome OS EC keyboard code. + */ + +#include "cros_ec/include/ec_common.h" +#include "chip_interface/keyboard.h" + +static void KeyboardStateChanged(int col, int row, int is_pressed) { + PRINTF("File %s:%s(): col=%d row=%d is_pressed=%d\n", + __FILE__, __FUNCTION__, col, row, is_pressed); +} + + +EcError EcKeyboardInit() { + EcError ret; + + ret = EcKeyboardRegisterCallback(KeyboardStateChanged); + if (ret != EC_SUCCESS) return ret; + + return EC_SUCCESS; +} |