mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-07-26 10:38:41 +00:00
ssd1306: add rotation functions for Displayer interface
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
+14
-2
@@ -15,8 +15,9 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
errBufferSize = errors.New("invalid size buffer")
|
||||
errOutOfRange = errors.New("out of screen range")
|
||||
errBufferSize = errors.New("invalid size buffer")
|
||||
errOutOfRange = errors.New("out of screen range")
|
||||
errNotImplemented = errors.New("not implemented")
|
||||
)
|
||||
|
||||
type ResetValue [2]byte
|
||||
@@ -359,3 +360,14 @@ func (d *Device) DrawBitmap(x, y int16, bitmap pixel.Image[pixel.Monochrome]) er
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Rotation returns the currently configured rotation.
|
||||
func (d *Device) Rotation() drivers.Rotation {
|
||||
return drivers.Rotation0
|
||||
}
|
||||
|
||||
// SetRotation changes the rotation of the device (clock-wise).
|
||||
// Would have to be implemented in software for this device.
|
||||
func (d *Device) SetRotation(rotation drivers.Rotation) error {
|
||||
return errNotImplemented
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user