Documentation ¶
Index ¶
- type Dev
- func (d *Dev) Bounds() image.Rectangle
- func (d *Dev) ColorModel() color.Model
- func (d *Dev) Draw(r image.Rectangle, src image.Image, sp image.Point) error
- func (d *Dev) Halt() error
- func (d *Dev) Invert(blackOnWhite bool) error
- func (d *Dev) String() string
- func (d *Dev) Write(pixels []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dev ¶
type Dev struct {
// contains filtered or unexported fields
}
Dev is an open handle to the display controller.
func NewSPI ¶
NewSPI returns a Dev object that communicates over SPI to a SSD1351 display controller.
The SSD1351 can operate at up to 3.3Mhz, which is much higher than I²C. This permits higher refresh rates.
Wiring ¶
Connect SDA to SPI_MOSI, SCK to SPI_CLK, CS to SPI_CS.
func (*Dev) ColorModel ¶
ColorModel implements display.Drawer.
It is a one bit color model, as implemented by image16bit.Bit.
func (*Dev) Draw ¶
Draw implements display.Drawer.
It draws synchronously, once this function returns, the display is updated. It means that on slow bus (I²C), it may be preferable to defer Draw() calls to a background goroutine.
func (*Dev) Halt ¶
Halt turns off the display.
Sending any other command afterward reenables the display.
Directories ¶
Path | Synopsis |
---|---|
Package image16bit implements 16 bit (5, 6, 7 bits per color) 2D graphics.
|
Package image16bit implements 16 bit (5, 6, 7 bits per color) 2D graphics. |