|
10 | 10 | """ |
11 | 11 | from micropython import const |
12 | 12 |
|
13 | | -from st77xx import St77xx_hw, St77xx_lvgl |
| 13 | +import st77xx |
14 | 14 |
|
15 | 15 | # Command constants from ILI9341 datasheet |
16 | 16 | _NOP = const(0x00) # No-op |
|
87 | 87 | const(_MADCTL_MX | _MADCTL_MY | _MADCTL_MV), # 3 = inverted landscape |
88 | 88 | ) |
89 | 89 |
|
90 | | -ILI9XXX_PORTRAIT = const(0) |
91 | | -ILI9XXX_LANDSCAPE = const(1) |
92 | | -ILI9XXX_INV_PORTRAIT = const(2) |
93 | | -ILI9XXX_INV_LANDSCAPE = const(3) |
| 90 | +ILI9XXX_PORTRAIT = st77xx.ST77XX_PORTRAIT |
| 91 | +ILI9XXX_LANDSCAPE = st77xx.ST77XX_LANDSCAPE |
| 92 | +ILI9XXX_INV_PORTRAIT = st77xx.ST77XX_INV_PORTRAIT |
| 93 | +ILI9XXX_INV_LANDSCAPE = st77xx.ST77XX_INV_LANDSCAPE |
94 | 94 |
|
95 | 95 |
|
96 | | -class Ili9341_hw(St77xx_hw): |
| 96 | +class Ili9341_hw(st77xx.St77xx_hw): |
97 | 97 | def __init__(self, **kw): |
98 | 98 | """ILI9341 TFT Display Driver. |
99 | 99 |
|
@@ -156,12 +156,12 @@ def apply_rotation(self, rot): |
156 | 156 | ) |
157 | 157 |
|
158 | 158 |
|
159 | | -class Ili9341(Ili9341_hw, St77xx_lvgl): |
| 159 | +class Ili9341(Ili9341_hw, st77xx.St77xx_lvgl): |
160 | 160 | def __init__(self, doublebuffer=True, factor=4, **kw): |
161 | 161 | """See :obj:`Ili9341_hw` for the meaning of the parameters.""" |
162 | 162 | import lvgl as lv |
163 | 163 |
|
164 | 164 | Ili9341_hw.__init__(self, **kw) |
165 | | - St77xx_lvgl.__init__(self, doublebuffer, factor) |
| 165 | + st77xx.St77xx_lvgl.__init__(self, doublebuffer, factor) |
166 | 166 | self.disp_drv.color_format = lv.COLOR_FORMAT.NATIVE_REVERSE |
167 | 167 | self.disp_drv.register() |
0 commit comments