Go to the documentation of this file.00001 #ifndef _DEV_HD44780_BUS_H_
00002 #define _DEV_HD44780_BUS_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 #include <sys/device.h>
00052
00053
00058
00059
00060 #define LCD_CLR 0 // DB0: clear display
00061 #define LCD_HOME 1 // DB1: return to home position
00062 #define LCD_ENTRY_MODE 2 // DB2: set entry mode
00063 #define LCD_ENTRY_INC 1 // DB1: increment
00064 #define LCD_ENTRY_SHIFT 0 // DB2: shift
00065 #define LCD_ON_CTRL 3 // DB3: turn lcd/cursor on
00066 #define LCD_ON_DISPLAY 2 // DB2: turn display on
00067 #define LCD_ON_CURSOR 1 // DB1: turn cursor on
00068 #define LCD_ON_BLINK 0 // DB0: blinking cursor
00069 #define LCD_MOVE 4 // DB4: move cursor/display
00070 #define LCD_MOVE_DISP 3 // DB3: move display (0-> move cursor)
00071 #define LCD_MOVE_RIGHT 2 // DB2: move right (0-> left)
00072 #define LCD_FUNCTION 5 // DB5: function set
00073 #define LCD_FUNCTION_8BIT 4 // DB4: set 8BIT mode (0->4BIT mode)
00074 #define LCD_FUNCTION_2LINES 3 // DB3: two lines (0->one line)
00075 #define LCD_FUNCTION_RE 2 // DB2: KS0073 Controller: Extended Register
00076 #define LCD_FUNCTION_10DOTS 2 // DB2: 5x10 font (0->5x7 font)
00077 #define LCD_FUNCTION_DS 1 // DB1: DisplayShift / DotScroll
00078 #define LCD_FUNCTION_REV 0 // DB0: Reverse Display
00079 #define LCD_EXT 3 // DB3: Extended Register Set
00080 #define LCD_EXT_FONT 2 // DB2: Fontwidth: 5 / 6 Pixel
00081 #define LCD_EXT_INVCURS 1 // DB1: Normal / Inverted Cursor
00082 #define LCD_EXT_4LINES 0 // DB0: 1/2 Lines (normal) or 4Lines
00083 #define LCD_CGRAM 6 // DB6: set CG RAM address
00084 #define LCD_DDRAM 7 // DB7: set DD RAM address
00085
00086 #define LCD_BUSY 7 // DB7: LCD is busy
00087
00088 #define LCD_CTRL_ADDR (lcd_base + 0x0000)
00089 #define LCD_DATA_ADDR (lcd_base + 0x0001)
00090 #define LCD_READ_OFFSET 0x0002
00091
00092
00095 extern NUTDEVICE devLcdBus;
00096
00097 #endif