Skip to content

Commit 608dcf4

Browse files
authored
Merge pull request #26 from makermelissa/master
Replaced DummyPin methods and properties
2 parents 1145977 + a016df8 commit 608dcf4

File tree

2 files changed

+35
-9
lines changed

2 files changed

+35
-9
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Port of display drivers from https://github.com/adafruit/micropython-adafruit-rg
1717

1818
.. note:: This driver currently won't work on micropython.org firmware, instead you want the micropython-adafruit-rgb-display driver linked above!
1919

20-
This CircuitPython driver currently supports displays that use the following display-driver chips: HX8353, ILI9341, S6D02A1, SSD1331, SSD1351, and ST7735.
20+
This CircuitPython driver currently supports displays that use the following display-driver chips: HX8353, HX8357, ILI9341, S6D02A1, ST7789, SSD1331, SSD1351, and ST7735.
2121

2222
Dependencies
2323
=============
@@ -119,4 +119,4 @@ Now, once you have the virtual environment activated:
119119
120120
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
121121
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
122-
locally verify it will pass.
122+
locally verify it will pass.

adafruit_rgb_display/rgb.py

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,45 @@ def color565(r, g=0, b=0):
5757

5858

5959
class DummyPin:
60-
"""Can be used in place of a ``Pin()`` when you don't want to skip it."""
61-
def init(self, *args, **kwargs):
62-
"""Dummy Pin init"""
60+
"""Can be used in place of a ``DigitalInOut()`` when you don't want to skip it."""
61+
def deinit(self):
62+
"""Dummy DigitalInOut deinit"""
6363
pass
6464

65-
def low(self):
66-
"""Dummy low Pin method"""
65+
def switch_to_output(self, *args, **kwargs):
66+
"""Dummy switch_to_output method"""
6767
pass
6868

69-
def high(self):
70-
"""Dummy high Pin method"""
69+
def switch_to_input(self, *args, **kwargs):
70+
"""Dummy switch_to_input method"""
7171
pass
7272

73+
@property
74+
def value(self):
75+
"""Dummy value DigitalInOut property"""
76+
pass
77+
78+
@value.setter
79+
def value(self, val):
80+
pass
81+
82+
@property
83+
def direction(self):
84+
"""Dummy direction DigitalInOut property"""
85+
pass
86+
87+
@direction.setter
88+
def direction(self, val):
89+
pass
90+
91+
@property
92+
def pull(self):
93+
"""Dummy pull DigitalInOut property"""
94+
pass
95+
96+
@pull.setter
97+
def pull(self, val):
98+
pass
7399

74100
class Display: #pylint: disable-msg=no-member
75101
"""Base class for all RGB display devices

0 commit comments

Comments
 (0)