epd2in13: unify rotation configuration with other displays

This commit updates rotation behavior to match other displays.
For more information, see: https://github.com/tinygo-org/drivers/pull/550

This changes the signature of `SetRotation` but I don't think any
existing code will be affected by this change.
This commit is contained in:
Ayke van Laethem
2023-11-06 18:17:51 +01:00
committed by Ron Evans
parent 47dfeb9e94
commit 14994a3f31
2 changed files with 27 additions and 18 deletions
+6 -4
View File
@@ -1,5 +1,7 @@
package epd2in13
import "tinygo.org/x/drivers"
// Registers
const (
DRIVER_OUTPUT_CONTROL = 0x01
@@ -24,8 +26,8 @@ const (
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
NO_ROTATION = drivers.Rotation0
ROTATION_90 = drivers.Rotation90 // 90 degrees clock-wise rotation
ROTATION_180 = drivers.Rotation180
ROTATION_270 = drivers.Rotation270
)