class FTD2XX(object):
"""Class for communicating with an FTDI device"""
def __init__(self, handle, update=True):
"""Create an instance of the FTD2XX class with the given device handle
and populate the device info in the instance dictionary. Set
update to False to avoid a slow call to createDeviceInfoList."""
self.handle = handle
self.status = 1
# createDeviceInfoList is slow, only run if update is True
if update: createDeviceInfoList()
self.__dict__.update(self.getDeviceInfo())
状态在类中声明为1。
status
只告诉您设备是用1打开还是没有用0打开。在相关问题 更多 >
编程相关推荐