Documentation ¶
Index ¶
- Constants
- type Lcd
- func (this *Lcd) BacklightOff() error
- func (this *Lcd) BacklightOn() error
- func (this *Lcd) BlinkOff() error
- func (this *Lcd) BlinkOn() error
- func (this *Lcd) Clear() error
- func (this *Lcd) Command(cmd byte) error
- func (this *Lcd) CursorOff() error
- func (this *Lcd) CursorOn() error
- func (this *Lcd) DisplayOff() error
- func (this *Lcd) DisplayOn() error
- func (this *Lcd) Fill(char rune) error
- func (this *Lcd) GetStrobeDelays() (writeDelay, resetDelay uint16)
- func (this *Lcd) Home() error
- func (this *Lcd) LeftRightDisplay() error
- func (this *Lcd) RightLeftDisplay() error
- func (this *Lcd) ScrollDisplayLeft() error
- func (this *Lcd) ScrollDisplayRight() error
- func (this *Lcd) SetPosition(line, pos int) error
- func (this *Lcd) SetStrobeDelays(writeDelay, resetDelay uint16)
- func (this *Lcd) SetupExit(clear bool)
- func (this *Lcd) ShowMessage(text string, options ShowOptions) error
- func (this *Lcd) Shutdown()
- func (this *Lcd) Startup()
- 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_Shift = 0x10 CMD_Function_Set = 0x20 CMD_CGRAM_Set = 0x40 CMD_DDRAM_Set = 0x80 // Flags for display entry mode (CMD_Entry_Mode) OPT_EntryLeft = 0x02 OPT_EntryRight = 0x00 OPT_Increment = 0x01 OPT_Decrement = 0x00 // Flags for display control (CMD_Display_Control) OPT_Enable_Display = 0x04 OPT_Disable_Display = 0x00 OPT_Enable_Cursor = 0x02 OPT_Disable_Cursor = 0x00 OPT_Enable_Blink = 0x01 OPT_Disable_Blink = 0x00 // Flags for display/cursor move () OPT_Display_Move = 0x08 OPT_Cursor_Move = 0x00 OPT_Move_Right = 0x04 OPT_Move_Left = 0x00 // Flags for function set (CMD_Function_Set) OPT_8Bit_Mode = 0x10 OPT_4Bit_Mode = 0x00 OPT_2_Lines = 0x08 OPT_1_Lines = 0x00 OPT_5x10_Dots = 0x04 OPT_5x8_Dots = 0x00 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) DisplayOff ¶
func (*Lcd) GetStrobeDelays ¶
GetStrobeDelays returns the WRITE and RESET strobe delays in microseconds.
func (*Lcd) LeftRightDisplay ¶
func (*Lcd) RightLeftDisplay ¶
func (*Lcd) ScrollDisplayLeft ¶
func (*Lcd) ScrollDisplayRight ¶
func (*Lcd) SetPosition ¶
func (*Lcd) SetStrobeDelays ¶
SetStrobeDelays sets the WRITE and RESET strobe delays in microseconds.
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.