plugin hid

This commit is contained in:
Devaev Maxim
2019-09-11 06:28:04 +03:00
parent 447904e468
commit e17889ba42
12 changed files with 138 additions and 33 deletions

View File

@@ -48,7 +48,9 @@ def main(argv: Optional[List[str]]=None) -> None:
logger.info("Cleaning up ...")
with gpio.bcm():
for (name, pin, enabled) in [
("hid_reset_pin", config.hid.reset_pin, True),
*([
("hid_reset_pin", config.hid.params.reset_pin, True),
] if config.hid.type == "tty" else []),
("atx_power_switch_pin", config.atx.power_switch_pin, config.atx.enabled),
("atx_reset_switch_pin", config.atx.reset_switch_pin, config.atx.enabled),
("msd_target_pin", config.msd.target_pin, config.msd.enabled),