From: Melissa LeBlanc-Williams Date: Tue, 25 Aug 2020 22:43:08 +0000 (-0700) Subject: Added missing OneWire as NotImplemented stub X-Git-Tag: 5.3.1^2~1 X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/commitdiff_plain/644968a5e7aa007fd873fb8f9a036a1d3139a14d Added missing OneWire as NotImplemented stub --- diff --git a/src/busio.py b/src/busio.py index 279bd46..17e6c28 100755 --- a/src/busio.py +++ b/src/busio.py @@ -412,3 +412,36 @@ class UART(Lockable): def write(self, buf): """Write to the UART from a buffer""" return self._uart.write(buf) + + +class OneWire: + """ + Stub class for OneWire, which is currently not implemented + """ + + def __init__(self, pin): + raise NotImplementedError("OneWire has not been implemented") + + def deinit(self): + """ + Deinitialize the OneWire bus and release any hardware resources for reuse. + """ + raise NotImplementedError("OneWire has not been implemented") + + def reset(self): + """ + Reset the OneWire bus and read presence + """ + raise NotImplementedError("OneWire has not been implemented") + + def read_bit(self): + """ + Read in a bit + """ + raise NotImplementedError("OneWire has not been implemented") + + def write_bit(self, value): + """ + Write out a bit based on value. + """ + raise NotImplementedError("OneWire has not been implemented")