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