mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 10:00:51 +00:00
BUG=chrome-os-partner:24370 BRANCH=tot TEST=Run button unit test. Orig-Change-Id: I61b4a6624d62831ce0bfdf7a0f36a45349b37f96 Signed-off-by: Dave Parker <dparker@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/184544 Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit f6426cc21c20a4f876cff28b9ce7e3115f0b054a) Change-Id: I4face9bf0797a91ec8bef390093aab8e3d8f97ab Reviewed-on: https://chromium-review.googlesource.com/185243 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Randall Spangler <rspangler@chromium.org>
39 lines
1.1 KiB
C
39 lines
1.1 KiB
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.
|
|
*
|
|
* The functions implemented by keyboard component of EC core.
|
|
*/
|
|
|
|
#ifndef __CROS_EC_KEYBOARD_8042_H
|
|
#define __CROS_EC_KEYBOARD_8042_H
|
|
|
|
#include "common.h"
|
|
#include "button.h"
|
|
|
|
/**
|
|
* Called by power button handler and button interrupt handler.
|
|
*
|
|
* This function sends the corresponding make or break code to the host.
|
|
*/
|
|
void button_state_changed(enum keyboard_button_type button, int is_pressed);
|
|
|
|
/**
|
|
* Notify the keyboard module when a byte is written by the host.
|
|
*
|
|
* Note: This is called in interrupt context by the LPC interrupt handler.
|
|
*
|
|
* @param data Byte written by host
|
|
* @param is_cmd Is byte command (!=0) or data (0)
|
|
*/
|
|
void keyboard_host_write(int data, int is_cmd);
|
|
|
|
/**
|
|
* Called by keyboard scan code once any key state change (after de-bounce),
|
|
*
|
|
* This function will look up matrix table and convert scancode host.
|
|
*/
|
|
void keyboard_state_changed(int row, int col, int is_pressed);
|
|
|
|
#endif /* __CROS_EC_KEYBOARD_8042_H */
|