本文整理匯總了Python中bus.Bus.get_bus_devices方法的典型用法代碼示例。如果您正苦於以下問題:Python Bus.get_bus_devices方法的具體用法?Python Bus.get_bus_devices怎麽用?Python Bus.get_bus_devices使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類bus.Bus
的用法示例。
在下文中一共展示了Bus.get_bus_devices方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_hardware_config
# 需要導入模塊: from bus import Bus [as 別名]
# 或者: from bus.Bus import get_bus_devices [as 別名]
def get_hardware_config():
"""
Read some sort of easy to do configuration for how the hardware is setup. Return
an array that holds MCP23017 class instances.
"""
# instantiate the bus from the class file. The class file has the
# hw configuration specific to this installation.
busses=Bus()
#return chip1
return busses.get_bus_devices() # only return bus1, dev0