Merge pull request #160 from mrbubble62/patch-2
Use C89 declarations to support MSVC2012
This commit is contained in:
@ -642,6 +642,9 @@ int ADDCALL hackrf_spiflash_read(hackrf_device* device, const uint32_t address,
|
|||||||
int ADDCALL hackrf_cpld_write(hackrf_device* device,
|
int ADDCALL hackrf_cpld_write(hackrf_device* device,
|
||||||
unsigned char* const data, const unsigned int total_length)
|
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);
|
int result = libusb_release_interface(device->usb_device, 0);
|
||||||
if (result != LIBUSB_SUCCESS) {
|
if (result != LIBUSB_SUCCESS) {
|
||||||
return HACKRF_ERROR_LIBUSB;
|
return HACKRF_ERROR_LIBUSB;
|
||||||
@ -657,9 +660,6 @@ int ADDCALL hackrf_cpld_write(hackrf_device* device,
|
|||||||
return HACKRF_ERROR_LIBUSB;
|
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)
|
for (i = 0; i < total_length; i += chunk_size)
|
||||||
{
|
{
|
||||||
result = libusb_bulk_transfer(
|
result = libusb_bulk_transfer(
|
||||||
|
Reference in New Issue
Block a user