diff --git a/README.rst b/README.rst index 7a4f86f..e2b7fec 100644 --- a/README.rst +++ b/README.rst @@ -20,7 +20,7 @@ Dependencies ============= This driver depends on: -* `Adafruit CircuitPython `_ +* `Adafruit CircuitPython (version 5+) `_ Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading @@ -31,9 +31,6 @@ Installing from PyPI .. note:: This library is not available on PyPI yet. Install documentation is included as a standard element. Stay tuned for PyPI availability! -.. todo:: Remove the above note if PyPI version is/will be available at time of release. - If the library is not planned for PyPI, remove the entire 'Installing from PyPI' section. - On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from PyPI `_. To install for current user: @@ -59,7 +56,26 @@ To install in a virtual environment in your current project: 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 time + import board + import busio + import displayio + import adafruit_ssd1325 + + displayio.release_displays() + + # This pinout works on a Metro and may need to be altered for other boards. + spi = busio.SPI(board.SCL, board.SDA) + tft_cs = board.D9 + tft_dc = board.D8 + tft_reset = board.D7 + + display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=tft_reset, + baudrate=1000000) + time.sleep(1) + display = adafruit_ssd1325.SSD1325(display_bus, width=128, height=64) Contributing ============ diff --git a/docs/conf.py b/docs/conf.py index c999105..08f108d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ # Uncomment the below if you use native CircuitPython modules such as # 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)}