📄 h146it01.h
字号:
/******************************************************************************************
Manufacturer: SHENZHEN JINGHUA DISPLAYS CO.,LTD.
All rights reserved.
H146IT01
Programmer: ldqmoon
Date: 2007-9-1
Ver: A
________________________________________________________________________________________
lcm information:
H146IT01 TFT
176RGB*132
IC: NT3916
V: 3.v
cpu: atmega16
fosc: 7.3728MHz
Interface:
---------------------------------------------------------------------------------------
...
________________________________________________________________________________________
filename : H146IT01.h
descibe: program to control a tft modula
modified flow here:
yyyy-mm-dd : changer reason
*******************************************************************************************/
#ifndef __H146IT01_h__
#define __H146IT01_h__
#include <avr/io.h>
/*
this define for avr test board made on 2005.6.15
#define _RD1 PORTC|=(1<<PC7)
#define _RD0 PORTC&=~(1<<PC7)
#define _WR1 PORTC|=(1<<PC6)
#define _WR0 PORTC&=~(1<<PC6)
#define _RS1 PORTC|=(1<<PC1)
#define _RS0 PORTC&=~(1<<PC1)
#define _CS1 PORTC|=(1<<PC0)
#define _CS0 PORTC&=~(1<<PC0)
#define _RST1 PORTD|=(1<<PD7)
#define _RST0 PORTD&=~(1<<PD7)
*/
// the next define is use for sd_tft board
#define _RD1 PORTD|=(1<<PD2)
#define _RD0 PORTD&=~(1<<PD2)
#define _WR1 PORTD|=(1<<PD3)
#define _WR0 PORTD&=~(1<<PD3)
#define _RS1 PORTD|=(1<<PD4)
#define _RS0 PORTD&=~(1<<PD4)
#define _CS1 PORTC|=(1<<PC0)
#define _CS0 PORTC&=~(1<<PC0)
#define _RST1 PORTC|=(1<<PC1)
#define _RST0 PORTC&=~(1<<PC1)
#define DATAPORT PORTA
#define uchar unsigned char
// this one define the color depth of the screen, usually it's 56k or 262k
#define COLORDEPTH 262
#if COLORDEPTH==262
void DisplayScreen(unsigned char ColorR, unsigned char ColorG, unsigned char ColorB);
void PutPixel(int x, int y, unsigned char ColorR, unsigned char ColorG, unsigned char ColorB);
void PutChar8x16(int x, int y, char pFont, uchar bkR, uchar bkG, uchar bkB,uchar ftR, uchar ftG, uchar ftB);
void PutString(int StartX, int StartY, char *pString, uchar bkR,uchar bkG, uchar bkB, uchar ftR, uchar ftG, uchar ftB);
void DrawPicture(void);
#else
void DisplayScreen(unsigned int color);
void PutPixel(int x, int y, unsigned int color);
void PutChar8x16(int x, int y, char pFont,int bkcolor,int fontcolor);
void PutString(int StartX, int StartY, char *pString, int bkcolor, int fontcolor);
void DrawPicture(void);
#endif
void LCDInit(void);
void LCDWriteCmd(unsigned char cmd);
void LCDWriteData(unsigned char dat);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -