Skip to content

Commit 2713076

Browse files
committed
Improve docs; define ILI9XXX orientations
1 parent cb0c758 commit 2713076

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

driver/generic/ili9xxx.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
from micropython import const
1+
"""Generic ILI9xxx drivers.
2+
3+
This code is licensed under MIT license.
4+
5+
Adapted from:
6+
https://github.com/rdagger/micropython-ili9341
27
3-
from .st77xx import St77xx_hw, St77xx_lvgl
8+
TODO:
9+
* Usage information.
10+
"""
11+
from micropython import const
12+
from st77xx import St77xx_hw, St77xx_lvgl
413

514
# Command constants from ILI9341 datasheet
615
_NOP = const(0x00) # No-op
@@ -77,9 +86,18 @@
7786
const(_MADCTL_MX | _MADCTL_MY | _MADCTL_MV), # 3 = inverted landscape
7887
)
7988

89+
ILI9XXX_PORTRAIT = const(0)
90+
ILI9XXX_LANDSCAPE = const(1)
91+
ILI9XXX_INV_PORTRAIT = const(2)
92+
ILI9XXX_INV_LANDSCAPE = const(3)
93+
8094

8195
class Ili9341_hw(St77xx_hw):
8296
def __init__(self, res, **kw):
97+
"""ILI9341 TFT Display Driver.
98+
99+
Requires ``LV_COLOR_DEPTH=16`` when building lv_micropython to function.
100+
"""
83101
super().__init__(
84102
res=res,
85103
suppRes=[

0 commit comments

Comments
 (0)