forked from PAWPAW-Mirror/lib_xua
Fix Pi build of xmosdfu
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
all:
|
all:
|
||||||
g++ -g -o xmosdfu xmosdfu.cpp -Ilibusb/OSX libusb/OSX/libusb-1.0.0.dylib -m32
|
g++ -g -o xmosdfu xmosdfu.cpp -Ilibusb/OSX libusb/OSX/libusb-1.0.0.dylib -m32 -Wall
|
||||||
|
|||||||
@@ -5,4 +5,4 @@
|
|||||||
# vendor and product IDs
|
# vendor and product IDs
|
||||||
|
|
||||||
xmosdfu: xmosdfu.cpp
|
xmosdfu: xmosdfu.cpp
|
||||||
g++ -D_GNU_SOURCE -Wall -g -o xmosdfu -Ilibusb/Rasp -lusb-1.0 xmosdfu.cpp
|
g++ -D_GNU_SOURCE -Wall -g -o xmosdfu -Ilibusb/Rasp -lusb-1.0 -x c xmosdfu.cpp -std=c99
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ static int find_xmos_device(unsigned int id, unsigned int pid, unsigned int list
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
libusb_config_descriptor *config_desc = NULL;
|
struct libusb_config_descriptor *config_desc = NULL;
|
||||||
libusb_get_active_config_descriptor(dev, &config_desc);
|
libusb_get_active_config_descriptor(dev, &config_desc);
|
||||||
if (config_desc != NULL)
|
if (config_desc != NULL)
|
||||||
{
|
{
|
||||||
@@ -94,7 +94,7 @@ static int find_xmos_device(unsigned int id, unsigned int pid, unsigned int list
|
|||||||
for (int j = 0; j < config_desc->bNumInterfaces; j++)
|
for (int j = 0; j < config_desc->bNumInterfaces; j++)
|
||||||
{
|
{
|
||||||
//printf("%d\n", j);
|
//printf("%d\n", j);
|
||||||
const libusb_interface_descriptor *inter_desc = ((libusb_interface *)&config_desc->interface[j])->altsetting;
|
const struct libusb_interface_descriptor *inter_desc = ((struct libusb_interface *)&config_desc->interface[j])->altsetting;
|
||||||
if (inter_desc->bInterfaceClass == 0xFE && inter_desc->bInterfaceSubClass == 0x1)
|
if (inter_desc->bInterfaceClass == 0xFE && inter_desc->bInterfaceSubClass == 0x1)
|
||||||
{
|
{
|
||||||
XMOS_DFU_IF = j;
|
XMOS_DFU_IF = j;
|
||||||
@@ -563,5 +563,5 @@ int main(int argc, char **argv)
|
|||||||
libusb_close(devh);
|
libusb_close(devh);
|
||||||
libusb_exit(NULL);
|
libusb_exit(NULL);
|
||||||
|
|
||||||
return true;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user