📄 lcd12864.h
字号:
#ifndef __LCD12864_H#define __LCD12864_H/*--- instruction definition ---*/#define CMD_CLEAR 0x01 /* 00000001 */ /* display clear + move to home */#define CMD_HOME 0x02 /* 00000010 */ /* move to home + release shift */#define CMD_ENTRY_DEC 0x04 /* 00000100 */ /* moving direction of cursol (decrement) */#define CMD_ENTRY_DEC_SHIFT 0x05 /* 00000101 */ /* moving direction of cursol */ /* (decrement) + display shift */#define CMD_ENTRY_INC 0x06 /* 00000110 */ /* moving direction of cursol */ /* (increment) */#define CMD_ENTRY_INC_SHIFT 0x07 /* 00000111 */ /* moving direction of cursol */ /* (increment) + display shift */#define CMD_DISP_DS 0x08 /* 00001000 */ /* not display (display OFF + cursol OFF + */ /* blink OFF) */#define CMD_DISP_EN 0x0c /* 00001100 */ /* display (display ON + cursol OFF + */ /* blink OFF) */#define CMD_DISP_EN_CUR 0x0e /* 00001110 */ /* display (display ON + cursol ON + */ /* blink OFF) */#define CMD_DISP_EN_CUR_BLINK 0x0f /* 00001111 */ /* display (display ON + cursol ON + */ /* blink ON) */#define CMD_MOVE_CUR_LEFT 0x10 /* 00010000 */ /* shift cursol to left */#define CMD_MOVE_CUR_RIGHT 0x14 /* 00010100 */ /* shift cursol to right */#define CMD_MOVE_SRC_LEFT 0x18 /* 00011000 */ /* shift source to left */#define CMD_MOVE_SRC_RIGHT 0x1c /* 00011100 */ /* shift source to right */#define CMD_FUNC_D4_N2_F7 0x28 /* 00101000 */#define CMD_FUNC_D8_N2_F7 0x30 /* 00110000 */ /* interface data length 4 bit */ /* 2 lines, 5*7 dots */#define TRUE 1#define FALSE 0void Lcd12864_init_lcd(void); /* initialize LCD */int Lcd12864_is_busy(void); /* check if it is possible to write LCD or not */ /* (check the busy flag state) */void Lcd12864_set_cursol(int x, int y); /* point the position of LCD display */void Lcd12864_write_lcd(const char *msg); /* display string on LCD */void Lcd12864_write_lcd_char(const char msg);void Lcd12864_light_on(void); /* light background */void Lcd12864_light_off(void); /* unlight background */#endif //__LCD12864_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -