From a016df8bfcde840b8aa0cdbfe94d6c221bedc79c Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Tue, 7 May 2019 17:14:50 -0400 Subject: [PATCH] Replaced DummyPin methods and properties --- README.rst | 4 ++-- adafruit_rgb_display/rgb.py | 40 ++++++++++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index b85cb83..6732bf8 100644 --- a/README.rst +++ b/README.rst @@ -17,7 +17,7 @@ Port of display drivers from https://github.com/adafruit/micropython-adafruit-rg .. note:: This driver currently won't work on micropython.org firmware, instead you want the micropython-adafruit-rgb-display driver linked above! -This CircuitPython driver currently supports displays that use the following display-driver chips: HX8353, ILI9341, S6D02A1, SSD1331, SSD1351, and ST7735. +This CircuitPython driver currently supports displays that use the following display-driver chips: HX8353, HX8357, ILI9341, S6D02A1, ST7789, SSD1331, SSD1351, and ST7735. Dependencies ============= @@ -119,4 +119,4 @@ Now, once you have the virtual environment activated: This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to -locally verify it will pass. \ No newline at end of file +locally verify it will pass. diff --git a/adafruit_rgb_display/rgb.py b/adafruit_rgb_display/rgb.py index 771d4ab..06d8a61 100644 --- a/adafruit_rgb_display/rgb.py +++ b/adafruit_rgb_display/rgb.py @@ -57,19 +57,45 @@ def color565(r, g=0, b=0): class DummyPin: - """Can be used in place of a ``Pin()`` when you don't want to skip it.""" - def init(self, *args, **kwargs): - """Dummy Pin init""" + """Can be used in place of a ``DigitalInOut()`` when you don't want to skip it.""" + def deinit(self): + """Dummy DigitalInOut deinit""" pass - def low(self): - """Dummy low Pin method""" + def switch_to_output(self, *args, **kwargs): + """Dummy switch_to_output method""" pass - def high(self): - """Dummy high Pin method""" + def switch_to_input(self, *args, **kwargs): + """Dummy switch_to_input method""" pass + @property + def value(self): + """Dummy value DigitalInOut property""" + pass + + @value.setter + def value(self, val): + pass + + @property + def direction(self): + """Dummy direction DigitalInOut property""" + pass + + @direction.setter + def direction(self, val): + pass + + @property + def pull(self): + """Dummy pull DigitalInOut property""" + pass + + @pull.setter + def pull(self, val): + pass class Display: #pylint: disable-msg=no-member """Base class for all RGB display devices