mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-11 16:57:55 -06:00
pins: Move reserved pin handling into PinResolver class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
a482ddf582
commit
395429be14
5 changed files with 35 additions and 34 deletions
|
@ -26,9 +26,10 @@ def resolve_bus_name(mcu, param, bus):
|
|||
# Check for reserved bus pins
|
||||
constants = mcu.get_constants()
|
||||
reserve_pins = constants.get('BUS_PINS_%s' % (bus,), None)
|
||||
pin_resolver = ppins.get_pin_resolver(mcu_name)
|
||||
if reserve_pins is not None:
|
||||
for pin in reserve_pins.split(','):
|
||||
ppins.reserve_pin(mcu_name, pin, bus)
|
||||
pin_resolver.reserve_pin(pin, bus)
|
||||
return bus
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue