mirror of
https://github.com/QIDITECH/klipper.git
synced 2026-01-30 23:48:43 +03:00
klipper update
This commit is contained in:
17
klippy/extras/static_digital_output.py
Normal file
17
klippy/extras/static_digital_output.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Set the state of a list of digital output pins
|
||||
#
|
||||
# Copyright (C) 2017-2018 Kevin O'Connor <kevin@koconnor.net>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
|
||||
class PrinterStaticDigitalOut:
|
||||
def __init__(self, config):
|
||||
printer = config.get_printer()
|
||||
ppins = printer.lookup_object('pins')
|
||||
pin_list = config.getlist('pins')
|
||||
for pin_desc in pin_list:
|
||||
mcu_pin = ppins.setup_pin('digital_out', pin_desc)
|
||||
mcu_pin.setup_start_value(1, 1, True)
|
||||
|
||||
def load_config_prefix(config):
|
||||
return PrinterStaticDigitalOut(config)
|
||||
Reference in New Issue
Block a user