hal_lcd.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /**************************************************************************************************
  2. Filename: hal_lcd.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 LCD 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_LCD_H
  34. #define HAL_LCD_H
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. /**************************************************************************************************
  40. * INCLUDES
  41. **************************************************************************************************/
  42. #include "hal_board.h"
  43. /**************************************************************************************************
  44. * CONSTANTS
  45. **************************************************************************************************/
  46. /* These are used to specify which line the text will be printed */
  47. #define HAL_LCD_LINE_1 0x01
  48. #define HAL_LCD_LINE_2 0x02
  49. /*
  50. This to support LCD with extended number of lines (more than 2).
  51. Don't use these if LCD doesn't support more than 2 lines
  52. */
  53. #define HAL_LCD_LINE_3 0x03
  54. #define HAL_LCD_LINE_4 0x04
  55. #define HAL_LCD_LINE_5 0x05
  56. #define HAL_LCD_LINE_6 0x06
  57. #define HAL_LCD_LINE_7 0x07
  58. #define HAL_LCD_LINE_8 0x08
  59. /* Max number of chars on a single LCD line */
  60. #define HAL_LCD_MAX_CHARS 16
  61. #define HAL_LCD_MAX_BUFF 25
  62. /**************************************************************************************************
  63. * MACROS
  64. **************************************************************************************************/
  65. /**************************************************************************************************
  66. * TYPEDEFS
  67. **************************************************************************************************/
  68. /**************************************************************************************************
  69. * GLOBAL VARIABLES
  70. **************************************************************************************************/
  71. /**************************************************************************************************
  72. * FUNCTIONS - API
  73. **************************************************************************************************/
  74. /*
  75. * Initialize LCD Service
  76. */
  77. extern void HalLcdInit(void);
  78. /*
  79. * Write a string to the LCD
  80. */
  81. extern void HalLcdWriteString ( char *str, uint8 option);
  82. /*
  83. * Write a value to the LCD
  84. */
  85. extern void HalLcdWriteValue ( uint32 value, const uint8 radix, uint8 option);
  86. /*
  87. * Write a value to the LCD
  88. */
  89. extern void HalLcdWriteScreen( char *line1, char *line2 );
  90. /*
  91. * Write a string followed by a value to the LCD
  92. */
  93. extern void HalLcdWriteStringValue( char *title, uint16 value, uint8 format, uint8 line );
  94. /*
  95. * Write a string followed by 2 values to the LCD
  96. */
  97. extern void HalLcdWriteStringValueValue( char *title, uint16 value1, uint8 format1, uint16 value2, uint8 format2, uint8 line );
  98. /*
  99. * Write a percentage bar to the LCD
  100. */
  101. extern void HalLcdDisplayPercentBar( char *title, uint8 value );
  102. /**************************************************************************************************
  103. **************************************************************************************************/
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107. #endif