Documentation ¶
Overview ¶
Package i2c provides low level control over the linux i2c bus.
Before usage you should load the i2c-dev kenel module
sudo modprobe i2c-dev
Each i2c bus can address 127 independent i2c devices, and most linux systems contain several buses.
Index ¶
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_DDRAM_Set = 0x80 // Options OPT_Increment = 0x02 // CMD_Entry_Mode // 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_2_Lines = 0x08 // CMD_Function_Set 0 = 1 line OPT_5x10_Dots = 0x04 // CMD_Function_Set 0 = 5x7 dots )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type I2C ¶
type I2C struct {
// contains filtered or unexported fields
}
I2C represents a connection to an i2c device.
type Lcd ¶
type Lcd struct {
// contains filtered or unexported fields
}
func (*Lcd) BacklightOff ¶
func (lcd *Lcd) BacklightOff()
func (*Lcd) BacklightOn ¶
func (lcd *Lcd) BacklightOn()
func (*Lcd) SetPosition ¶
Click to show internal directories.
Click to hide internal directories.