diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-03-02 12:54:10 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-03-02 12:54:10 +0100 |
commit | 14a6dcb63e9d56dfaf22eb57ac7b8cbf3284d0c1 (patch) | |
tree | 74dfa77940c897d2a01c0e4e208365852e21c96e /libk8055/libk8055.c | |
parent | bf947e7f571eb9274f230d2d114b4ae4a245a1b7 (diff) | |
download | k8055-14a6dcb63e9d56dfaf22eb57ac7b8cbf3284d0c1.zip k8055-14a6dcb63e9d56dfaf22eb57ac7b8cbf3284d0c1.tar.gz |
upgrade search_devices
Diffstat (limited to 'libk8055/libk8055.c')
-rw-r--r-- | libk8055/libk8055.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libk8055/libk8055.c b/libk8055/libk8055.c index 40047d7..00aab65 100644 --- a/libk8055/libk8055.c +++ b/libk8055/libk8055.c @@ -288,11 +288,7 @@ int k8055_search_devices( void ) { for ( ssize_t i=0; i<cnt; i++ ) { if( libusb_get_device_descriptor( list[i], &usb_descr )==0 ) { if( usb_descr.idVendor==VELLEMAN_VENDOR_ID ) { - if( usb_dev->descriptor.idProduct == K8055_IPID + 0 ) ret |= 0x01; - if( usb_dev->descriptor.idProduct == K8055_IPID + 1 ) ret |= 0x02; - if( usb_dev->descriptor.idProduct == K8055_IPID + 2 ) ret |= 0x04; - if( usb_dev->descriptor.idProduct == K8055_IPID + 3 ) ret |= 0x08; - /* else some other kind of Velleman board */ + ret |= 0x01 << ( usb_descr.idProduct-K8055_IPID ); } } else { if( debug ) fprintf( stderr, "USB device descriptor unaccessible.\n" ); |