mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 00:28:18 +00:00
add XCode settings for libusb-1.0 in /usr/local/
This commit is contained in:
parent
359f6fcae4
commit
8f29b25e4b
@ -28,6 +28,7 @@ LDFLAGS = \
|
||||
|
||||
SRCS = \
|
||||
bt_control_iphone.c \
|
||||
daemon.c \
|
||||
hci.c \
|
||||
hci_dump.c \
|
||||
hci_transport_h4.c \
|
||||
|
@ -9,6 +9,8 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
9C1F0E9A0FDAE023008F472F /* run_loop.c in Sources */ = {isa = PBXBuildFile; fileRef = 9C1F0E980FDAE023008F472F /* run_loop.c */; };
|
||||
9C1F0F340FDB024B008F472F /* socket_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 9C1F0F320FDB024B008F472F /* socket_server.c */; };
|
||||
9C2071F310014D3200A07EA4 /* hci_transport_usb.c in Sources */ = {isa = PBXBuildFile; fileRef = 9C2071F210014D3200A07EA4 /* hci_transport_usb.c */; };
|
||||
9C20720F10025E0500A07EA4 /* libusb-1.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C20720E10025E0500A07EA4 /* libusb-1.0.dylib */; };
|
||||
9C46FBAF0FA8F31800ABEF05 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 9C46FBAE0FA8F31800ABEF05 /* main.c */; };
|
||||
9C46FC390FA906F700ABEF05 /* hci.c in Sources */ = {isa = PBXBuildFile; fileRef = 9C46FC340FA906F700ABEF05 /* hci.c */; };
|
||||
9C46FC3A0FA906F700ABEF05 /* hci_transport_h4.c in Sources */ = {isa = PBXBuildFile; fileRef = 9C46FC360FA906F700ABEF05 /* hci_transport_h4.c */; };
|
||||
@ -37,6 +39,8 @@
|
||||
9C1F0E990FDAE023008F472F /* run_loop.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = run_loop.h; path = src/run_loop.h; sourceTree = "<group>"; };
|
||||
9C1F0F320FDB024B008F472F /* socket_server.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = socket_server.c; path = src/socket_server.c; sourceTree = "<group>"; };
|
||||
9C1F0F330FDB024B008F472F /* socket_server.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = socket_server.h; path = src/socket_server.h; sourceTree = "<group>"; };
|
||||
9C2071F210014D3200A07EA4 /* hci_transport_usb.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = hci_transport_usb.c; path = src/hci_transport_usb.c; sourceTree = "<group>"; };
|
||||
9C20720E10025E0500A07EA4 /* libusb-1.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libusb-1.0.dylib"; path = "/usr/local/lib/libusb-1.0.dylib"; sourceTree = "<absolute>"; };
|
||||
9C46FBAE0FA8F31800ABEF05 /* main.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = main.c; path = src/main.c; sourceTree = "<group>"; usesTabs = 0; };
|
||||
9C46FC340FA906F700ABEF05 /* hci.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = hci.c; path = src/hci.c; sourceTree = "<group>"; };
|
||||
9C46FC350FA906F700ABEF05 /* hci.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = hci.h; path = src/hci.h; sourceTree = "<group>"; };
|
||||
@ -62,6 +66,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9C20720F10025E0500A07EA4 /* libusb-1.0.dylib in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -71,6 +76,7 @@
|
||||
08FB7794FE84155DC02AAC07 /* project */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9C20720E10025E0500A07EA4 /* libusb-1.0.dylib */,
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
C6A0FF2B0290797F04C91782 /* Documentation */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
@ -94,6 +100,7 @@
|
||||
9C46FC380FA906F700ABEF05 /* hci_transport.h */,
|
||||
9C46FC370FA906F700ABEF05 /* hci_transport_h4.h */,
|
||||
9C46FC360FA906F700ABEF05 /* hci_transport_h4.c */,
|
||||
9C2071F210014D3200A07EA4 /* hci_transport_usb.c */,
|
||||
9C88500C0FBF6702004980E4 /* l2cap.c */,
|
||||
9C88500D0FBF6702004980E4 /* l2cap.h */,
|
||||
9C46FBAE0FA8F31800ABEF05 /* main.c */,
|
||||
@ -176,6 +183,7 @@
|
||||
9C1F0F340FDB024B008F472F /* socket_server.c in Sources */,
|
||||
9CC813A20FFC0774002816F9 /* btstack.c in Sources */,
|
||||
9CC813A50FFC0A51002816F9 /* daemon.c in Sources */,
|
||||
9C2071F310014D3200A07EA4 /* hci_transport_usb.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -192,6 +200,10 @@
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/sw/lib,
|
||||
);
|
||||
PRODUCT_NAME = project;
|
||||
};
|
||||
name = Debug;
|
||||
@ -203,6 +215,10 @@
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/sw/lib,
|
||||
);
|
||||
PRODUCT_NAME = project;
|
||||
};
|
||||
name = Release;
|
||||
@ -215,6 +231,10 @@
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
/sw/include,
|
||||
/usr/local/include,
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
@ -257,6 +277,10 @@
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/sw/lib,
|
||||
);
|
||||
PRODUCT_NAME = project;
|
||||
};
|
||||
name = "Debug iPhone";
|
||||
|
@ -51,7 +51,7 @@ int find_bt(libusb_device **devs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
int usb_main(void)
|
||||
{
|
||||
libusb_device **devs;
|
||||
int r;
|
||||
@ -77,13 +77,15 @@ int main(void)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
#if 0
|
||||
r = libusb_detach_kernel_driver (handle, 0);
|
||||
if (r < 0) {
|
||||
fprintf(stderr, "libusb_detach_kernel_driver error %d\n", r);
|
||||
goto close;
|
||||
}
|
||||
printf("libusb_detach_kernel_driver\n");
|
||||
|
||||
#endif
|
||||
|
||||
libusb_claim_interface(handle, 0);
|
||||
if (r < 0) {
|
||||
fprintf(stderr, "usb_claim_interface error %d\n", r);
|
||||
@ -91,6 +93,7 @@ int main(void)
|
||||
}
|
||||
printf("claimed interface 0\n");
|
||||
|
||||
#if 0
|
||||
struct libusb_config_descriptor *config_descriptor;
|
||||
r = libusb_get_active_config_descriptor(dev, &config_descriptor);
|
||||
printf("configuration: %u interfacs\n", config_descriptor->bNumInterfaces);
|
||||
@ -101,6 +104,7 @@ int main(void)
|
||||
for (r=0;r<interface0descriptor->bNumEndpoints;r++,endpoint++){
|
||||
printf("endpoint %x, attributes %x\n", endpoint->bEndpointAddress, endpoint->bmAttributes);
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t hci_reset[] = { 0x03, 0x0c, 0x00 };
|
||||
r = libusb_control_transfer (handle, LIBUSB_REQUEST_TYPE_CLASS,
|
||||
@ -132,7 +136,7 @@ out:
|
||||
release_interface:
|
||||
libusb_release_interface(handle, 0);
|
||||
reattach:
|
||||
libusb_attach_kernel_driver (handle, 0);
|
||||
// libusb_attach_kernel_driver (handle, 0);
|
||||
close:
|
||||
libusb_close(handle);
|
||||
exit:
|
||||
|
Loading…
Reference in New Issue
Block a user