PORTS Forum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
This forum is closed to new activity.
The posts are available to browse, but posting has been disabled. BIG THANKS to all who have participated and shared your knowledge over the past 13 years.
Aug 11, 2023
Home
Help
Search
Login
Register
PORTS Forum
»
Ports and Interfaces
»
USB
»
functions for communiating with USB
« previous
next »
Print
Pages: [
1
]
Author
Topic: functions for communiating with USB (Read 12511 times)
cool
Member
Posts: 2
functions for communiating with USB
«
on:
July 04, 2011, 03:06:17 am »
Hi,
I am currently using VS2010. I would like to know what are the functions and header files to call for sending data to USB and receiving data from USB?
Please Advice
Thanks
«
Last Edit: July 04, 2011, 04:16:00 am by cool
»
Logged
Jan Axelson
Administrator
Frequent Contributor
Posts: 3033
Re: functions for communiating with USB
«
Reply #1 on:
July 04, 2011, 10:22:24 am »
From my USB FAQ:
How an application communicates with a USB device depends on the device driver that Windows has assigned to the device. The choice of driver in turn depends on finding a match between the information in the descriptors that Windows retrieves on device attachment or bootup and the information stored in the PC's INF files. Typically, the application doesn't have to know whether the device uses USB or another interface. For example, applications access files on a drive in the same way whether the drive uses USB, IEEE-1394, SCSI, ATAPI, or another interface. The interface-specific details are handled at a lower level. Some devices use drivers included with Windows. Others use a vendor-specific driver that he user must install.
http://www.janaxelson.com/usbfaq.htm
I have Visual Studio HID examples here:
http://www.janaxelson.com/hidpage.htm#MyExampleCode
WinUSB examples here:
http://www.janaxelson.com/winusb.htm
COM port including USB virtual COM port here:
http://www.janaxelson.com/serport.htm#my_example_code
Jan
«
Last Edit: March 28, 2018, 08:27:27 pm by Jan Axelson
»
Logged
cool
Member
Posts: 2
Re: functions for communiating with USB
«
Reply #2 on:
July 04, 2011, 11:14:56 pm »
Hi,
I am currently using pob avoider II. I am using Visual Studio 2010.I am using USB serial port converter.May I know what header files to include and what is the functions to be used?
Please Advice
Thanks
Logged
Jan Axelson
Administrator
Frequent Contributor
Posts: 3033
Re: functions for communiating with USB
«
Reply #3 on:
July 05, 2011, 12:14:13 am »
Applications access a USB/serial adapter in the same way they access physical COM ports. The application doesn't have to know or care if the port is a physical serial port or a USB adapter.
Use the SerialPort class. See my examples here:
http://www.janaxelson.com/serport.htm#my_example_code
Jan
«
Last Edit: March 28, 2018, 08:27:02 pm by Jan Axelson
»
Logged
Print
Pages: [
1
]
« previous
next »
PORTS Forum
»
Ports and Interfaces
»
USB
»
functions for communiating with USB