hal_key.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /**************************************************************************************************
  2. Filename: hal_key.h
  3. Revised: $Date: 2007-07-06 10:42:24 -0700 (Fri, 06 Jul 2007) $
  4. Revision: $Revision: 13579 $
  5. Description: This file contains the interface to the KEY Service.
  6. Copyright 2005-2007 Texas Instruments Incorporated. All rights reserved.
  7. IMPORTANT: Your use of this Software is limited to those specific rights
  8. granted under the terms of a software license agreement between the user
  9. who downloaded the software, his/her employer (which must be your employer)
  10. and Texas Instruments Incorporated (the "License"). You may not use this
  11. Software unless you agree to abide by the terms of the License. The License
  12. limits your use, and you acknowledge, that the Software may not be modified,
  13. copied or distributed unless embedded on a Texas Instruments microcontroller
  14. or used solely and exclusively in conjunction with a Texas Instruments radio
  15. frequency transceiver, which is integrated into your product. Other than for
  16. the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  17. works of, modify, distribute, perform, display or sell this Software and/or
  18. its documentation for any purpose.
  19. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  20. PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  21. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  22. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  23. TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  24. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  25. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  26. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  27. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  28. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  29. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  30. Should you have any questions regarding your right to use this Software,
  31. contact Texas Instruments Incorporated at www.TI.com.
  32. **************************************************************************************************/
  33. #ifndef HAL_KEY_H
  34. #define HAL_KEY_H
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. /**************************************************************************************************
  40. * INCLUDES
  41. **************************************************************************************************/
  42. //#include "hal_board.h"
  43. //
  44. ///**************************************************************************************************
  45. // * MACROS
  46. // **************************************************************************************************/
  47. //
  48. ///**************************************************************************************************
  49. // * CONSTANTS
  50. // **************************************************************************************************/
  51. //
  52. ///* Interrupt option - Enable or disable */
  53. //#define HAL_KEY_INTERRUPT_DISABLE 0x00
  54. //#define HAL_KEY_INTERRUPT_ENABLE 0x01
  55. //
  56. ///* Key state - shift or nornal */
  57. //#define HAL_KEY_STATE_NORMAL 0x00
  58. //#define HAL_KEY_STATE_SHIFT 0x01
  59. //
  60. ///* Switches (keys) */
  61. //#define HAL_KEY_SW_1 0x01 // Joystick up
  62. //#define HAL_KEY_SW_2 0x02 // Joystick right
  63. //#define HAL_KEY_SW_5 0x04 // Joystick center
  64. //#define HAL_KEY_SW_4 0x08 // Joystick left
  65. //#define HAL_KEY_SW_3 0x10 // Joystick down
  66. //#define HAL_KEY_SW_6 0x20 // Button S1 if available
  67. //#define HAL_KEY_SW_7 0x40 // Button S2 if available
  68. //
  69. ///* Joystick */
  70. //#define HAL_KEY_UP 0x01 // Joystick up
  71. //#define HAL_KEY_RIGHT 0x02 // Joystick right
  72. //#define HAL_KEY_CENTER 0x04 // Joystick center
  73. //#define HAL_KEY_LEFT 0x08 // Joystick left
  74. //#define HAL_KEY_DOWN 0x10 // Joystick down
  75. //
  76. ///**************************************************************************************************
  77. // * TYPEDEFS
  78. // **************************************************************************************************/
  79. //typedef void (*halKeyCBack_t) (uint8 keys, uint8 state);
  80. //
  81. ///**************************************************************************************************
  82. // * GLOBAL VARIABLES
  83. // **************************************************************************************************/
  84. //extern bool Hal_KeyIntEnable;
  85. //
  86. ///**************************************************************************************************
  87. // * FUNCTIONS - API
  88. // **************************************************************************************************/
  89. //
  90. ///*
  91. // * Initialize the Key Service
  92. // */
  93. //extern void HalKeyInit( void );
  94. //
  95. ///*
  96. // * Configure the Key Service
  97. // */
  98. //extern void HalKeyConfig( bool interruptEnable, const halKeyCBack_t cback);
  99. //
  100. ///*
  101. // * Read the Key status
  102. // */
  103. //extern uint8 HalKeyRead( void);
  104. //
  105. ///*
  106. // * Enter sleep mode, store important values
  107. // */
  108. //extern void HalKeyEnterSleep ( void );
  109. //
  110. ///*
  111. // * Exit sleep mode, retore values
  112. // */
  113. //extern uint8 HalKeyExitSleep ( void );
  114. //
  115. ///*
  116. // * This is for internal used by hal_driver
  117. // */
  118. //extern void HalKeyPoll ( void );
  119. //
  120. ///*
  121. // * This is for internal used by hal_sleep
  122. // */
  123. //extern bool HalKeyPressed( void );
  124. /**************************************************************************************************
  125. **************************************************************************************************/
  126. #ifdef __cplusplus
  127. }
  128. #endif
  129. #endif