Merge pull request #4 from makermelissa/master

Fixed comment on amount of delay to be accurate
This commit is contained in:
Melissa LeBlanc-Williams 2019-03-20 08:00:25 -07:00 committed by GitHub
commit 8d28c289f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 15 deletions

View file

@ -13,7 +13,7 @@ Introduction
:target: https://travis-ci.com/adafruit/Adafruit_CircuitPython_ILI9341
:alt: Build Status
.. todo:: Describe what the library does.
displayio driver for ILI9341 and ILI9340 TFT-LCD displays.
Dependencies
=============
@ -28,7 +28,41 @@ This is easily achieved by downloading
Usage Example
=============
.. todo:: Add a quick, simple example. It and other examples should live in the examples folder and be included in docs/examples.rst.
.. code-block:: python
import board
import displayio
import adafruit_ili9341
spi = board.SPI()
tft_cs = board.D9
tft_dc = board.D10
displayio.release_displays()
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs)
display = adafruit_ili9341.ILI9341(display_bus)
# Make the display context
splash = displayio.Group(max_size=10)
display.show(splash)
color_bitmap = displayio.Bitmap(320, 240, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0xFF0000
try:
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
position=(0, 0))
except TypeError:
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
x=0, y=0)
splash.append(bg_sprite)
while True:
pass
Contributing
============

View file

@ -20,7 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
"""
`adafruit_ILI9341`
`adafruit_ili9341`
====================================================
Display driver for ILI9341
@ -32,9 +32,16 @@ Implementation Notes
**Hardware:**
.. todo:: Add links to any specific hardware product page(s), or category page(s).
Use unordered list & hyperlink rST
inline format: "* `Link Text <url>`_"
* 2.2" 18-bit color TFT LCD display with microSD card breakout
<https://www.adafruit.com/product/1480>
* 2.4" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket
<https://www.adafruit.com/product/2478>
* 2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket
<https://www.adafruit.com/product/1770>
* 3.2" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket
<https://www.adafruit.com/product/1743>
* TFT FeatherWing - 2.4" 320x240 Touchscreen For All Feathers
<https://www.adafruit.com/product/3315>
**Software and Dependencies:**
@ -49,7 +56,7 @@ __version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_ILI9341.git"
_INIT_SEQUENCE = (
b"\x01\x80\x80"# Software reset then delay 0x78 (120ms)
b"\x01\x80\x80" # Software reset then delay 0x80 (128ms)
b"\xEF\x03\x03\x80\x02"
b"\xCF\x03\x00\xC1\x30"
b"\xED\x04\x64\x03\x12\x81"
@ -70,8 +77,8 @@ _INIT_SEQUENCE = (
b"\x26\x01\x01" # Gamma curve selected
b"\xe0\x0f\x0F\x31\x2B\x0C\x0E\x08\x4E\xF1\x37\x07\x10\x03\x0E\x09\x00" # Set Gamma
b"\xe1\x0f\x00\x0E\x14\x03\x11\x07\x31\xC1\x48\x08\x0F\x0C\x31\x36\x0F" # Set Gamma
b"\x11\x80\x78"# Exit Sleep then delay 0x78 (120ms)
b"\x29\x80\x78"# Display on then delay 0x78 (120ms)
b"\x11\x80\x78" # Exit Sleep then delay 0x78 (120ms)
b"\x29\x80\x78" # Display on then delay 0x78 (120ms)
)
# pylint: disable=too-few-public-methods

View file

@ -21,7 +21,7 @@ extensions = [
# digitalio, micropython and busio. List the modules you use. Without it, the
# autodoc module docs will fail to generate with a warning.
# autodoc_mock_imports = ["digitalio", "busio"]
autodoc_mock_imports = ["displayio"]
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}

View file

@ -23,14 +23,14 @@ Table of Contents
.. toctree::
:caption: Tutorials
.. todo:: Add any Learn guide links here. If there are none, then simply delete this todo and leave
the toctree above for use later.
.. toctree::
:caption: Related Products
.. todo:: Add any product links here. If there are none, then simply delete this todo and leave
the toctree above for use later.
2.2" 18-bit color TFT LCD display with microSD card breakout <https://www.adafruit.com/product/1480>
2.4" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket <https://www.adafruit.com/product/2478>
2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket <https://www.adafruit.com/product/1770>
3.2" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket <https://www.adafruit.com/product/1743>
TFT FeatherWing - 2.4" 320x240 Touchscreen For All Feathers <https://www.adafruit.com/product/3315>
.. toctree::
:caption: Other Links