adafruit4650

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package adafruit4650 implements a driver for the Adafruit FeatherWing OLED - 128x64 OLED display. The display is backed itself by a SH1107 driver chip.

Store: https://www.adafruit.com/product/4650

Documentation: https://learn.adafruit.com/adafruit-128x64-oled-featherwing

Index

Constants

View Source
const DefaultAddress = 0x3c

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Address uint8
	// contains filtered or unexported fields
}

Device represents an Adafruit 4650 device

func New

func New(bus drivers.I2C) Device

New creates a new device, not configuring anything yet.

func (*Device) ClearBuffer

func (d *Device) ClearBuffer()

ClearBuffer clears the buffer

func (*Device) ClearDisplay

func (d *Device) ClearDisplay() error

ClearDisplay clears the image buffer as well as the actual display

func (*Device) Configure

func (d *Device) Configure() error

Configure initializes the display with default configuration

func (*Device) Display

func (d *Device) Display() error

Display sends the whole buffer to the screen

func (*Device) SetPixel

func (d *Device) SetPixel(x int16, y int16, c color.RGBA)

SetPixel modifies the internal buffer. Since this display has a bit-depth of 1 bit any non-zero color component will be treated as 'on', otherwise 'off'.

func (*Device) Size

func (d *Device) Size() (w, h int16)

Size returns the current size of the display.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL