LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to define the value to match my device ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-define-the-value-to-match-my-device-724807/)

YC_JYC 05-09-2009 01:24 AM

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 ?

colucix 05-09-2009 02:44 AM

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.

YC_JYC 05-13-2009 08:55 AM

Thanks !


All times are GMT -5. The time now is 09:29 AM.