Documentation ¶
Index ¶
- Constants
- type Lcd
- func (this *Lcd) BacklightOff() error
- func (this *Lcd) BacklightOn() error
- func (this *Lcd) Clear() error
- func (this *Lcd) Command(cmd byte) error
- func (this *Lcd) Home() error
- func (this *Lcd) SetPosition(line, pos int) error
- func (this *Lcd) ShowMessage(text string, options ShowOptions) error
- func (this *Lcd) TestWriteCGRam() error
- func (this *Lcd) Write(buf []byte) (int, error)
- type LcdType
- type ShowOptions
Constants ¶
View Source
const ( // Commands CMD_Clear_Display = 0x01 CMD_Return_Home = 0x02 CMD_Entry_Mode = 0x04 CMD_Display_Control = 0x08 CMD_Cursor_Display_Shift = 0x10 CMD_Function_Set = 0x20 CMD_CGRAM_Set = 0x40 CMD_DDRAM_Set = 0x80 // Options OPT_Increment = 0x02 // CMD_Entry_Mode OPT_Decrement = 0x00 // OPT_Display_Shift = 0x01 // CMD_Entry_Mode OPT_Enable_Display = 0x04 // CMD_Display_Control OPT_Enable_Cursor = 0x02 // CMD_Display_Control OPT_Enable_Blink = 0x01 // CMD_Display_Control OPT_Display_Shift = 0x08 // CMD_Cursor_Display_Shift OPT_Shift_Right = 0x04 // CMD_Cursor_Display_Shift 0 = Left OPT_8Bit_Mode = 0x10 OPT_4Bit_Mode = 0x00 OPT_2_Lines = 0x08 // CMD_Function_Set 0 = 1 line OPT_1_Lines = 0x00 OPT_5x10_Dots = 0x04 // CMD_Function_Set 0 = 5x7 dots OPT_5x8_Dots = 0x00 )
View Source
const ( PIN_BACKLIGHT byte = 0x08 PIN_EN byte = 0x04 // Enable bit PIN_RW byte = 0x02 // Read/Write bit PIN_RS byte = 0x01 // Register select bit )
View Source
const ( SHOW_NO_OPTIONS ShowOptions = 0 SHOW_LINE_1 = 1 << iota SHOW_LINE_2 SHOW_LINE_3 SHOW_LINE_4 SHOW_ELIPSE_IF_NOT_FIT SHOW_BLANK_PADDING )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lcd ¶
type Lcd struct {
// contains filtered or unexported fields
}
func (*Lcd) BacklightOff ¶
func (*Lcd) BacklightOn ¶
func (*Lcd) SetPosition ¶
func (*Lcd) ShowMessage ¶
func (this *Lcd) ShowMessage(text string, options ShowOptions) error
func (*Lcd) TestWriteCGRam ¶
type ShowOptions ¶
type ShowOptions int
Click to show internal directories.
Click to hide internal directories.