diff options
| author | sakumisu <[email protected]> | 2024-01-29 20:51:06 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-01-29 21:14:35 +0800 |
| commit | feb69dcd95584a23d60df4b34e886b66fed4b1c4 (patch) | |
| tree | 0ab97023ef505184370856fb968caebb11f194f2 | |
| parent | cdfb7c3fb2008ecaddac6b33decbcdb9a64b3446 (diff) | |
add zephyr bluetooth submodule
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | class/wireless/usbh_bluetooth.c | 10 | ||||
| -rw-r--r-- | third_party/zephyr_bluetooth-2.7.5/ble_hci_usbh.c (renamed from third_party/zephyr_bluetooth-2.x.x/ble_hci_usbh.c) | 7 | ||||
| m--------- | third_party/zephyr_bluetooth-2.7.5/zephyr_bluetooth | 0 |
4 files changed, 14 insertions, 6 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..f0e9fc77 --- /dev/null +++ b/.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 = [email protected]:sakumisu/zephyr_bluetooth.git diff --git a/class/wireless/usbh_bluetooth.c b/class/wireless/usbh_bluetooth.c index 82a2b07e..a774985f 100644 --- a/class/wireless/usbh_bluetooth.c +++ b/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 diff --git a/third_party/zephyr_bluetooth-2.x.x/ble_hci_usbh.c b/third_party/zephyr_bluetooth-2.7.5/ble_hci_usbh.c index 940fb741..0f30f341 100644 --- a/third_party/zephyr_bluetooth-2.x.x/ble_hci_usbh.c +++ b/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 */ diff --git a/third_party/zephyr_bluetooth-2.7.5/zephyr_bluetooth b/third_party/zephyr_bluetooth-2.7.5/zephyr_bluetooth new file mode 160000 +Subproject 2549662b2a5b1aa9f2c32e5117890ccf5b40fc2 |
