Skip to content

Commit a099759

Browse files
committed
docs: update document
Signed-off-by: lbuque <1102390310@qq.com>
1 parent b1433fb commit a099759

32 files changed

+1090
-114
lines changed

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,42 @@ The following display driver ICs are supported:
2222

2323
- Support for ST7789 displays
2424
- Support for ST7701 displays (based on [esp_lcd](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/lcd.html))
25+
- Support for ST7735 displays
26+
- Support for ILI9488 displays
27+
- Support for RM67162 displays
2528

2629
Supported boards:
2730

2831
- [LILYGO T-DisplayS3](https://github.com/Xinyuan-LilyGO/T-Display-S3)
2932
- [LILYGO T-RGB](https://github.com/Xinyuan-LilyGO/T-RGB)
3033
- [LILYGO T-Display](https://github.com/Xinyuan-LilyGO/TTGO-T-Display)
34+
- [LILYGO T-Wristband](https://github.com/Xinyuan-LilyGO/T-Wristband)
35+
- [LILYGO T-DisplayS3-AMOLED](https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED)
36+
37+
| Driver IC | Hardware SPI | Software SPI | Hardware QSPI | I8080 | DPI(RGB) |
38+
| --------- | ---------------- | ---------------- | ---------------- | ---------------- | ---------------- |
39+
| ESP32 | [![alt text][1]] | [![alt text][4]] | [![alt text][1]] | [![alt text][1]] | [![alt text][2]] |
40+
| ESP32-C3 | [![alt text][3]] | [![alt text][4]] | [![alt text][3]] | [![alt text][2]] | [![alt text][2]] |
41+
| ESP32-S2 | [![alt text][3]] | [![alt text][4]] | [![alt text][3]] | [![alt text][3]] | [![alt text][2]] |
42+
| ESP32-S3 | [![alt text][1]] | [![alt text][4]] | [![alt text][1]] | [![alt text][1]] | [![alt text][1]] |
43+
44+
[1]: https://camo.githubusercontent.com/bd5f5f82b920744ff961517942e99a46699fee58737cd9b31bf56e5ca41b781b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d737570706f727465642d677265656e
45+
[2]: https://img.shields.io/badge/-not%20support-lightgrey
46+
[3]: https://img.shields.io/badge/-untested-red
47+
[4]: https://img.shields.io/badge/-todo-blue
3148

3249
## Documentation
3350

3451
API documentation for this library can be found on [Read the Docs](https://lcd-binding-micropython.readthedocs.io/en/latest/).
3552

36-
## References
53+
## More
3754

38-
- [st7789s3_mpy](https://github.com/russhughes/st7789s3_mpy)
55+
If you need to support more screens, please provide corresponding hardware.
3956

40-
## Future plans
57+
# Related Repositories
4158

42-
- [ ] ST7735
43-
- [x] api documentation (2022/11/13)
59+
- [framebuf-plus](https://github.com/lbuque/framebuf-plus)
60+
61+
## References
62+
63+
- [st7789s3_mpy](https://github.com/russhughes/st7789s3_mpy)

docs/en/lcd.I8080.rst renamed to docs/en/api-reference/lcd.I8080.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The I8080 class implements the general control and access interface of the I8080
66
Constructors
77
------------
88

9-
.. class:: I8080(data: tuple=None, command: Pin=None, write: Pin=None, read: Pin=None, cs: Pin=None, pclk: int= 10000000width: int=240, height: int=240, swap_color_bytes: bool=False, cmd_bits: int=8, param_bits: int=8)
9+
.. class:: I8080(data: tuple=None, command: Pin=None, write: Pin=None, read: Pin=None, cs: Pin=None, pclk: int= 10000000, width: int=240, height: int=240, swap_color_bytes: bool=False, cmd_bits: int=8, param_bits: int=8)
1010

1111
Create an Intel 8080 object.
1212

docs/en/api-reference/lcd.ILI9488.rst

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
class ILI9488 -- ILITEK ILI9488 abstract classes
2+
=================================================
3+
4+
The ILI9488 class is the ILITEK ILI9488 hardware abstraction class, which implements some common interfaces of the ILI9488.
5+
6+
Constructors
7+
------------
8+
9+
.. class:: ILI9488(bus: I8080, reset: Pin=None, backlight: Pin=None, reset_level: bool=false, color_space: int=RGB, bpp: int=16)
10+
11+
Create an ILI9488 hardware abstraction class.
12+
13+
These parameters are:
14+
15+
- ``bus``: I8080 obj
16+
- ``reset``: Pin used to reset the LCD panel, set to None if it’s not used
17+
- ``backlight``: Pin used for backlight signal
18+
- ``reset_level``: Setting this if the panel reset is high level active
19+
- ``color_space``: Set the color space used by the LCD panel
20+
- ``bpp``: Color depth, in bpp
21+
22+
Methods
23+
-------
24+
25+
.. method:: ILI9488.reset()
26+
27+
Reset LCD panel.
28+
29+
.. method:: ILI9488.init()
30+
31+
Initialize LCD panel.
32+
33+
.. note::
34+
35+
Before calling this method, make sure the LCD panel has finished the reset stage by ILI9488.reset().
36+
37+
.. method:: ILI9488.bitmap(x_start: int, y_start: int, x_end: int, y_end: int, color_data: bytes=None)
38+
39+
Draw bitmap on LCD panel.
40+
41+
The arguments are:
42+
43+
- ``x_start`` - Start index on x-axis (x_start included)
44+
- ``y_start`` - Start index on y-axis (y_start included)
45+
- ``x_end`` - End index on x-axis (x_end not included)
46+
- ``y_end`` - End index on y-axis (y_end not included)
47+
- ``color_data`` - RGB color data that will be dumped to the specific window range
48+
49+
.. method:: ILI9488.mirror(mirror_x: bool, mirror_y: bool)
50+
51+
Mirror the LCD panel on specific axis.
52+
53+
The arguments are:
54+
55+
- ``mirror_x`` - Whether the panel will be mirrored about the x axis
56+
- ``mirror_y`` - Whether the panel will be mirrored about the y axis
57+
58+
.. note::
59+
60+
Combined with ILI9488.swap_xy(), one can realize screen rotation
61+
62+
.. method:: ILI9488.swap_xy(swap_axes: bool)
63+
64+
Swap/Exchange x and y axis.
65+
66+
- ``swap_axes`` - Whether to swap the x and y axis
67+
68+
.. note::
69+
70+
Combined with ILI9488.mirror(), one can realize screen rotation
71+
72+
.. method:: ILI9488.set_gap(x_gap: int, y_gap: int)
73+
74+
Set extra gap in x and y axis.
75+
76+
The gap is the space (in pixels) between the left/top sides of the LCD panel and the first row/column respectively of the actual contents displayed.
77+
78+
The arguments are:
79+
80+
- ``x_gap`` - Extra gap on x axis, in pixels
81+
- ``y_gap`` - Extra gap on y axis, in pixels
82+
83+
.. note::
84+
85+
Setting a gap is useful when positioning or centering a frame that is smaller than the LCD.
86+
87+
.. method:: ILI9488.invert_color(invert_color_data: bool)
88+
89+
Invert the color (bit-wise invert the color data line)
90+
91+
- ``invert_color_data`` - Whether to invert the color data
92+
93+
.. method:: ILI9488.disp_off(off: bool)
94+
95+
Turn off the display.
96+
97+
- ``off`` - Whether to turn off the screen
98+
99+
.. method:: ILI9488.backlight_on()
100+
101+
Turn on the backlight
102+
103+
.. method:: ILI9488.backlight_off()
104+
105+
turn off the backlight.
106+
107+
.. method:: ILI9488.color565(red: int, green: int, blue: int)
108+
109+
Convert RGB888 color data to RGB565.
110+
111+
.. method:: ILI9488.deint()
112+
113+
Deinitialize the LCD panel.
114+
115+
.. method:: ILI9488.rotation(r: int)
116+
117+
Set the rotates the logical display in a counter-clockwise direction.
118+
119+
The ``r`` parameter accepts only the following values:
120+
121+
- ``0``: Portrait (0 degrees)
122+
- ``1``: Landscape (90 degrees)
123+
- ``2``: Inverse Portrait (180 degrees)
124+
- ``3``: Inverse Landscape (270 degrees)
125+
126+
``rotations`` sets the orientation table. The orientation table is a list of
127+
tuples for each ``rotation`` used to set the MADCTL register, display width,
128+
display height, start_x, and start_y values.
129+
130+
+---------+----------------------------------------------------------------------------------------------------------+
131+
| Display | Default Orientation Tables |
132+
+=========+==========================================================================================================+
133+
| 240x320 | ((0x00, 240, 320, 0, 0), (0x60, 320, 240, 0, 0), (0xc0, 240, 320, 0, 0), (0xa0, 320, 240, 0, 0)) |
134+
+---------+----------------------------------------------------------------------------------------------------------+
135+
| 170x320 | ((0x00, 170, 320, 35, 0), (0x60, 320, 170, 0, 35), (0xc0, 170, 320, 35, 0), (0xa0, 320, 170, 0, 35)) |
136+
+---------+----------------------------------------------------------------------------------------------------------+
137+
| 240x240 | ((0x00, 240, 240, 0, 0), (0x60, 240, 240, 0, 0), (0xc0, 240, 240, 0, 80), (0xa0, 240, 240, 80, 0)) |
138+
+---------+----------------------------------------------------------------------------------------------------------+
139+
| 135x240 | ((0x00, 135, 240, 52, 40), (0x60, 240, 135, 40, 53), (0xc0, 135, 240, 53, 40), (0xa0, 240, 135, 40, 52)) |
140+
+---------+----------------------------------------------------------------------------------------------------------+
141+
| 128x160 | ((0x00, 128, 160, 0, 0), (0x60, 160, 128, 0, 0), (0xc0, 128, 160, 0, 0), (0xa0, 160, 128, 0, 0)) |
142+
+---------+----------------------------------------------------------------------------------------------------------+
143+
| 128x128 | ((0x00, 128, 128, 2, 1), (0x60, 128, 128, 1, 2), (0xc0, 128, 128, 2, 3), (0xa0, 128, 128, 3, 2)) |
144+
+---------+----------------------------------------------------------------------------------------------------------+
145+
| other | ((0x00, 0, 0, 0, 0), (0x60, 0, 0, 0, 0), (0xc0, 0, 0, 0, 0), (0xa0, 0, 0, 0, 0)) |
146+
+---------+----------------------------------------------------------------------------------------------------------+

docs/en/lcd.RGB.rst renamed to docs/en/api-reference/lcd.RGB.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
class RGB -- RGB Interface
1+
class DPI -- DPI Interface
22
===========================
33

4-
The RGB class is the RGB parallel interface hardware abstract class, which implements some common interfaces of RGB.
4+
The DPI(RGB) class is the DPI(RGB) parallel interface hardware abstract class, which implements some common interfaces of DPI.
55

66
Constructors
77
------------
88

9-
.. class:: RGB(data: tuple, hsync: Pin, vsync: Pin, de: Pin, pclk_pin: Pin, timings: tuple, disp: Pin=None, backlight: Pin=None, pclk: int=8000000, width: int=480, height: int=480)
9+
.. class:: DPI(data: tuple, hsync: Pin, vsync: Pin, de: Pin, pclk_pin: Pin, timings: tuple, disp: Pin=None, backlight: Pin=None, pclk: int=8000000, width: int=480, height: int=480)
1010

11-
Create an RGB hardware abstract class.
11+
Create an DPI hardware abstract class.
1212

1313
These parameters are:
1414

@@ -39,19 +39,19 @@ Constructors
3939
Methods
4040
-------
4141

42-
.. method:: RGB.reset()
42+
.. method:: DPI.reset()
4343

4444
Reset LCD panel.
4545

46-
.. method:: RGB.init()
46+
.. method:: DPI.init()
4747

4848
Initialize LCD panel.
4949

5050
.. note::
5151

52-
Before calling this method, make sure the LCD panel has finished the reset stage by RGB.reset().
52+
Before calling this method, make sure the LCD panel has finished the reset stage by DPI.reset().
5353

54-
.. method:: RGB.bitmap(x_start, y_start, x_end, y_end, color_data)
54+
.. method:: DPI.bitmap(x_start, y_start, x_end, y_end, color_data)
5555

5656
Draw bitmap on LCD panel.
5757

@@ -63,7 +63,7 @@ Methods
6363
- ``y_end`` - End index on y-axis (y_end not included)
6464
- ``color_data`` - RGB color data that will be dumped to the specific window range
6565

66-
.. method:: RGB.mirror(mirror_x: bool, mirror_y: bool)
66+
.. method:: DPI.mirror(mirror_x: bool, mirror_y: bool)
6767

6868
Mirror the LCD panel on specific axis.
6969

@@ -74,19 +74,19 @@ Methods
7474

7575
.. note::
7676

77-
Combined with RGB.swap_xy(), one can realize screen rotation
77+
Combined with DPI.swap_xy(), one can realize screen rotation
7878

79-
.. method:: RGB.swap_xy(swap_axes: bool)
79+
.. method:: DPI.swap_xy(swap_axes: bool)
8080

8181
Swap/Exchange x and y axis.
8282

8383
- ``swap_axes`` - Whether to swap the x and y axis
8484

8585
.. note::
8686

87-
Combined with RGB.mirror(), one can realize screen rotation
87+
Combined with DPI.mirror(), one can realize screen rotation
8888

89-
.. method:: RGB.set_gap(x_gap: int, y_gap: int)
89+
.. method:: DPI.set_gap(x_gap: int, y_gap: int)
9090

9191
Set extra gap in x and y axis.
9292

@@ -101,26 +101,26 @@ Methods
101101

102102
Setting a gap is useful when positioning or centering a frame that is smaller than the LCD.
103103

104-
.. method:: RGB.invert_color(invert_color_data: bool)
104+
.. method:: DPI.invert_color(invert_color_data: bool)
105105

106106
Invert the color (bit-wise invert the color data line)
107107

108108
- ``invert_color_data`` - Whether to invert the color data
109109

110-
.. method:: RGB.disp_off(off: bool)
110+
.. method:: DPI.disp_off(off: bool)
111111

112112
Turn off the display.
113113

114114
- ``off`` - Whether to turn off the screen
115115

116-
.. method:: RGB.backlight_on()
116+
.. method:: DPI.backlight_on()
117117

118118
Turn on the backlight.
119119

120-
.. method:: RGB.backlight_off()
120+
.. method:: DPI.backlight_off()
121121

122122
turn off the backlight.
123123

124-
.. method:: RGB.deint()
124+
.. method:: DPI.deint()
125125

126126
Deinitialize the LCD panel.

0 commit comments

Comments
 (0)