-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTFT.h
63 lines (50 loc) · 1.66 KB
/
TFT.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef __TFT__H__
#define __TFT__H__
#include<reg52.h>
#include<absacc.h>
#include<intrins.h>
#include<string.h>
#define uchar unsigned char
#define uint unsigned int
#define USE_LANDSCAPE//꿎桿넋埼뷘紺팁학뻣,뷘팁헝역폘늪브,紺팁헝팁귁
//---------------------------捻쑨팁쌈窟綱츠-------------------------------------//
sbit bl =P2^4;//쌈친욥BL多신
sbit scl =P2^5;//쌈친욥CLK多신
sbit sda =P2^3;//쌈친욥DIN/MOSI多신
sbit rs =P2^2;//쌈친욥D/C多신
sbit cs =P2^0;//쌈친욥CE多신
sbit reset =P2^1;//쌈친욥RST多신
//땍屢끽痰奈
#define RED 0xf800
#define GREEN 0x07e0
#define BLUE 0x001f
#define WHITE 0xffff
#define BLACK 0x0000
#define YELLOW 0xFFE0
#define GRAY0 0xEF7D
#define GRAY1 0x8410
#define GRAY2 0x4208
void delay_ms(uint time);
void SPI_WriteData(uchar Data);
void Lcd_WriteIndex(uchar Data);
void Lcd_WriteData(uchar Data);
void LCD_WriteData_16Bit(unsigned int Data);
void Reset();
void lcd_initial();
void Lcd_SetRegion(unsigned int x_start,unsigned int y_start,unsigned int x_end,unsigned int y_end);
void PutPixel(uint x_start,uint y_start,uint color);
void dsp_single_colour(int color);
void Display_ASCII8X16(uint x0,uint y0,uchar *s);
void Display_ASCII8X16_Color(uint x0,uint y0,uchar *s,uint forecolor,uint backgroundcolor);
void Fast_DrawFont_GBK16(uint x, uint y, uint fc, uint bc, uchar *s);
void Gui_DrawFont_GBK16(uint x, uint y, uint fc, uint bc, uchar *s);
uchar code Zk_ASCII8X16[];
typedef struct
{
unsigned char Index[2];
char Msk[32];
}typFNT_GBK16;
//芥竟5뵀
#define hz16_num 28
code typFNT_GBK16 hz16[];
#endif