To: | |
---|---|
Subject: | Re: [ts-7000] libusb |
From: | Dino Sbrocca <> |
Date: | Thu, 6 Jul 2006 09:17:50 -0400 (EDT) |
Anand, Attached you will find the source for the test program. Here is the output that I get when I run it on the TS7260 with the 1_Wire USB interface plugged in: $ /usr/bin/loadUSBModules.sh Using /lib/modules/2.4.26-ts9/kernel/drivers/usb/usbcore.o Using /lib/modules/2.4.26-ts9/kernel/arch/arm/common/pcipool.o Using /lib/modules/2.4.26-ts9/kernel/drivers/usb/host/usb-ohci.o Using /lib/modules/2.4.26-ts9/kernel/drivers/usb/host/usb-ohci-ep93xx.o Using /lib/modules/2.4.26-ts9/kernel/drivers/scsi/scsi_mod.o Using /lib/modules/2.4.26-ts9/kernel/drivers/scsi/sd_mod.o Using /lib/modules/2.4.26-ts9/kernel/drivers/usb/storage/usb-storage.o $ mount -t usbdevfs none /proc/bus/usb $ ./tstusb Initializing USB subsystem Finding buses Finding devices bus/device idVendor/idProduct 001/001 0000/0000 001/002 04FA/2490 Found DS2490 device #1 at 001/002 *** END *** Anand S Madhusoodanan <> wrote:
__._,_.___
SPONSORED LINKS
YAHOO! GROUPS LINKS
#include <usb.h> #include <stdio.h> #include <stdlib.h> #ifndef MAX_PORTNUM #define MAX_PORTNUM 16 #endif int main(int argc, char **argv) { struct usb_dev_handle *usb_dev_handle_list[MAX_PORTNUM]; struct usb_device *usb_dev_list[MAX_PORTNUM]; int usb_num_devices = -1; struct usb_bus *bus; struct usb_bus *busses; struct usb_device *dev; printf("Initializing USB subsystem\n"); usb_init(); // printf("Seting debug\n"); // usb_set_debug(0); printf("Finding buses\n"); usb_find_busses(); busses = usb_get_busses(); printf("Finding devices\n"); usb_find_devices(); printf("bus/device idVendor/idProduct\n"); for (bus = busses; bus; bus = bus->next) { for (dev = bus->devices; dev; dev = dev->next) { printf("%s/%s %04X/%04X\n", bus->dirname, dev->filename, dev->descriptor.idVendor, dev->descriptor.idProduct); if (dev->descriptor.idVendor == 0x04FA && dev->descriptor.idProduct == 0x2490) { printf("Found DS2490 device #%d at %s/%s\n", ++usb_num_devices + 1, bus->dirname, dev->filename); usb_dev_list[usb_num_devices] = dev; } } } printf("*** END ***\n"); } |
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | [ts-7000] Kernel 2.6.x, Eko Didik Widianto |
---|---|
Next by Date: | Re: [ts-7000] libusb, Dino Sbrocca |
Previous by Thread: | Re: [ts-7000] libusb, Anand S Madhusoodanan |
Next by Thread: | Re: [ts-7000] libusb, Michael Surran |
Indexes: | [Date] [Thread] [Top] [All Lists] |
Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU