ftd2xx.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:crescendo 作者: AriaFallah 项目源码 文件源码
def getDeviceInfo(self):
        """Returns a dictionary describing the device. """
        deviceType = _ft.DWORD()
        deviceId = _ft.DWORD()
        desc = c.c_buffer(MAX_DESCRIPTION_SIZE)
        serial = c.c_buffer(MAX_DESCRIPTION_SIZE)

        call_ft(_ft.FT_GetDeviceInfo, self.handle, c.byref(deviceType),
                c.byref(deviceId), serial, desc, None)
        return {'type': deviceType.value, 'id': deviceId.value,
                'description': desc.value, 'serial': serial.value}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号