|
32 | 32 |
|
33 | 33 | **Hardware:**
|
34 | 34 |
|
35 |
| -.. todo:: Add links to any specific hardware product page(s), or category page(s). Use unordered list & hyperlink rST |
| 35 | +.. todo:: Add links to any specific hardware product page(s), or category page(s). |
| 36 | + Use unordered list & hyperlink rST |
36 | 37 | inline format: "* `Link Text <url>`_"
|
37 | 38 |
|
38 | 39 | **Software and Dependencies:**
|
|
47 | 48 | __version__ = "0.0.0-auto.0"
|
48 | 49 | __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_ILI9341.git"
|
49 | 50 |
|
50 |
| -init_sequence = (b"\x01\x80\x80"# Software reset then delay 0x78 (120ms) |
51 |
| - b"\xEF\x03\x03\x80\x02" |
52 |
| - b"\xCF\x03\x00\xC1\x30" |
53 |
| - b"\xED\x04\x64\x03\x12\x81" |
54 |
| - b"\xE8\x03\x85\x00\x78" |
55 |
| - b"\xCB\x05\x39\x2C\x00\x34\x02" |
56 |
| - b"\xF7\x01\x20" |
57 |
| - b"\xEA\x02\x00\x00" |
58 |
| - b"\xc0\x01\x23" # Power control VRH[5:0] |
59 |
| - b"\xc1\x01\x10" # Power control SAP[2:0];BT[3:0] |
60 |
| - b"\xc5\x02\x3e\x28" # VCM control |
61 |
| - b"\xc7\x01\x86" # VCM control2 |
62 |
| - b"\x36\x01\x38" # Memory Access Control |
63 |
| - b"\x37\x01\x00" # Vertical scroll zero |
64 |
| - b"\x3a\x01\x55" # COLMOD: Pixel Format Set |
65 |
| - b"\xb1\x02\x00\x18" # Frame Rate Control (In Normal Mode/Full Colors) |
66 |
| - b"\xb6\x03\x08\x82\x27" # Display Function Control |
67 |
| - b"\xF2\x01\x00" # 3Gamma Function Disable |
68 |
| - b"\x26\x01\x01" # Gamma curve selected |
69 |
| - b"\xe0\x0f\x0F\x31\x2B\x0C\x0E\x08\x4E\xF1\x37\x07\x10\x03\x0E\x09\x00" # Set Gamma |
70 |
| - b"\xe1\x0f\x00\x0E\x14\x03\x11\x07\x31\xC1\x48\x08\x0F\x0C\x31\x36\x0F" # Set Gamma |
71 |
| - b"\x11\x80\x78"# Exit Sleep then delay 0x78 (120ms) |
72 |
| - b"\x29\x80\x78"# Display on then delay 0x78 (120ms) |
73 |
| - ) |
| 51 | +_INIT_SEQUENCE = ( |
| 52 | + b"\x01\x80\x80"# Software reset then delay 0x78 (120ms) |
| 53 | + b"\xEF\x03\x03\x80\x02" |
| 54 | + b"\xCF\x03\x00\xC1\x30" |
| 55 | + b"\xED\x04\x64\x03\x12\x81" |
| 56 | + b"\xE8\x03\x85\x00\x78" |
| 57 | + b"\xCB\x05\x39\x2C\x00\x34\x02" |
| 58 | + b"\xF7\x01\x20" |
| 59 | + b"\xEA\x02\x00\x00" |
| 60 | + b"\xc0\x01\x23" # Power control VRH[5:0] |
| 61 | + b"\xc1\x01\x10" # Power control SAP[2:0];BT[3:0] |
| 62 | + b"\xc5\x02\x3e\x28" # VCM control |
| 63 | + b"\xc7\x01\x86" # VCM control2 |
| 64 | + b"\x36\x01\x38" # Memory Access Control |
| 65 | + b"\x37\x01\x00" # Vertical scroll zero |
| 66 | + b"\x3a\x01\x55" # COLMOD: Pixel Format Set |
| 67 | + b"\xb1\x02\x00\x18" # Frame Rate Control (In Normal Mode/Full Colors) |
| 68 | + b"\xb6\x03\x08\x82\x27" # Display Function Control |
| 69 | + b"\xF2\x01\x00" # 3Gamma Function Disable |
| 70 | + b"\x26\x01\x01" # Gamma curve selected |
| 71 | + b"\xe0\x0f\x0F\x31\x2B\x0C\x0E\x08\x4E\xF1\x37\x07\x10\x03\x0E\x09\x00" # Set Gamma |
| 72 | + b"\xe1\x0f\x00\x0E\x14\x03\x11\x07\x31\xC1\x48\x08\x0F\x0C\x31\x36\x0F" # Set Gamma |
| 73 | + b"\x11\x80\x78"# Exit Sleep then delay 0x78 (120ms) |
| 74 | + b"\x29\x80\x78"# Display on then delay 0x78 (120ms) |
| 75 | +) |
74 | 76 |
|
| 77 | +# pylint: disable=too-few-public-methods |
75 | 78 | class ILI9341(displayio.Display):
|
76 | 79 | """ILI9341 display driver"""
|
77 | 80 | def __init__(self, bus):
|
|
0 commit comments