LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-09-2009, 01:24 AM   #1
YC_JYC
LQ Newbie
 
Registered: May 2009
Location: china
Posts: 2

Rep: Reputation: 0
Lightbulb How to define the value to match my device ?


I want to write a usb driver for my device ! But when i read some samples , i find there some information about definning the value to match the device,eg:
#define USB_SKEL_VENDOR_ID 0xfff0
#define USB_SKEL_PRODUCT_ID 0xfff0
My question is how to know the values about the device,or how to define the value to match the devices ?
 
Old 05-09-2009, 02:44 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
You can try to plug the usb disk and see which device is assigned (es. /dev/sdb). Then try
Code:
$ udevinfo -a -p /sys/block/sdb
grep for product and vendor and you will find it.
 
Old 05-13-2009, 08:55 AM   #3
YC_JYC
LQ Newbie
 
Registered: May 2009
Location: china
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks !
 
  


Reply

Tags
linux


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grep/sed/awk - find match, then match on next line gctaylor1 Programming 3 07-11-2007 08:55 AM
Help with a #define Wynd Programming 4 04-22-2007 03:30 PM
m4 define in a define Four Programming 0 03-04-2007 09:41 PM
define jhon Linux - Networking 2 08-30-2004 07:42 PM
baffling pci device match problem dongmin Linux - Newbie 0 06-14-2004 12:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration