Is there a decent USB communication API? Preferably cross-platform (Linux if not, I guess)
I don't have a specific use in mind, I just want to learn about using the USB ports for future electronics projects. I realize this is very general, I'll try to refine the question as the answers point me in the right direction.
Thanks.
libusb应该适合你..跨平台,用户空间USB工具。
Depending on your electronics projects, a USB micro controller might be more what you're looking for.
Here is one of my favorite USB devices that do this sort of thing (servo controls, motor controls, LEDs, analog/digital I/O, etc.) phidgets.com
Cross platform, excellent. For example, setting the position of a servo to halfway I could call to the driver:
servo1.setPosition(50);
Easy as pie.
Good luck!
You can try for windows WinUSB( http://msdn.microsoft.com/en-us/library/aa476426.aspx ) User mode windows USB driver handling - starting from Vista ? (yuck) I have never used it, and it will not work on linux :P Why want you crossplatfomr in first place? For libusb for windows, I am not sure if it supports all types of transfers. (depends on version) For device operatons you could use AVRUSB ( http://www.obdev.at/products/vusb/index.html ) You need only avr processor and some realy simple extra hardvare.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.