diff options
author | Mark Meserve <mark.meserve@ni.com> | 2018-05-08 17:54:26 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-05-14 17:55:15 -0700 |
commit | e942181f600b6b35f2200244b9899e23b20cf6cf (patch) | |
tree | 2e07e66fd83cfd94a8cae803645b4615b8c0167f | |
parent | 38a7fa64f464084fa11708bdbe00cfabc311df29 (diff) | |
download | uhd-e942181f600b6b35f2200244b9899e23b20cf6cf.tar.gz uhd-e942181f600b6b35f2200244b9899e23b20cf6cf.tar.bz2 uhd-e942181f600b6b35f2200244b9899e23b20cf6cf.zip |
mpm: allow multiple spi device objects to use the same chip select
-rw-r--r-- | mpm/python/usrp_mpm/dboard_manager/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/base.py b/mpm/python/usrp_mpm/dboard_manager/base.py index 36f446360..901e8cbf2 100644 --- a/mpm/python/usrp_mpm/dboard_manager/base.py +++ b/mpm/python/usrp_mpm/dboard_manager/base.py @@ -61,9 +61,9 @@ class DboardManagerBase(object): keys from chip_select_map to spidev nodes, and do a sanity check that enough nodes are available. """ - if len(spi_devices) < len(chip_select_map): + if len(spi_devices) < len(set(chip_select_map.values())): self.log.error("Expected {0} spi devices, found {1}".format( - len(chip_select_map), len(spi_devices), + len(set(chip_select_map.values())), len(spi_devices), )) self.log.error("Not enough SPI devices found.") return {} |