Documentation
¶
Index ¶
- Constants
- type HD44780
- func (display *HD44780) Autoscroll()
- func (display *HD44780) Blink()
- func (display *HD44780) Clear()
- func (display *HD44780) Command(command byte)
- func (display *HD44780) Cursor()
- func (display *HD44780) Data(data byte)
- func (display *HD44780) Display()
- func (display *HD44780) Home()
- func (display *HD44780) Init(cols int, lines int)
- func (display *HD44780) LeftToRight()
- func (display *HD44780) NoAutoscroll()
- func (display *HD44780) NoBlink()
- func (display *HD44780) NoCursor()
- func (display *HD44780) NoDisplay()
- func (display *HD44780) RightToLeft()
- func (display *HD44780) ScrollDisplayLeft()
- func (display *HD44780) ScrollDisplayRight()
- func (display *HD44780) SetBacklight(on bool)
- func (display *HD44780) SetCursor(col int, row int)
- func (display *HD44780) Write(p []byte) (n int, err error)
- type I2CExpanderProfile
Constants ¶
View Source
const ( // commands LCD_CLEARDISPLAY byte = 0x01 LCD_RETURNHOME byte = 0x02 LCD_ENTRYMODESET byte = 0x04 LCD_DISPLAYCONTROL byte = 0x08 LCD_CURSORSHIFT byte = 0x10 LCD_FUNCTIONSET byte = 0x20 LCD_SETCGRAMADDR byte = 0x40 LCD_SETDDRAMADDR byte = 0x80 // flags for display entry mode LCD_ENTRYRIGHT byte = 0x00 LCD_ENTRYLEFT byte = 0x02 LCD_ENTRYSHIFTINCREMENT byte = 0x01 LCD_ENTRYSHIFTDECREMENT byte = 0x00 // flags for display on/off control LCD_DISPLAYON byte = 0x04 LCD_DISPLAYOFF byte = 0x00 LCD_CURSORON byte = 0x02 LCD_CURSOROFF byte = 0x00 LCD_BLINKON byte = 0x01 LCD_BLINKOFF byte = 0x00 // flags for display/cursor shift LCD_DISPLAYMOVE byte = 0x08 LCD_CURSORMOVE byte = 0x00 LCD_MOVERIGHT byte = 0x04 LCD_MOVELEFT byte = 0x00 // flags for function set LCD_8BITMODE byte = 0x10 LCD_4BITMODE byte = 0x00 LCD_2LINE byte = 0x08 LCD_1LINE byte = 0x00 LCD_5x10DOTS byte = 0x04 LCD_5x8DOTS byte = 0x00 // constants for backlight polarity POSITIVE = 0 NEGATIVE = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HD44780 ¶
type HD44780 struct {
// contains filtered or unexported fields
}
func NewHD44780 ¶
func NewHD44780(module hwio.I2CModule, address int, profile I2CExpanderProfile) *HD44780
func NewHD44780Extended ¶
func (*HD44780) Autoscroll ¶
func (display *HD44780) Autoscroll()
This will 'right justify' text from the cursor
func (*HD44780) LeftToRight ¶
func (display *HD44780) LeftToRight()
This is for text that flows Left to Right
func (*HD44780) NoAutoscroll ¶
func (display *HD44780) NoAutoscroll()
This will 'left justify' text from the cursor
func (*HD44780) RightToLeft ¶
func (display *HD44780) RightToLeft()
This is for text that flows Right to Left
func (*HD44780) ScrollDisplayLeft ¶
func (display *HD44780) ScrollDisplayLeft()
These commands scroll the display without changing the RAM
func (*HD44780) ScrollDisplayRight ¶
func (display *HD44780) ScrollDisplayRight()
func (*HD44780) SetBacklight ¶
type I2CExpanderProfile ¶
type I2CExpanderProfile int
const ( // mjkdz devices are commonly found in the wild PROFILE_MJKDZ I2CExpanderProfile = iota // devices based on PCF8574 are also around, but wired a little bit differently. PROFILE_PCF8574 )
Click to show internal directories.
Click to hide internal directories.