⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tft.h

📁 一款收款机C源代码!因为是几年前的代码了
💻 H
字号:
/*TFT.H*/
/*
********************************************************************************
*	Clear the TFT display with specify color
*	Input	:	color -- the color which used for background
*
********************************************************************************
*/

#ifndef __TFT_H__
#define __TFT_H__
#include 	"ver.h"
//#define TFT_9inch

#if (MODEL_VER == ROYAL_9INCH)
#define LCD_Xdot    800			/* The LCD X coordinate distinguishability */
#define LCD_Ydot    480			/* The LCD Y coordinate distinguishability */

#define LCD_X0dot    320	//  (800/10)*4, 左界面的宽度


#define	LCD_LAYOUT_VRT_LINE		10		/* The vertical lines */
#define	LCD_LAYOUT_HOR_LINE		10		/* The horizontal lines */
#define	LCD_LAYOUT_MAX_KEY		(LCD_LAYOUT_VRT_LINE*LCD_LAYOUT_HOR_LINE)
#define LCD_HOR_KEY             10


#define LINE_KEY_NUM    6   // 右部分每行基本键为6个按键
#define LEFT_KEY_NUM    4
#define HORI_KEY_NUM    10  // 右部分总共10行按键
#define VRT_KEY_NUM     10
#define MAX_LAYOUT_KEY  60  //最大可显示键盘数
#else						/*Version is WD3-F&B, TFT panel is 12.1 Inch*/
#define LCD_Xdot    800			/* The LCD X coordinate distinguishability */
#define LCD_Ydot    600			/* The LCD Y coordinate distinguishability */

#define LCD_X0dot    320	//  (800/10)*4, 左界面的宽度

#define	LCD_LAYOUT_VRT_LINE		13		/* The vertical lines */
#define	LCD_LAYOUT_HOR_LINE		10		/* The horizontal lines */
#define	LCD_LAYOUT_MAX_KEY		(LCD_LAYOUT_VRT_LINE*LCD_LAYOUT_HOR_LINE)


#define LINE_KEY_NUM    6   // 右部分总共6列按键
#define LEFT_KEY_NUM    4
#define VRT_KEY_NUM     10  // 全盘总共10列基本按键
#define HORI_KEY_NUM    13  // 全盘总共13行基本按键
#define MAX_LAYOUT_KEY  78  //最大可显示键盘数
#endif

#define KEY_ITEM_WIDTH      ((LCD_Xdot-LCD_X0dot)/LINE_KEY_NUM) //基本键宽
#define KEY_ITEM_HEIGHT      (LCD_Ydot/HORI_KEY_NUM) //基本键高

#define     BLACK           0x00    //000 000 00B,      ( 0,        0,         0)//黑色

#define     DARKRED         0x80    // 100 000 00B      (144,     0,         0)
#define     RED             0xe0    // 111 000 00B      (255,     0,         0),     //大红      OK
#define     LIGHTRED        0xf2    //111 100 10B       (255,     180,     170)//浅红

#define     DARKORANGE      0xA8    // 101 010 00B      (180,     72,     0), //深橙       OK
#define     ORANGE          0xf0    // 111 100 00B      (255,     144,     0), //橙       OK
#define     LIGHTORANGE     0xf5    // 111 101 01B      (255,     180,     85), //橙       OK

#define     DARKYELLOW      0x90    // 100 100 00B      (144,     144,      0)//深黄
#define     YELLOW          0xFC    // 111 111 00B      (255,     255,     0}, // 黄      OK
#define     LIGHT_YELLOW    0xFE    // 111 111 10B      (255,     255,     170}, // 浅黄      OK

#define     DARK_BLUE       0x02    // 000 000 10
#define     BLUE            0x03    // 000 000 11B       (0,         0,         255)//纯蓝
#define     LIGHTBLUE       0x93    // 100 100 11B      (128,     128,     255)  //浅蓝ok

#define     DARKGREEN       0x0c    //000 011 00B       (0,         108,     0)//深绿
#define     GREEN           0x1c    //000 111 00B       (0,         255,     0)//深绿
#define     LIGHTGREEN      0xBE    // 101 111 10B      (180,     255,     170}, //浅绿 OK

#define     DARKPURPLE      0xA2    // 101 000 01B      (108,     0,     170)//紫色
#define     PURPLE          0xA3    // 101 000 11B      (180,     0,     255)//紫色
#define     LIGHTPURPLE     0xf7    // 111 101 11B      (255,     180,     255}, // 浅紫 OK

#define     DARKCYAN        0x16     //000 101 10B       (0,         182,     170)//深青
#define     CYAN            0x1f    // 000 111 11B      (0,         255,     255)
#define     LIGHTCYAN       0xBF    // 101 111 11B      (180,     255,     255) //浅青ok

#define     DARKGRAY        0x6D    // 011 011 01B,      ( 108,        108,         85)//深灰色
#define     GRAY            0xB6    // 101 101 10B      (180,     180,     170)// 浅灰
#define     LIGHTGRAY       0xDA    // 110 110 10B      (216,     216,     180}// 浅灰

#define     WHITE           0xff    // 111 111 11B      (255,     255,     255), // 白      OK

#define TFT_BACK_COLOR      DARKGRAY

#define KEY_TEXT_COLOR      BLACK
#define STAT_TEXT_COLOR     WHITE
#define LCD_TEXT_COLOR      WHITE
#define INPUT_TEXT_COLOR     WHITE   
#define SUB_TEXT_COLOR      WHITE

#define  POP_TEXT_COLOR         WHITE     
#define  POP_TEXT_FONT_COLOR    LIGHT_YELLOW


#define     MAX_BTN_DESC_LEN        18

#define     NRM_FONT            0       //normal  字体
#define     BOLD_FONT           1       //BOLD 字体, 相当于双宽字体
#define     DB_BOLD_FONT        2

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -