Skip to content

Commit 51d4542

Browse files
committed
updates the orientation for one of the display drivers
1 parent b0004b3 commit 51d4542

File tree

1 file changed

+15
-0
lines changed
  • api_drivers/common_api_drivers/display/hx8369

1 file changed

+15
-0
lines changed

api_drivers/common_api_drivers/display/hx8369/hx8369.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,23 @@
1414
BYTE_ORDER_BGR = display_driver_framework.BYTE_ORDER_BGR
1515

1616

17+
_MADCTL_MH = const(0x04) # Refresh 0=Left to Right, 1=Right to Left
18+
_MADCTL_BGR = const(0x08) # BGR color order
19+
_MADCTL_ML = const(0x10) # Refresh 0=Top to Bottom, 1=Bottom to Top
20+
_MADCTL_MV = const(0x20) # 0=Normal, 1=Row/column exchange
21+
_MADCTL_MX = const(0x40) # 0=Left to Right, 1=Right to Left
22+
_MADCTL_MY = const(0x80) # 0=Top to Bottom, 1=Bottom to Top
23+
24+
1725
class HX8369(display_driver_framework.DisplayDriver):
1826

27+
_ORIENTATION_TABLE = (
28+
0,
29+
_MADCTL_MX | _MADCTL_MV,
30+
_MADCTL_MY | _MADCTL_MX,
31+
_MADCTL_MY | _MADCTL_MV
32+
)
33+
1934
def reset(self):
2035
if self._reset_pin is None:
2136
return

0 commit comments

Comments
 (0)