diff options
author | ttsou | 2009-09-14 01:16:52 -0400 |
---|---|---|
committer | ttsou | 2009-09-16 17:08:52 -0400 |
commit | 55e8ef7a4f94e7b6562ed29626a578cca1fcec34 (patch) | |
tree | 745be61b6d014be6f8521fec9dbd6ac778b90317 /usrp/host/lib | |
parent | 0f03f1c1d460d865aeff91b9538266b0b210a357 (diff) | |
download | gnuradio-55e8ef7a4f94e7b6562ed29626a578cca1fcec34.tar.gz gnuradio-55e8ef7a4f94e7b6562ed29626a578cca1fcec34.tar.bz2 gnuradio-55e8ef7a4f94e7b6562ed29626a578cca1fcec34.zip |
Fixed bug usb_control_transfer bug
Diffstat (limited to 'usrp/host/lib')
-rw-r--r-- | usrp/host/lib/usrp_prims_common.cc | 8 | ||||
-rw-r--r-- | usrp/host/lib/usrp_prims_libusb.cc | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/usrp/host/lib/usrp_prims_common.cc b/usrp/host/lib/usrp_prims_common.cc index 1517d51ac..c71ba90b0 100644 --- a/usrp/host/lib/usrp_prims_common.cc +++ b/usrp/host/lib/usrp_prims_common.cc @@ -218,8 +218,8 @@ write_internal_ram (libusb_device_handle *udh, unsigned char *buf, if (n > quanta) n = quanta; - a = usb_control_transfer (udh, 0x40, 0xA0, - addr, 0, (unsigned char *)(buf + (addr - start_addr)), n, 1000); + a = usb_control_transfer (udh, 0x40, 0xA0, addr, 0, + (unsigned char*)(buf + (addr - start_addr)), n, 1000); if (a < 0){ fprintf(stderr,"write_internal_ram failed: %u\n", a); @@ -425,7 +425,7 @@ usrp_set_hash (libusb_device_handle *udh, int which, // we use the Cypress firmware down load command to jam it in. int r = usb_control_transfer (udh, 0x40, 0xa0, hash_slot_addr[which], 0, - (unsigned char *) hash, USRP_HASH_SIZE, 1000); + (unsigned char *) hash, USRP_HASH_SIZE, 1000); return r == USRP_HASH_SIZE; } @@ -437,7 +437,7 @@ usrp_get_hash (libusb_device_handle *udh, int which, // we use the Cypress firmware upload command to fetch it. int r = usb_control_transfer (udh, 0xc0, 0xa0, hash_slot_addr[which], 0, - (unsigned char *) hash, USRP_HASH_SIZE, 1000); + (unsigned char *) hash, USRP_HASH_SIZE, 1000); return r == USRP_HASH_SIZE; } diff --git a/usrp/host/lib/usrp_prims_libusb.cc b/usrp/host/lib/usrp_prims_libusb.cc index d07caaa9d..999dc5897 100644 --- a/usrp/host/lib/usrp_prims_libusb.cc +++ b/usrp/host/lib/usrp_prims_libusb.cc @@ -26,7 +26,6 @@ #include "usrp/usrp_prims.h" #include "usrp_commands.h" -//#include "usrp_ids.h" #include <usb.h> #include <errno.h> #include <stdio.h> @@ -60,8 +59,9 @@ usb_control_transfer (struct usb_dev_handle *udh, int request_type, int request, int value, int index, unsigned char *data, int length, unsigned int timeout) { - return usb_control_msg (udh, request_type, request, value, index, - (char*) *data, length, (int) timeout); + return usb_control_msg (udh, request_type, + request, value, index, + (char*) data, length, (int) timeout); } |