Skip to content

Commit 60ff3c8

Browse files
authored
Merge pull request #1 from tannewt/lint
Start linting
2 parents a866931 + 10672eb commit 60ff3c8

File tree

4 files changed

+62
-13
lines changed

4 files changed

+62
-13
lines changed

README.rst

Lines changed: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ Introduction
2121
:target: https://github.com/psf/black
2222
:alt: Code Style: Black
2323

24-
Driver for SPD1656 driven ACeP (7-color) e-paper displays
24+
Driver for SPD1656 driven ACeP (7-color) e-paper displays.
2525

26+
Please note that we do not have Blinka support for this yet. So it won't work with a Raspberry Pi.
2627

2728
Dependencies
2829
=============
@@ -36,17 +37,18 @@ This is easily achieved by downloading
3637
or individual libraries can be installed using
3738
`circup <https://github.com/adafruit/circup>`_.
3839

39-
.. todo:: Describe the Adafruit product this library works with. For PCBs, you can also add the
40-
image from the assets folder in the PCB's GitHub repo.
40+
This supports the common 4" and 5.65" ACeP displays.
41+
42+
* [Waveshare 4"](https://www.waveshare.com/4.01inch-e-paper-hat-f.htm)
43+
* [Waveshare 5.65"](https://www.waveshare.com/5.65inch-e-paper-module-f.htm)
44+
* [Pimoroni 5.7"](https://shop.pimoroni.com/products/inky-impression-5-7) (Likely the same as 5.65".)
45+
* [Pimoroni 4"](https://shop.pimoroni.com/products/inky-impression-4)
4146

42-
`Purchase one from the Adafruit shop <http://www.adafruit.com/products/>`_
4347
Installing from PyPI
4448
=====================
4549
.. note:: This library is not available on PyPI yet. Install documentation is included
4650
as a standard element. Stay tuned for PyPI availability!
4751

48-
.. todo:: Remove the above note if PyPI version is/will be available at time of release.
49-
5052
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
5153
PyPI <https://pypi.org/project/adafruit-circuitpython-spd1656/>`_.
5254
To install for current user:
@@ -96,8 +98,53 @@ Or the following command to update an existing version:
9698
Usage Example
9799
=============
98100

99-
.. todo:: Add a quick, simple example. It and other examples should live in the
100-
examples folder and be included in docs/examples.rst.
101+
.. code-block:: python
102+
103+
# SPDX-FileCopyrightText: Copyright (c) 2023 Scott Shawcroft for Adafruit Industries
104+
# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries
105+
#
106+
# SPDX-License-Identifier: Unlicense
107+
108+
"""Simple test script for 5.6" 600x448 7-color ACeP display.
109+
"""
110+
# pylint: disable=no-member
111+
112+
import time
113+
import board
114+
import displayio
115+
import adafruit_spd1656
116+
117+
displayio.release_displays()
118+
119+
# This pinout works on a Feather RP2040 and may need to be altered for other boards.
120+
spi = board.SPI() # Uses SCK and MOSI
121+
epd_cs = board.D9
122+
epd_dc = board.D10
123+
epd_reset = board.D11
124+
epd_busy = board.D12
125+
126+
display_bus = displayio.FourWire(
127+
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
128+
)
129+
130+
display = adafruit_spd1656.SPD1656(
131+
display_bus, width=600, height=448, busy_pin=epd_busy
132+
)
133+
134+
g = displayio.Group()
135+
136+
fn = "/display-ruler-720p.bmp"
137+
138+
with open(fn, "rb") as f:
139+
pic = displayio.OnDiskBitmap(f)
140+
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
141+
g.append(t)
142+
143+
display.show(g)
144+
145+
display.refresh()
146+
147+
time.sleep(120)
101148
102149
Documentation
103150
=============

docs/index.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ Table of Contents
2424
.. toctree::
2525
:caption: Tutorials
2626

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-
3027
.. toctree::
3128
:caption: Related Products
3229

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.
30+
Pimoroni 4" <https://shop.pimoroni.com/products/inky-impression-4>
31+
Pimoroni 5.7" <https://shop.pimoroni.com/products/inky-impression-5-7>
32+
Waveshare 4" <https://www.waveshare.com/4.01inch-e-paper-hat-f.htm>
33+
Waveshare 5.65" <https://www.waveshare.com/5.65inch-e-paper-module-f.htm>
3534

3635
.. toctree::
3736
:caption: Other Links
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
# SPDX-License-Identifier: MIT

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
# SPDX-License-Identifier: MIT
55

66
Adafruit-Blinka
7+
adafruit-blinka-displayio

0 commit comments

Comments
 (0)