slcd_rhe6616tp01.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /**************************************************************************//**
  2. * @file LCDLIB.h
  3. * @version V3.00
  4. * @brief RHE6616TP01(8-COM, 40-SEG, 1/4 Bias) LCD library header file
  5. *
  6. * SPDX-License-Identifier: Apache-2.0
  7. * @copyright (C) 2019-2020 Nuvoton Technology Corp. All rights reserved.
  8. *****************************************************************************/
  9. #ifndef __M2354_LCDLIB_H
  10. #define __M2354_LCDLIB_H
  11. #ifdef __cplusplus
  12. extern "C"
  13. {
  14. #endif
  15. /** @addtogroup LIBRARY Library
  16. @{
  17. */
  18. /** @addtogroup M2354_LCDLIB_Driver LCD Library
  19. @{
  20. */
  21. /** @addtogroup M2354_LCDLIB_EXPORTED_CONSTANTS LCDLIB Exported Constants
  22. @{
  23. */
  24. /*---------------------------------------------------------------------------------------------------------*/
  25. /* Digit Zone Constant Definitions */
  26. /*---------------------------------------------------------------------------------------------------------*/
  27. #define ZONE_MAIN_DIGIT 0 /*!< Main digit display zone index */
  28. #define ZONE_MAIN_DIG_CNT 7 /*!< Number of digits/texts, for number and alphabet display */
  29. #define ZONE_MAIN_SEG_NUM 14 /*!< Number of segments on each digit number */
  30. #define ZONE_PPM_DIGIT 1 /*!< PPM or percentage digit display zone index */
  31. #define ZONE_PPM_DIG_CNT 3 /*!< Number of digits, for ppm display */
  32. #define ZONE_PPM_SEG_NUM 7 /*!< Number of segments on each digit number */
  33. #define ZONE_TEMP_DIGIT 2 /*!< Temperature digit display zone index */
  34. #define ZONE_TEMP_DIG_CNT 3 /*!< Number of digits, for c/f display */
  35. #define ZONE_TEMP_SEG_NUM 7 /*!< Number of segments on each digit number */
  36. #define ZONE_VER_DIGIT 3 /*!< Version number digit display zone index */
  37. #define ZONE_VER_DIG_CNT 6 /*!< Number of digits, for version display */
  38. #define ZONE_VER_SEG_NUM 7 /*!< Number of segments on each digit number */
  39. #define ZONE_TIME_DIGIT 4 /*!< Time digit display zone index */
  40. #define ZONE_TIME_DIG_CNT 4 /*!< Number of digits */
  41. #define ZONE_TIME_SEG_NUM 7 /*!< Number of segments on each digit number */
  42. #define ZONE_NUMICRO_DIGIT 5 /*!< NuMicro digit display zone index */
  43. #define ZONE_NUMICRO_DIG_CNT 3 /*!< Number of digits */
  44. #define ZONE_NUMICRO_SEG_NUM 7 /*!< Number of segments on each digit number */
  45. /*---------------------------------------------------------------------------------------------------------*/
  46. /* COM and SEG Position of Symbol Constant Definitions */
  47. /*---------------------------------------------------------------------------------------------------------*/
  48. #define SYMBOL_NVT ((10)<<4 | (4)<<0) /*!< T1 display on COM 4, SEG 10 */
  49. #define SYMBOL_WIFI ((10)<<4 | (5)<<0) /*!< T2 display on COM 5, SEG 10 */
  50. #define SYMBOL_SOUND ((10)<<4 | (6)<<0) /*!< T3 display on COM 6, SEG 10 */
  51. #define SYMBOL_NUMICRO ((9)<<4 | (3)<<0) /*!< Y3 display on COM 3, SEG 9 */
  52. #define SYMBOL_BAT_FRAME ((10)<<4 | (0)<<0) /*!< T7 display on COM 0, SEG 10 */
  53. #define SYMBOL_BAT_1 ((10)<<4 | (2)<<0) /*!< T4 display on COM 2, SEG 10 */
  54. #define SYMBOL_BAT_2 ((10)<<4 | (3)<<0) /*!< T5 display on COM 3, SEG 10 */
  55. #define SYMBOL_BAT_3 ((10)<<4 | (1)<<0) /*!< T6 display on COM 1, SEG 10 */
  56. #define SYMBOL_PLUS ((3)<<4 | (1)<<0) /*!< T12 display on COM 1, SEG 3 */
  57. #define SYMBOL_MINUS ((3)<<4 | (3)<<0) /*!< T13 display on COM 3, SEG 3 */
  58. #define SYMBOL_V ((39)<<4 | (4)<<0) /*!< T26 display on COM 4, SEG 39 */
  59. #define SYMBOL_A ((37)<<4 | (4)<<0) /*!< T27 display on COM 4, SEG 37 */
  60. #define SYMBOL_W ((35)<<4 | (4)<<0) /*!< T28 display on COM 4, SEG 35 */
  61. #define SYMBOL_ARROW_UP ((1)<<4 | (4)<<0) /*!< T29 display on COM 4, SEG 1 */
  62. #define SYMBOL_ARROW_LEFT ((1)<<4 | (6)<<0) /*!< T30 display on COM 6, SEG 1 */
  63. #define SYMBOL_ARROW_DOWN ((0)<<4 | (7)<<0) /*!< T31 display on COM 7, SEG 0 */
  64. #define SYMBOL_ARROW_RIGHT ((0)<<4 | (4)<<0) /*!< T32 display on COM 4, SEG 0 */
  65. #define SYMBOL_CIRCLE_UP ((1)<<4 | (5)<<0) /*!< T33 display on COM 5, SEG 1 */
  66. #define SYMBOL_CIRCLE_LEFT ((0)<<4 | (6)<<0) /*!< T34 display on COM 6, SEG 0 */
  67. #define SYMBOL_CIRCLE_RIGHT ((0)<<4 | (5)<<0) /*!< T35 display on COM 5, SEG 0 */
  68. #define SYMBOL_PERCENTAGE ((23)<<4 | (4)<<0) /*!< Y2 display on COM 4, SEG 23 */
  69. #define SYMBOL_PPM ((21)<<4 | (4)<<0) /*!< Y1 display on COM 4, SEG 21 */
  70. #define SYMBOL_TEMP_C ((25)<<4 | (4)<<0) /*!< T37 display on COM 4, SEG 25 */
  71. #define SYMBOL_TEMP_F ((27)<<4 | (4)<<0) /*!< T38 display on COM 4, SEG 27 */
  72. #define SYMBOL_VERSION ((31)<<4 | (4)<<0) /*!< T41 display on COM 4, SEG 31 */
  73. #define SYMBOL_S(x) (((((x)-1)%5)+11)<<4 | (((x)-1)/5)<<0) /*!< S[x] display on COM x, SEG x. [x] range is 1 ~ 40. */
  74. #define SYMBOL_MAIN_DIG_COL1 ((16)<<4 | (1)<<0) /*!< T14 display on COM 1, SEG 16 */
  75. #define SYMBOL_MAIN_DIG_COL2 ((20)<<4 | (1)<<0) /*!< T16 display on COM 1, SEG 20 */
  76. #define SYMBOL_MAIN_DIG_COL3 ((24)<<4 | (1)<<0) /*!< T18 display on COM 1, SEG 24 */
  77. #define SYMBOL_MAIN_DIG_COL4 ((28)<<4 | (1)<<0) /*!< T20 display on COM 1, SEG 28 */
  78. #define SYMBOL_MAIN_DIG_COL5 ((32)<<4 | (1)<<0) /*!< T22 display on COM 1, SEG 32 */
  79. #define SYMBOL_MAIN_DIG_COL6 ((36)<<4 | (1)<<0) /*!< T24 display on COM 1, SEG 36 */
  80. #define SYMBOL_MAIN_DIG_P1 ((16)<<4 | (3)<<0) /*!< T15 display on COM 3, SEG 16 */
  81. #define SYMBOL_MAIN_DIG_P2 ((20)<<4 | (3)<<0) /*!< T17 display on COM 3, SEG 20 */
  82. #define SYMBOL_MAIN_DIG_P3 ((24)<<4 | (3)<<0) /*!< T19 display on COM 3, SEG 24 */
  83. #define SYMBOL_MAIN_DIG_P4 ((28)<<4 | (3)<<0) /*!< T21 display on COM 3, SEG 28 */
  84. #define SYMBOL_MAIN_DIG_P5 ((32)<<4 | (3)<<0) /*!< T23 display on COM 3, SEG 32 */
  85. #define SYMBOL_MAIN_DIG_P6 ((36)<<4 | (3)<<0) /*!< T25 display on COM 3, SEG 36 */
  86. #define SYMBOL_VER_DIG_P1 ((29)<<4 | (4)<<0) /*!< T39 display on COM 4, SEG 29 */
  87. #define SYMBOL_VER_DIG_P2 ((33)<<4 | (4)<<0) /*!< T40 display on COM 4, SEG 33 */
  88. #define SYMBOL_TIME_DIG_COL1 ((5)<<4 | (7)<<0) /*!< T9 display on COM 7, SEG 5 */
  89. #define SYMBOL_TIME_DIG_P1 ((3)<<4 | (7)<<0) /*!< T8 display on COM 7, SEG 3 */
  90. #define SYMBOL_TIME_DIG_P2 ((5)<<4 | (3)<<0) /*!< T10 display on COM 3, SEG 5 */
  91. #define SYMBOL_TIME_DIG_P3 ((7)<<4 | (3)<<0) /*!< T11 display on COM 3, SEG 7 */
  92. /**@}*/ /* end of group M2354_LCDLIB_EXPORTED_CONSTANTS */
  93. /** @addtogroup M2354_LCDLIB_EXPORTED_STRUCTS LCDLIB Exported Structs
  94. @{
  95. */
  96. typedef struct
  97. {
  98. uint32_t u32DigitCnt; /*!< Digit counts */
  99. uint32_t u32MaxSegNum; /*!< Maximum segment number */
  100. } LCD_ZONE_INFO_T;
  101. /**@}*/ /* end of group M2354_LCDLIB_EXPORTED_STRUCTS */
  102. /** @addtogroup M2354_LCDLIB_EXPORTED_FUNCTIONS LCD Exported Functions
  103. @{
  104. */
  105. void LCDLIB_Printf(uint32_t u32Zone, char *InputStr);
  106. void LCDLIB_PutChar(uint32_t u32Zone, uint32_t u32Index, uint8_t u8Ch);
  107. void LCDLIB_PrintNumber(uint32_t u32Zone, uint32_t InputNum);
  108. void LCDLIB_SetSymbol(uint32_t u32Symbol, uint32_t u32OnOff);
  109. /**@}*/ /* end of group M2354_LCDLIB_EXPORTED_FUNCTIONS */
  110. /**@}*/ /* end of group M2354_LCDLIB_Driver */
  111. /**@}*/ /* end of group LIBRARY */
  112. #ifdef __cplusplus
  113. }
  114. #endif
  115. #endif /* __M2354_LCDLIB_H */
  116. /*** (C) COPYRIGHT 2019-2020 Nuvoton Technology Corp. ***/