2021-05-29 17:18:37 -04:00
|
|
|
"""
|
2023-05-12 11:20:00 -04:00
|
|
|
Dummy module that contains empty functions and variables that exist in RPi.GPIO. This module is to be imported
|
|
|
|
if importing RPi.GPIO fails.
|
2021-05-29 17:18:37 -04:00
|
|
|
"""
|
|
|
|
|
|
|
|
# Constants used by RPi.GPIO
|
|
|
|
BOARD = 0
|
|
|
|
IN = 0
|
|
|
|
FALLING = 0
|
|
|
|
|
|
|
|
|
|
|
|
def setmode(new_mode):
|
|
|
|
"""
|
|
|
|
Fake setmode function.
|
2023-05-12 11:20:00 -04:00
|
|
|
Args:
|
|
|
|
new_mode:
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
2021-05-29 17:18:37 -04:00
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def setup(channel, mode, initial=None, pull_up_down=None):
|
|
|
|
"""
|
|
|
|
Fake setup function.
|
2023-05-12 11:20:00 -04:00
|
|
|
Args:
|
|
|
|
channel:
|
|
|
|
mode:
|
|
|
|
initial:
|
|
|
|
pull_up_down:
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
2021-05-29 17:18:37 -04:00
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def add_event_detect(channel, edge_type, callback=None, bouncetime=0):
|
|
|
|
"""
|
|
|
|
Fake function to add a non-existent event detect.
|
2023-05-12 11:20:00 -04:00
|
|
|
Args:
|
|
|
|
channel:
|
|
|
|
edge_type:
|
|
|
|
callback:
|
|
|
|
bouncetime:
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
2021-05-29 17:18:37 -04:00
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def event_detected(channel):
|
|
|
|
"""
|
|
|
|
Fake function to detect an event. Always returns false.
|
2023-05-12 11:20:00 -04:00
|
|
|
Args:
|
|
|
|
channel:
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
2021-05-29 17:18:37 -04:00
|
|
|
"""
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
def cleanup(channel=None):
|
|
|
|
"""
|
|
|
|
Fake cleanup function.
|
2023-05-12 11:20:00 -04:00
|
|
|
Args:
|
|
|
|
channel:
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
|
2021-05-29 17:18:37 -04:00
|
|
|
"""
|
|
|
|
pass
|