📄 1335.h
字号:
/***********************************************************************
Port, PINS and LCD defines
***********************************************************************/
// Data port
#define LCDDATAPIN PINA
#define LCDDATADDR DDRA
#define LCDDATAPORT PORTA
// Control port
#define LCDCTLPIN PINC
#define LCDCTLDDR DDRC
#define LCDCTLPORT PORTC
// Control pins
#define RST 0x40
#define RD 0x08
#define WR 0x10
#define A0 0x20
#define CSEL 0x7f
// LCD display data
#define LCD_X_SIZE 320
#define LCD_Y_SIZE 240
#define LCD_XTAL 10,000,000
#define AP 40 //一行8点320/4=40个字节
#define SYSTEM_SET (0x40)
#define SCROLL (0x44)
#define SLEEP_IN (0x53)
#define DISP_ON (0x59)
#define DISP_OFF (0x58)
#define OVLAY (0x5b)
#define HDOT_SCR (0x5a)
#define CSRFORM (0x5d)
#define CGRAM_ADR (0x5c)
#define CSR_RIGHT (0x4c)
#define CSR_LEFT (0x4d)
#define CSR_UP (0x4e)
#define CSR_DOWN (0x4f)
#define CSRW (0x46)
#define CSRR (0x47)
#define MWRITE (0x42)
#define MREAD (0x43)
/***********************************************************************
Prototypes
***********************************************************************/
// General LCD functions
extern unsigned char lcd_read_data(void);
extern void lcd_write_data(unsigned char data);
extern void lcd_write_command(unsigned char command);
extern void lcd_init(void);
extern void lcd_delay(unsigned int i);
// Text functions
extern void lcd_clear_text(void);
extern void lcd_goto(unsigned char column, unsigned char line);
extern void lcd_write_string(char *ptr);
extern void lcd_show_cursor(unsigned char show);
// Graphic functions
extern void lcd_clear_graphics(void);
extern void lcd_pixel(int x, int y, unsigned char show);
extern void lcd_rectangle(int x1, int y1, int x2, int y2, unsigned char show);
extern void lcd_line(int x1, int y1, int x2, int y2, unsigned char show);
extern void lcd_circle(int x, int y, int radius, unsigned char show);
extern void lcd_degree_line(int x, int y, int degree, int inner_radius,
int outer_radius, unsigned char show);
extern void lcd_chinesechar(int x, int y,unsigned char const *code1 ,
unsigned char width,unsigned char length,unsigned char lcd_fanxian);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -