Skip to content

Commit a901722

Browse files
committed
docs, pre-commit
1 parent 540ee6b commit a901722

File tree

4 files changed

+33
-22
lines changed

4 files changed

+33
-22
lines changed

README.rst

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,10 @@ This is easily achieved by downloading
3636
or individual libraries can be installed using
3737
`circup <https://github.com/adafruit/circup>`_.
3838

39-
40-
41-
.. todo:: Describe the Adafruit product this library works with. For PCBs, you can also add the
42-
image from the assets folder in the PCB's GitHub repo.
43-
4439
`Purchase one from the Adafruit shop <http://www.adafruit.com/products/6373>`_
4540

4641
Installing from PyPI
4742
=====================
48-
.. note:: This library is not available on PyPI yet. Install documentation is included
49-
as a standard element. Stay tuned for PyPI availability!
50-
51-
.. todo:: Remove the above note if PyPI version is/will be available at time of release.
5243

5344
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
5445
PyPI <https://pypi.org/project/adafruit-circuitpython-jd79667/>`_.
@@ -99,8 +90,36 @@ Or the following command to update an existing version:
9990
Usage Example
10091
=============
10192

102-
.. todo:: Add a quick, simple example. It and other examples should live in the
103-
examples folder and be included in docs/examples.rst.
93+
.. code-block:: python
94+
95+
import board
96+
import busio
97+
import displayio
98+
from fourwire import FourWire
99+
100+
import adafruit_jd79667
101+
102+
displayio.release_displays()
103+
104+
spi = busio.SPI(board.EPD_SCK, board.EPD_MOSI) # Uses SCK and MOSI
105+
epd_cs = board.EPD_CS
106+
epd_dc = board.EPD_DC
107+
epd_reset = board.EPD_RESET
108+
epd_busy = board.EPD_BUSY
109+
110+
display_bus = FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000)
111+
time.sleep(1)
112+
113+
display = adafruit_jd79667.JD79667(
114+
display_bus,
115+
width=384,
116+
height=184,
117+
busy_pin=epd_busy,
118+
rotation=270,
119+
colstart=0,
120+
highlight_color=0xFFFF00,
121+
highlight_color2=0xFF0000,
122+
)
104123
105124
Documentation
106125
=============

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# Uncomment the below if you use native CircuitPython modules such as
2626
# digitalio, micropython and busio. List the modules you use. Without it, the
2727
# autodoc module docs will fail to generate with a warning.
28-
# autodoc_mock_imports = ["digitalio", "busio"]
28+
autodoc_mock_imports = ["digitalio", "busio", "epaperdisplay", "fourwire"]
2929

3030
autodoc_preserve_defaults = True
3131

docs/index.rst

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,10 @@ Table of Contents
2121

2222
api
2323

24-
.. toctree::
25-
:caption: Tutorials
26-
27-
.. todo:: Add any Learn guide links here. If there are none, then simply delete this todo and leave
28-
the toctree above for use later.
29-
3024
.. toctree::
3125
:caption: Related Products
3226

33-
.. todo:: Add any product links here. If there are none, then simply delete this todo and leave
34-
the toctree above for use later.
27+
Adafruit 3.52" 340x180 Quad-Color eInk <https://www.adafruit.com/product/6414>
3528

3629
.. toctree::
3730
:caption: Other Links

examples/jd79667_simpletest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SPDX-License-Identifier: Unlicense
55

6-
"""Simple test script for 2.9" 296x128 display. This example runs it in mono mode."""
6+
"""Simple test script for 3.52" 340x180 Quad-Color eInk."""
77

88
import time
99

@@ -16,7 +16,6 @@
1616

1717
displayio.release_displays()
1818

19-
# This pinout works on a MagTag with the newer screen and may need to be altered for other boards.
2019
spi = busio.SPI(board.EPD_SCK, board.EPD_MOSI) # Uses SCK and MOSI
2120
epd_cs = board.EPD_CS
2221
epd_dc = board.EPD_DC

0 commit comments

Comments
 (0)