mirror of https://github.com/Desuuuu/klipper.git
mcu: Allow reserving hardware interfaces with [name] syntax
This commit is contained in:
parent
4d7c6e3005
commit
e21ba2e94f
|
@ -783,6 +783,9 @@ class MCU:
|
|||
for cname, value in self.get_constants().items():
|
||||
if cname.startswith("RESERVE_PINS_"):
|
||||
for pin in value.split(','):
|
||||
if pin.startswith('[') and pin.endswith(']'):
|
||||
pin_resolver.reserve_interface(pin[1:-1], cname[13:])
|
||||
else:
|
||||
pin_resolver.reserve_pin(pin, cname[13:])
|
||||
self._mcu_freq = self.get_constant_float('CLOCK_FREQ')
|
||||
self._stats_sumsq_base = self.get_constant_float('STATS_SUMSQ_BASE')
|
||||
|
|
Loading…
Reference in New Issue