Merge pull request #160 from mrbubble62/patch-2

Use C89 declarations to support MSVC2012
This commit is contained in:
Dominic Spill
2015-04-24 07:21:53 +01:00

View File

@ -642,6 +642,9 @@ int ADDCALL hackrf_spiflash_read(hackrf_device* device, const uint32_t address,
int ADDCALL hackrf_cpld_write(hackrf_device* device,
unsigned char* const data, const unsigned int total_length)
{
const unsigned int chunk_size = 512;
unsigned int i;
int transferred = 0;
int result = libusb_release_interface(device->usb_device, 0);
if (result != LIBUSB_SUCCESS) {
return HACKRF_ERROR_LIBUSB;
@ -657,9 +660,6 @@ int ADDCALL hackrf_cpld_write(hackrf_device* device,
return HACKRF_ERROR_LIBUSB;
}
const unsigned int chunk_size = 512;
unsigned int i;
int transferred = 0;
for (i = 0; i < total_length; i += chunk_size)
{
result = libusb_bulk_transfer(