mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
This is part one of a series to merge the keyboard scan interface to be common across all platforms. This change just moves and renames files and APIs and removes some read code, and sets up protocol-specific CONFIG options. It makes the next CL which actually merges keyboard scanning easier to parse. BUG=chrome-os-partner:18360 BRANCH=none TEST=compile all boards; test keyboard on spring and link Change-Id: I815a40aae4e5d5f333b8501aff9656080533d913 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/46549 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
48 lines
1.2 KiB
C
48 lines
1.2 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.
|
|
*/
|
|
|
|
/* Keyboard scanner module for Chrome EC */
|
|
|
|
#ifndef __CROS_EC_KEYBOARD_SCAN_H
|
|
#define __CROS_EC_KEYBOARD_SCAN_H
|
|
|
|
#include "common.h"
|
|
|
|
/**
|
|
* Initializes the module.
|
|
*/
|
|
void keyboard_scan_init(void);
|
|
|
|
/* Key held down at keyboard-controlled reset boot time. */
|
|
enum boot_key {
|
|
BOOT_KEY_NONE, /* No keys other than keyboard-controlled reset keys */
|
|
BOOT_KEY_ESC,
|
|
BOOT_KEY_DOWN_ARROW,
|
|
BOOT_KEY_OTHER = -1, /* None of the above */
|
|
};
|
|
|
|
/**
|
|
* Return the key held down at boot time in addition to the keyboard-controlled
|
|
* reset keys. Returns BOOT_KEY_OTHER if none of the keys specifically checked
|
|
* was pressed, or reset was not caused by a keyboard-controlled reset.
|
|
*/
|
|
enum boot_key keyboard_scan_get_boot_key(void);
|
|
|
|
/**
|
|
* Enables/disables keyboard matrix scan.
|
|
*/
|
|
void keyboard_scan_enable(int enable);
|
|
|
|
#ifdef CONFIG_KEYBOARD_SUPPRESS_NOISE
|
|
/**
|
|
* Indicate to audio codec that a key has been pressed.
|
|
*
|
|
* Boards may supply this function to suppress audio noise.
|
|
*/
|
|
void keyboard_suppress_noise(void);
|
|
#endif
|
|
|
|
#endif /* __CROS_EC_KEYBOARD_SCAN_H */
|