Просмотр исходного кода

add zephyr bluetooth submodule

sakumisu 1 год назад
Родитель
Сommit
feb69dcd95

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "third_party/zephyr_bluetooth-2.7.5/zephyr_bluetooth"]
+	path = third_party/zephyr_bluetooth-2.7.5/zephyr_bluetooth
+	url = git@github.com:sakumisu/zephyr_bluetooth.git

+ 10 - 0
class/wireless/usbh_bluetooth.c

@@ -392,4 +392,14 @@ CLASS_INFO_DEFINE const struct usbh_class_info bluetooth_h4_nrf_class_info = {
     .pid = 0x000c,
     .class_driver = &bluetooth_class_driver
 };
+#else
+CLASS_INFO_DEFINE const struct usbh_class_info bluetooth_class_info = {
+    .match_flags = USB_CLASS_MATCH_INTF_CLASS | USB_CLASS_MATCH_INTF_SUBCLASS | USB_CLASS_MATCH_INTF_PROTOCOL,
+    .class = USB_DEVICE_CLASS_WIRELESS,
+    .subclass = 0x01,
+    .protocol = 0x01,
+    .vid = 0x00,
+    .pid = 0x00,
+    .class_driver = &bluetooth_class_driver
+};
 #endif

+ 1 - 6
third_party/zephyr_bluetooth-2.x.x/ble_hci_usbh.c → third_party/zephyr_bluetooth-2.7.5/ble_hci_usbh.c

@@ -1,12 +1,7 @@
 #include "usbh_core.h"
 #include "usbh_bluetooth.h"
 
-#include <sys/byteorder.h>
-#include <drivers/bluetooth/hci_driver.h>
-
-#ifndef CONFIG_BT_RECV_IS_RX_THREAD
-#error usb bluetooth must enable CONFIG_BT_RECV_IS_RX_THREAD
-#endif
+#include <zephyr.h>
 
 /* compatible with low version that less than v2.7.5 */
 

+ 1 - 0
third_party/zephyr_bluetooth-2.7.5/zephyr_bluetooth

@@ -0,0 +1 @@
+Subproject commit 2549662b2a5b1aa9f2c32e5117890ccf5b40fc2d