USB in python

Tino Wildenhain tino at wildenhain.de
Thu Jan 22 05:21:00 EST 2009


Astan Chee wrote:
> Hi,
> Im trying to write a program for my USB device and I'm thinking of using 
> python to do this. The USB device is of my own making and it is 
> activated when one of the two data pins of the USB is given about 5V (or 
> similar to whatever the power pin is getting). Now I'm confused to if 
> the software to activate this can actually be written and how do I do 
> it? Any examples? I've seen pyUSB but it doesn't give me control over 
> the hardware and how much power is going through the data pins.
> Thanks for any help.

Your approach doesn't sound right to me. I don't believe you can control
the PINs of the USB host interface directly. You need to configure the
host controller - OS is giving you interfaces and abstration for the
different device types. All you need to do is to implement the end
points as per spec in your hardware and write handler for your
hardware's USB ids.

Regards
Tino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20090122/6e7af8be/attachment-0001.bin>


More information about the Python-list mailing list