Skip to content

Commit 07c7405

Browse files
committed
adds rm67162 display driver
1 parent e5a1400 commit 07c7405

File tree

1 file changed

+8
-8
lines changed
  • api_drivers/common_api_drivers/display/rm67162

1 file changed

+8
-8
lines changed

api_drivers/common_api_drivers/display/rm67162/rm67162.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
BYTE_ORDER_RGB = display_driver_framework.BYTE_ORDER_RGB
1515
BYTE_ORDER_BGR = display_driver_framework.BYTE_ORDER_BGR
1616

17-
18-
_MADCTL_MY = const(0x01) # mirror y
19-
_MADCTL_MX = const(0x02) # mirror x
17+
_MADCTL_MY = const(0x80) # Decreasing in vertical
18+
_MADCTL_MX = const(0x60) # Increasing in horizontal
2019
_MADCTL_MV = const(0x20) # x, y = y, x
21-
20+
_MADCTL_MYRS = const(0x01) # mirror y
21+
_MADCTL_MXRS = const(0x02) # mirror x
2222

2323
# Write Display Brightness
2424
# 0 to 255
@@ -42,10 +42,10 @@
4242

4343
class RM67162(display_driver_framework.DisplayDriver):
4444
_ORIENTATION_TABLE = (
45-
0x00,
46-
_MADCTL_MV,
47-
_MADCTL_MY | _MADCTL_MX,
48-
_MADCTL_MY | _MADCTL_MX | _MADCTL_MV
45+
_MADCTL_MX,
46+
_MADCTL_MX & ~_MADCTL_MV,
47+
_MADCTL_MX | _MADCTL_MYRS | _MADCTL_MXRS,
48+
_MADCTL_MX | _MADCTL_MYRS | _MADCTL_MXRS & ~_MADCTL_MV
4949
)
5050

5151
def __init__(

0 commit comments

Comments
 (0)