[pyusb-users] pyusb write and read control transfers

2011-03-23 Thread Brendan Simon (eTRIX)
The pyusb tutorial has an example of using the control transfer functions. http://pyusb.sourceforge.net/docs/1.0/tutorial.html >>> msg = 'test' >>> assert dev.ctrl_transfer(0x40, CTRL_LOOPBACK_WRITE, 0, 0, msg) == len(msg) >>> ret = dev.ctrl_transfer(0x40, CTRL_LOOPBACK_READ, 0, 0, len(msg)) >>>

Re: [pyusb-users] pyusb write and read control transfers

2011-03-23 Thread wander.lairson
2011/3/23 Brendan Simon (eTRIX) : > The pyusb tutorial has an example of using the control transfer functions. > > http://pyusb.sourceforge.net/docs/1.0/tutorial.html > msg = 'test' assert dev.ctrl_transfer(0x40, CTRL_LOOPBACK_WRITE, 0, 0, msg) == len(msg) ret = dev.ctrl_transfer(0x4