added new fake functions and scrips to FakeGPIO.py

This commit is contained in:
Nick Dyer 2021-07-02 01:47:19 -04:00
parent 85557ebb1c
commit 195abbc5eb

View File

@ -6,8 +6,12 @@ the hardware can be run without the actual hardware.
# Constants used by RPi.GPIO # Constants used by RPi.GPIO
BOARD = 0 BOARD = 0
IN = 0 IN = 0
OUT = 1
FALLING = 0 FALLING = 0
HIGH = 1
LOW = 0
def setmode(new_mode): def setmode(new_mode):
""" """
@ -28,6 +32,16 @@ def setup(channel, mode, initial=None, pull_up_down=None):
pass pass
def output(channel, set):
"""
Fake function to set a fake channel output.
:param channel:
:param set:
:return:
"""
pass
def add_event_detect(channel, edge_type, callback=None, bouncetime=0): def add_event_detect(channel, edge_type, callback=None, bouncetime=0):
""" """
Fake function to add a non-existent event detect. Fake function to add a non-existent event detect.
@ -43,7 +57,7 @@ def event_detected(channel):
""" """
Fake function to detect an event. Always returns false. Fake function to detect an event. Always returns false.
:param channel: :param channel:
:return: :return: False
""" """
return False return False