bus: Don't reserve any pins if BUS_PINS_x is not defined
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
38f3d65ac5
commit
d7e1061c63
|
@ -25,7 +25,8 @@ def resolve_bus_name(mcu, param, bus):
|
||||||
raise ppins.error("Unknown %s '%s'" % (param, bus))
|
raise ppins.error("Unknown %s '%s'" % (param, bus))
|
||||||
# Check for reserved bus pins
|
# Check for reserved bus pins
|
||||||
constants = mcu.get_constants()
|
constants = mcu.get_constants()
|
||||||
reserve_pins = constants.get('BUS_PINS_%s' % (bus,), '')
|
reserve_pins = constants.get('BUS_PINS_%s' % (bus,), None)
|
||||||
|
if reserve_pins is not None:
|
||||||
for pin in reserve_pins.split(','):
|
for pin in reserve_pins.split(','):
|
||||||
ppins.reserve_pin(mcu_name, pin, bus)
|
ppins.reserve_pin(mcu_name, pin, bus)
|
||||||
return bus
|
return bus
|
||||||
|
|
Loading…
Reference in New Issue