Documentation ¶
Overview ¶
Package epd2in13 implements a driver for Waveshare 2.13in black and white e-paper device.
Datasheet: https://www.waveshare.com/w/upload/e/e6/2.13inch_e-Paper_Datasheet.pdf
Index ¶
- Constants
- type Config
- type Device
- func (d *Device) ClearBuffer()
- func (d *Device) ClearDisplay()
- func (d *Device) Configure(cfg Config)
- func (d *Device) DeepSleep()
- func (d *Device) Display() error
- func (d *Device) DisplayRect(x int16, y int16, width int16, height int16) error
- func (d *Device) IsBusy() bool
- func (d *Device) Reset()
- func (d *Device) SendCommand(command uint8)
- func (d *Device) SendData(data uint8)
- func (d *Device) SetLUT(fullUpdate bool)
- func (d *Device) SetPixel(x int16, y int16, c color.RGBA)
- func (d *Device) SetRotation(rotation Rotation)
- func (d *Device) Size() (w, h int16)
- func (d *Device) WaitUntilIdle()
- type Rotation
Constants ¶
const ( DRIVER_OUTPUT_CONTROL = 0x01 BOOSTER_SOFT_START_CONTROL = 0x0C GATE_SCAN_START_POSITION = 0x0F DEEP_SLEEP_MODE = 0x10 DATA_ENTRY_MODE_SETTING = 0x11 SW_RESET = 0x12 TEMPERATURE_SENSOR_CONTROL = 0x1A MASTER_ACTIVATION = 0x20 DISPLAY_UPDATE_CONTROL_1 = 0x21 DISPLAY_UPDATE_CONTROL_2 = 0x22 WRITE_RAM = 0x24 WRITE_VCOM_REGISTER = 0x2C WRITE_LUT_REGISTER = 0x32 SET_DUMMY_LINE_PERIOD = 0x3A SET_GATE_TIME = 0x3B BORDER_WAVEFORM_CONTROL = 0x3C SET_RAM_X_ADDRESS_START_END_POSITION = 0x44 SET_RAM_Y_ADDRESS_START_END_POSITION = 0x45 SET_RAM_X_ADDRESS_COUNTER = 0x4E SET_RAM_Y_ADDRESS_COUNTER = 0x4F TERMINATE_FRAME_READ_WRITE = 0xFF NO_ROTATION Rotation = 0 ROTATION_90 Rotation = 1 // 90 degrees clock-wise rotation ROTATION_180 Rotation = 2 ROTATION_270 Rotation = 3 )
Registers
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func (*Device) ClearBuffer ¶
func (d *Device) ClearBuffer()
ClearBuffer sets the buffer to 0xFF (white)
func (*Device) DisplayRect ¶
DisplayRect sends only an area of the buffer to the screen. The rectangle points need to be a multiple of 8 in the screen. They might not work as expected if the screen is rotated.
func (*Device) SendCommand ¶
SendCommand sends a command to the display
func (*Device) SetPixel ¶
SetPixel modifies the internal buffer in a single pixel. The display have 2 colors: black and white We use RGBA(0,0,0, 255) as white (transparent) Anything else as black
func (*Device) SetRotation ¶ added in v0.3.0
SetRotation changes the rotation (clock-wise) of the device
func (*Device) WaitUntilIdle ¶
func (d *Device) WaitUntilIdle()
WaitUntilIdle waits until the display is ready