Device.py 文件源码

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

项目:PyHIDParser 作者: NZSmartie 项目源码 文件源码
def deserialize(self, data, report_type: ReportType):
        offset = 0
        if not isinstance(data, _Bits):
            data = _Bits(data)
        for item in self.items:
            if isinstance(item, Report):
                if item.report_type is not report_type:
                    continue
                item.unpack(data[offset:offset + item.bits])
            else:
                item.deserialize(data[offset:offset + item.bits], report_type)
            offset += item.bits
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号