def read(self, nchars, raw=True):
"""Read up to nchars bytes of data from the device. Can return fewer if
timedout. Use getQueueStatus to find how many bytes are available"""
b_read = _ft.DWORD()
b = c.c_buffer(nchars)
call_ft(_ft.FT_Read, self.handle, b, nchars, c.byref(b_read))
return b.raw[:b_read.value] if raw else b.value[:b_read.value]
评论列表
文章目录