Skip to content

Commit 4445e07

Browse files
authored
Merge pull request #1 from tannewt/lint
Mock out displayio and update README
2 parents c517938 + 6be0d0a commit 4445e07

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

README.rst

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Dependencies
2020
=============
2121
This driver depends on:
2222

23-
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
23+
* `Adafruit CircuitPython (version 5+) <https://github.com/adafruit/circuitpython>`_
2424

2525
Please ensure all dependencies are available on the CircuitPython filesystem.
2626
This is easily achieved by downloading
@@ -31,9 +31,6 @@ Installing from PyPI
3131
.. note:: This library is not available on PyPI yet. Install documentation is included
3232
as a standard element. Stay tuned for PyPI availability!
3333

34-
.. todo:: Remove the above note if PyPI version is/will be available at time of release.
35-
If the library is not planned for PyPI, remove the entire 'Installing from PyPI' section.
36-
3734
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
3835
PyPI <https://pypi.org/project/adafruit-circuitpython-ssd1325/>`_. To install for current user:
3936

@@ -59,7 +56,26 @@ To install in a virtual environment in your current project:
5956
Usage Example
6057
=============
6158

62-
.. todo:: Add a quick, simple example. It and other examples should live in the examples folder and be included in docs/examples.rst.
59+
.. code-block:: python
60+
61+
import time
62+
import board
63+
import busio
64+
import displayio
65+
import adafruit_ssd1325
66+
67+
displayio.release_displays()
68+
69+
# This pinout works on a Metro and may need to be altered for other boards.
70+
spi = busio.SPI(board.SCL, board.SDA)
71+
tft_cs = board.D9
72+
tft_dc = board.D8
73+
tft_reset = board.D7
74+
75+
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=tft_reset,
76+
baudrate=1000000)
77+
time.sleep(1)
78+
display = adafruit_ssd1325.SSD1325(display_bus, width=128, height=64)
6379
6480
Contributing
6581
============

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# Uncomment the below if you use native CircuitPython modules such as
2121
# digitalio, micropython and busio. List the modules you use. Without it, the
2222
# autodoc module docs will fail to generate with a warning.
23-
# autodoc_mock_imports = ["digitalio", "busio"]
23+
autodoc_mock_imports = ["displayio"]
2424

2525

2626
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}

0 commit comments

Comments
 (0)