Skip to content

Commit 23675bf

Browse files
authored
Merge pull request #1 from tannewt/lint
lint
2 parents b878c70 + 50b0894 commit 23675bf

File tree

4 files changed

+71
-32
lines changed

4 files changed

+71
-32
lines changed

README.rst

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

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.
39+
* `Waveshare 7.3" F <https://www.waveshare.com/7.3inch-e-paper-hat-f.htm>`_
4140

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

48-
.. todo:: Remove the above note if PyPI version is/will be available at time of release.
49-
5046
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
5147
PyPI <https://pypi.org/project/adafruit-circuitpython-acep7in/>`_.
5248
To install for current user:
@@ -96,8 +92,55 @@ Or the following command to update an existing version:
9692
Usage Example
9793
=============
9894

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.
95+
.. code-block:: python
96+
97+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
98+
# SPDX-FileCopyrightText: Copyright (c) 2023 Scott Shawcroft for Adafruit Industries
99+
# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries
100+
#
101+
# SPDX-License-Identifier: Unlicense
102+
103+
"""Simple test script for 5.6" 600x448 7-color ACeP display.
104+
"""
105+
# pylint: disable=no-member
106+
107+
import time
108+
import board
109+
import displayio
110+
import adafruit_acep7in
111+
112+
displayio.release_displays()
113+
114+
# This pinout works on a Feather RP2040 and may need to be altered for other boards.
115+
spi = board.SPI() # Uses SCK and MOSI
116+
epd_cs = board.D9
117+
epd_dc = board.D10
118+
epd_reset = board.D11
119+
epd_busy = board.D12
120+
121+
display_bus = displayio.FourWire(
122+
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
123+
)
124+
125+
display = adafruit_acep7in.ACeP7In(
126+
display_bus, width=800, height=480, busy_pin=epd_busy
127+
)
128+
129+
g = displayio.Group()
130+
131+
fn = "/display-ruler-720p.bmp"
132+
133+
with open(fn, "rb") as f:
134+
pic = displayio.OnDiskBitmap(f)
135+
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
136+
g.append(t)
137+
138+
display.show(g)
139+
140+
display.refresh()
141+
142+
time.sleep(120)
143+
101144
102145
Documentation
103146
=============

adafruit_acep7in.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,29 @@
2727
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_ACeP7In.git"
2828

2929
_START_SEQUENCE = (
30-
b"\xaa\x06\x49\x55\x20\x08\x09\x18" # CMDH
30+
b"\xaa\x06\x49\x55\x20\x08\x09\x18" # CMDH
3131
b"\x01\x06\x3F\x00\x32\x2A\x0E\x2A" # power setting PWRR
32-
b"\x00\x02\x5f\x69" # panel setting (PSR)
33-
b"\x03\x04\x00\x54\x00\x44" # POFS
34-
b"\x05\x04\x40\x1F\x1F\x2C" # booster BTST1
35-
b"\x06\x04\x6F\x1F\x16\x25" # booster BTST2
36-
b"\x08\x04\x6F\x1F\x1F\x22" # booster BTST3
37-
b"\x13\x02\x00\x04" # IPC
38-
b"\x30\x01\x02" # PLL setting
39-
b"\x41\x01\x00" # TSE
40-
b"\x50\x01\x3F" # vcom and data interval setting
41-
b"\x60\x02\x02\x00" # tcon setting
42-
b"\x61\x04\x03\x20\x01\xe0" # tres
43-
b"\x82\x01\x1e" # vdcs
44-
b"\x84\x01\x00" # t_vdcs
45-
b"\x86\x01\x00" # agid
46-
b"\xe3\x01\x2f" # PWS
47-
b"\xe0\x01\x00" # ccset
48-
b"\xe6\x01\x00" # tsset
32+
b"\x00\x02\x5f\x69" # panel setting (PSR)
33+
b"\x03\x04\x00\x54\x00\x44" # POFS
34+
b"\x05\x04\x40\x1F\x1F\x2C" # booster BTST1
35+
b"\x06\x04\x6F\x1F\x16\x25" # booster BTST2
36+
b"\x08\x04\x6F\x1F\x1F\x22" # booster BTST3
37+
b"\x13\x02\x00\x04" # IPC
38+
b"\x30\x01\x02" # PLL setting
39+
b"\x41\x01\x00" # TSE
40+
b"\x50\x01\x3F" # vcom and data interval setting
41+
b"\x60\x02\x02\x00" # tcon setting
42+
b"\x61\x04\x03\x20\x01\xe0" # tres
43+
b"\x82\x01\x1e" # vdcs
44+
b"\x84\x01\x00" # t_vdcs
45+
b"\x86\x01\x00" # agid
46+
b"\xe3\x01\x2f" # PWS
47+
b"\xe0\x01\x00" # ccset
48+
b"\xe6\x01\x00" # tsset
4949
b"\x04\x80\xc8" # power on and wait 10 ms
5050
)
5151

52-
_STOP_SEQUENCE = b"\x02\x01\x00" # Power off only
52+
_STOP_SEQUENCE = b"\x02\x01\x00" # Power off only
5353
# pylint: disable=too-few-public-methods
5454
class ACeP7In(displayio.EPaperDisplay):
5555
r"""Display driver for 7" ACeP epaper display. Driver IC name is unknown.

docs/index.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,10 @@ 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+
Waveshare 7.3" F <https://www.waveshare.com/7.3inch-e-paper-hat-f.htm>
3531

3632
.. toctree::
3733
:caption: Other Links

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ requires = [
1212

1313
[project]
1414
name = "adafruit-circuitpython-acep7in"
15-
description = "Driver for 7.3" 7-color (aka ACeP) epaper display"
15+
description = "Driver for 7.3\" 7-color (aka ACeP) epaper display"
1616
version = "0.0.0+auto.0"
1717
readme = "README.rst"
1818
authors = [

0 commit comments

Comments
 (0)