ssd1306: add rotation functions for Displayer interface

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2024-04-21 12:19:58 +02:00
committed by Ron Evans
parent f206f6f56f
commit bf0b383176
+14 -2
View File
@@ -15,8 +15,9 @@ import (
) )
var ( var (
errBufferSize = errors.New("invalid size buffer") errBufferSize = errors.New("invalid size buffer")
errOutOfRange = errors.New("out of screen range") errOutOfRange = errors.New("out of screen range")
errNotImplemented = errors.New("not implemented")
) )
type ResetValue [2]byte type ResetValue [2]byte
@@ -359,3 +360,14 @@ func (d *Device) DrawBitmap(x, y int16, bitmap pixel.Image[pixel.Monochrome]) er
return nil 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
}