OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2006-2009 NVIDIA Corporation. |
| 3 * All rights reserved. |
| 4 * |
| 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: |
| 7 * |
| 8 * Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. |
| 10 * |
| 11 * Redistributions in binary form must reproduce the above copyright notice, |
| 12 * this list of conditions and the following disclaimer in the documentation |
| 13 * and/or other materials provided with the distribution. |
| 14 * |
| 15 * Neither the name of the NVIDIA Corporation nor the names of its contributors |
| 16 * may be used to endorse or promote products derived from this software |
| 17 * without specific prior written permission. |
| 18 * |
| 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
| 23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 29 * POSSIBILITY OF SUCH DAMAGE. |
| 30 * |
| 31 */ |
| 32 |
| 33 /** |
| 34 * @file |
| 35 * <b>NVIDIA Tegra ODM Kit: |
| 36 * Keyboard Controller Interface</b> |
| 37 * |
| 38 * @b Description: Defines the ODM query interface for NVIDIA keyboard |
| 39 * controller (KBC) adaptation. |
| 40 * |
| 41 */ |
| 42 |
| 43 #ifndef INCLUDED_NVODM_QUERY_KBC_H |
| 44 #define INCLUDED_NVODM_QUERY_KBC_H |
| 45 |
| 46 #include "nvcommon.h" |
| 47 |
| 48 /** |
| 49 * @defgroup nvodm_query_kbc Keyboard Controller Query Interface |
| 50 * This is the keyboard controller (KBC) ODM Query interface. |
| 51 * See also the \link nvodm_kbc KBC ODM Adaptation Interface\endlink. |
| 52 * @ingroup nvodm_query |
| 53 * @{ |
| 54 */ |
| 55 |
| 56 /** |
| 57 * Defines the parameters associated with this device. |
| 58 */ |
| 59 typedef enum |
| 60 { |
| 61 NvOdmKbcParameter_NumOfRows=1, |
| 62 NvOdmKbcParameter_NumOfColumns, |
| 63 NvOdmKbcParameter_DebounceTime, |
| 64 NvOdmKbcParameter_RepeatCycleTime, |
| 65 NvOdmKbcParameter_Force32 = 0x7FFFFFFF |
| 66 } NvOdmKbcParameter; |
| 67 |
| 68 /** |
| 69 * Queries the peripheral device for its current settings. |
| 70 * |
| 71 * @see NvOdmKbcParameter |
| 72 * |
| 73 * @param param Specifies which parameter value to get. |
| 74 * @param sizeOfValue The length of the parameter data (in bytes). |
| 75 * @param value A pointer to the location where the requested parameter shall |
| 76 * be stored. |
| 77 * |
| 78 */ |
| 79 void |
| 80 NvOdmKbcGetParameter( |
| 81 NvOdmKbcParameter param, |
| 82 NvU32 sizeOfValue, |
| 83 void *value); |
| 84 |
| 85 /** |
| 86 * Gets the key code depending upon the row and column values. |
| 87 * |
| 88 * @param Row The value of the row. |
| 89 * @param Column The value of the column. |
| 90 * @param RowCount The number of the rows present in the keypad matrix. |
| 91 * @param ColumnCount The number of the columns present in the keypad matrix. |
| 92 * |
| 93 * @return The appropriate key code. |
| 94 */ |
| 95 NvU32 |
| 96 NvOdmKbcGetKeyCode( |
| 97 NvU32 Row, |
| 98 NvU32 Column, |
| 99 NvU32 RowCount, |
| 100 NvU32 ColumnCount); |
| 101 |
| 102 /** |
| 103 * Queries if wake-up only on selected keys is enabled for WPC-like |
| 104 * configurations. If it is enabled, returns the pointers to the static array |
| 105 * containing the row and columns numbers. If this is enabled and \a NumOfKeys |
| 106 * selected is zero, all the keys are disabled for wake-up when system is |
| 107 * suspended. |
| 108 * |
| 109 * @note The selected keys must not be a configuration of type 1x1, 1x2, etc. |
| 110 * In other words, a minimum of two rows must be enabled due to hardware |
| 111 * limitations. |
| 112 * |
| 113 * @param pRowNumber A pointer to the static array containing the row |
| 114 * numbers of the keys. |
| 115 * @param pColNumber A pointer to the static array containing the column |
| 116 * numbers of the keys. |
| 117 * @param NumOfKeys A pointer to the number of keys that must be enabled. |
| 118 * This indicates the number of elements in the arrays pointer
by |
| 119 * \a pRowNumber and \a pColNumber. |
| 120 * @return NV_TRUE if successful, or NV_FALSE otherwise. |
| 121 */ |
| 122 NvBool |
| 123 NvOdmKbcIsSelectKeysWkUpEnabled( |
| 124 NvU32 **pRowNumber, |
| 125 NvU32 **pColNumber, |
| 126 NvU32 *NumOfKeys); |
| 127 |
| 128 /** @} */ |
| 129 #endif // INCLUDED_NVODM_QUERY_KBC_H |
| 130 |
OLD | NEW |