mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-03-11 05:16:59 -06:00
bus: Verify that software i2c pins are all on the same mcu
Some checks failed
Build test / build (push) Has been cancelled
Some checks failed
Build test / build (push) Has been cancelled
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
3f72e519ed
commit
a8cbc93552
1 changed files with 4 additions and 0 deletions
|
|
@ -240,6 +240,10 @@ def MCU_I2C_from_config(config, default_addr=None, default_speed=100000):
|
|||
for name in ['scl', 'sda']]
|
||||
sw_pin_params = [ppins.lookup_pin(config.get(name), share_type=name)
|
||||
for name in sw_pin_names]
|
||||
for pin_params in sw_pin_params:
|
||||
if pin_params['chip'] != i2c_mcu:
|
||||
raise ppins.error("%s: i2c pins must be on same mcu" % (
|
||||
config.get_name(),))
|
||||
sw_pins = tuple([pin_params['pin'] for pin_params in sw_pin_params])
|
||||
bus = None
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue