ad5206: Warn if ad5206 enable pin is inverted

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-02-17 23:18:10 -05:00
parent 5e8aaed41f
commit 69486e45c1
1 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,8 @@ class ad5206:
printer = config.get_printer()
enable_pin_params = pins.get_printer_pins(printer).lookup_pin(
'digital_out', config.get('enable_pin'))
if enable_pin_params['invert']:
raise pins.error("ad5206 can not invert pin")
self.mcu = enable_pin_params['chip']
self.pin = enable_pin_params['pin']
self.mcu.add_config_object(self)