Skip to content

Commit 7eba78b

Browse files
authored
Merge pull request #3 from makermelissa/main
Add 2.8" round and 4.0" 480x480 square displays
2 parents 73638a9 + cac6b42 commit 7eba78b

File tree

2 files changed

+187
-0
lines changed

2 files changed

+187
-0
lines changed

adafruit_qualia/displays/round28.py

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
# SPDX-FileCopyrightText: Copyright (c) 2023 Melissa LeBlanc-Williams for Adafruit Industries
3+
#
4+
# SPDX-License-Identifier: MIT
5+
6+
"""
7+
`adafruit_qualia.displays.round28`
8+
================================================================================
9+
10+
2.8" 480x480 Round DotClock Display Class
11+
12+
13+
* Author(s): Melissa LeBlanc-Williams
14+
15+
Implementation Notes
16+
--------------------
17+
18+
**Hardware:**
19+
20+
* `Round RGB 666 TTL TFT Display - 2.8" 480x480 - No Touch
21+
<https://www.adafruit.com/product/5852>`_
22+
23+
"""
24+
25+
from . import DotClockDisplay
26+
27+
28+
class Round28(DotClockDisplay):
29+
"""TL028WVC01 display driver"""
30+
31+
def __init__(self):
32+
super().__init__()
33+
self._init_sequence = bytes(
34+
(
35+
b"\xff\x05w\x01\x00\x00\x13"
36+
b"\xef\x01\x08"
37+
b"\xff\x05w\x01\x00\x00\x10"
38+
b"\xc0\x02;\x00"
39+
b"\xc1\x02\x10\x0c"
40+
b"\xc2\x02\x07\n"
41+
b"\xc7\x01\x00"
42+
b"\xcc\x01\x10"
43+
b"\xcd\x01\x08"
44+
b"\xb0\x10\x05\x12\x98\x0e\x0f\x07\x07\t\t#\x05R\x0fg,\x11"
45+
b'\xb1\x10\x0b\x11\x97\x0c\x12\x06\x06\x08\x08"\x03Q\x11f+\x0f'
46+
b"\xff\x05w\x01\x00\x00\x11"
47+
b"\xb0\x01]"
48+
b"\xb1\x01-"
49+
b"\xb2\x01\x81"
50+
b"\xb3\x01\x80"
51+
b"\xb5\x01N"
52+
b"\xb7\x01\x85"
53+
b"\xb8\x01 "
54+
b"\xc1\x01x"
55+
b"\xc2\x01x"
56+
b"\xd0\x01\x88"
57+
b"\xe0\x03\x00\x00\x02"
58+
b"\xe1\x0b\x060\x080\x050\x070\x0033"
59+
b"\xe2\x0c\x11\x1133\xf4\x00\x00\x00\xf4\x00\x00\x00"
60+
b"\xe3\x04\x00\x00\x11\x11"
61+
b"\xe4\x02DD"
62+
b"\xe5\x10\r\xf50\xf0\x0f\xf70\xf0\t\xf10\xf0\x0b\xf30\xf0"
63+
b"\xe6\x04\x00\x00\x11\x11"
64+
b"\xe7\x02DD"
65+
b"\xe8\x10\x0c\xf40\xf0\x0e\xf60\xf0\x08\xf00\xf0\n\xf20\xf0"
66+
b"\xe9\x026\x01"
67+
b"\xeb\x07\x00\x01\xe4\xe4D\x88@"
68+
b"\xed\x10\xff\x10\xafvT+\xcf\xff\xff\xfc\xb2Eg\xfa\x01\xff"
69+
b"\xef\x06\x08\x08\x08E?T"
70+
b"\xff\x05w\x01\x00\x00\x00"
71+
b"\x11\x80x"
72+
b":\x01f"
73+
b"6\x01\x00"
74+
b"5\x01\x00"
75+
b")\x802"
76+
)
77+
)
78+
79+
self._timings = {
80+
"frequency": 15_000_000,
81+
"width": 480,
82+
"height": 480,
83+
"hsync_pulse_width": 2,
84+
"hsync_back_porch": 10,
85+
"hsync_front_porch": 10,
86+
"hsync_idle_low": False,
87+
"vsync_pulse_width": 6,
88+
"vsync_back_porch": 10,
89+
"vsync_front_porch": 10,
90+
"vsync_idle_low": False,
91+
"pclk_active_high": True,
92+
"pclk_idle_high": False,
93+
"de_idle_high": False,
94+
}
95+
96+
self._round = True
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
# SPDX-FileCopyrightText: Copyright (c) 2023 Melissa LeBlanc-Williams for Adafruit Industries
3+
#
4+
# SPDX-License-Identifier: MIT
5+
6+
"""
7+
`adafruit_qualia.displays.round40_480x480`
8+
================================================================================
9+
10+
4" 480x480 Square DotClock Display Class
11+
12+
13+
* Author(s): Melissa LeBlanc-Williams
14+
15+
Implementation Notes
16+
--------------------
17+
18+
**Hardware:**
19+
20+
* `Square RGB TTL TFT Display - 4" 480x480 - with Capacitive Touch
21+
<https://www.adafruit.com/product/5826>`_
22+
* `Square RGB TTL TFT Display - 4" 480x480 - No Touchscreen
23+
<https://www.adafruit.com/product/5827>`_
24+
"""
25+
26+
from . import DotClockDisplay
27+
28+
29+
class Square40_480x480(DotClockDisplay):
30+
"""TL040WVS03 display driver"""
31+
32+
def __init__(self):
33+
super().__init__()
34+
self._init_sequence = bytes(
35+
(
36+
b"\xff\x05w\x01\x00\x00\x10"
37+
b"\xc0\x02;\x00"
38+
b"\xc1\x02\r\x02"
39+
b"\xc2\x021\x05"
40+
b"\xcd\x01\x08"
41+
b'\xb0\x10\x00\x11\x18\x0e\x11\x06\x07\x08\x07"\x04\x12\x0f\xaa1\x18'
42+
b'\xb1\x10\x00\x11\x19\x0e\x12\x07\x08\x08\x08"\x04\x11\x11\xa92\x18'
43+
b"\xff\x05w\x01\x00\x00\x11"
44+
b"\xb0\x01`"
45+
b"\xb1\x012"
46+
b"\xb2\x01\x07"
47+
b"\xb3\x01\x80"
48+
b"\xb5\x01I"
49+
b"\xb7\x01\x85"
50+
b"\xb8\x01!"
51+
b"\xc1\x01x"
52+
b"\xc2\x01x"
53+
b"\xe0\x03\x00\x1b\x02"
54+
b"\xe1\x0b\x08\xa0\x00\x00\x07\xa0\x00\x00\x00DD"
55+
b"\xe2\x0c\x11\x11DD\xed\xa0\x00\x00\xec\xa0\x00\x00"
56+
b"\xe3\x04\x00\x00\x11\x11"
57+
b"\xe4\x02DD"
58+
b"\xe5\x10\n\xe9\xd8\xa0\x0c\xeb\xd8\xa0\x0e\xed\xd8\xa0\x10\xef\xd8\xa0"
59+
b"\xe6\x04\x00\x00\x11\x11"
60+
b"\xe7\x02DD"
61+
b"\xe8\x10\t\xe8\xd8\xa0\x0b\xea\xd8\xa0\r\xec\xd8\xa0\x0f\xee\xd8\xa0"
62+
b"\xeb\x07\x02\x00\xe4\xe4\x88\x00@"
63+
b"\xec\x02<\x00"
64+
b"\xed\x10\xab\x89vT\x02\xff\xff\xff\xff\xff\xff Eg\x98\xba"
65+
b"6\x01\x00"
66+
b"\xff\x05w\x01\x00\x00\x13"
67+
b"\xe5\x01\xe4"
68+
b"\xff\x05w\x01\x00\x00\x00"
69+
b":\x01f"
70+
b"!\x80\n"
71+
b"\x11\x80x"
72+
b")\x00"
73+
)
74+
)
75+
76+
self._timings = {
77+
"frequency": 16000000,
78+
"width": 480,
79+
"height": 480,
80+
"hsync_pulse_width": 2,
81+
"hsync_back_porch": 44,
82+
"hsync_front_porch": 50,
83+
"hsync_idle_low": False,
84+
"vsync_pulse_width": 2,
85+
"vsync_back_porch": 18,
86+
"vsync_front_porch": 16,
87+
"vsync_idle_low": False,
88+
"pclk_active_high": True,
89+
"pclk_idle_high": False,
90+
"de_idle_high": False,
91+
}

0 commit comments

Comments
 (0)