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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -