Skip to content

Commit 191c0ce

Browse files
committed
Add usage example to ili9xxx header
1 parent 76020bc commit 191c0ce

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

driver/generic/ili9xxx.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
Adapted from:
66
https://github.com/rdagger/micropython-ili9341
77
8-
TODO:
9-
* Usage information.
8+
The following code snippet will instantiate the driver and
9+
automatically register it to lvgl. Adjust the SPI bus and
10+
pin configurations to match your hardware setup::
11+
12+
import ili9xxx
13+
from machine import SPI, Pin
14+
spi = SPI(0, baudrate=24_000_000, sck=Pin(18), mosi=Pin(19), miso=Pin(16))
15+
drv = ili9xxx.Ili9341(spi=spi, dc=15, cs=17, rst=14)
1016
"""
1117
from micropython import const
1218

0 commit comments

Comments
 (0)