/* 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. * * Raw access to keyboard GPIOs. * * The keyboard matrix is read by driving output signals on the column lines * and reading the row lines. */ #ifndef __CROS_EC_KEYBOARD_RAW_H #define __CROS_EC_KEYBOARD_RAW_H #include "common.h" #include "gpio.h" /* Column values for keyboard_raw_drive_column() */ enum keyboard_column_index { KEYBOARD_COLUMN_ALL = -2, /* Drive all columns */ KEYBOARD_COLUMN_NONE = -1, /* Drive no columns (tri-state all) */ /* 0 ~ KEYBOARD_COLS-1 for the corresponding column */ }; /** * Initialize the raw keyboard interface. * * Must be called before any other functions in this interface. */ void keyboard_raw_init(void); /** * Finish intitialization after task scheduling has started. * * Call from the keyboard scan task. */ void keyboard_raw_task_start(void); /** * Drive the specified column low. * * Other columns are tristated. See enum keyboard_column_index for special * values for