libusb - Isochronous Read/Write with PyUSB -
pyusb 1.0 claims support isochronous transfers if underlying backend supports it. i've figured out how select libusb1.0 backend supports isochronous transfer, i'm not sure how implement reads , writes. i've searched internets , cannot find example using pyusb. help?
ok, i'm answering own question because found solution. turns out pyusb automatically choose correct read/write method depending on type of endpoint being operated on. core.py in definition 'write' see:
fn_map = { util.endpoint_type_bulk:backend.bulk_write, util.endpoint_type_intr:backend.intr_write, util.endpoint_type_iso:backend.iso_write }
and in definition 'read' see:
fn_map = { util.endpoint_type_bulk:backend.bulk_read, util.endpoint_type_intr:backend.intr_read, util.endpoint_type_iso:backend.iso_read }
so really, needs done call {device}.read() or {device}.write() , code handle assigning appropriate operation.
i going delete question rather answer it, since isochronous transfer relatively new pyusb i'm hoping other folks not waste full day discover did :)
Comments
Post a Comment