Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bc15d00 authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi
Browse files

floss: Add socket profile to topshim

Add support for the BT socket profile to topshim.

Bug: 233123338
Tag: #floss
Test: ./build.py
Change-Id: I376c066a89077f6989a06770270b442e75882b58
parent 8f2bd80e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -126,6 +126,8 @@ rust_bindgen {
        "--allowlist-type=btgatt_.*",
        "--allowlist-type=bluetooth_sdp.*",
        "--allowlist-type=btsdp.*",
        "--allowlist-type=btsock_.*",
        "--allowlist-type=sock_connect_signal_t",
        "--enable-cxx-namespaces",
        "--opaque-type=std::.*",
        "--with-derive-default",
+1 −0
Original line number Diff line number Diff line
@@ -9,3 +9,4 @@
#include "hardware/bt_gatt.h"
#include "hardware/bt_hh.h"
#include "hardware/bt_sdp.h"
#include "hardware/bt_sock.h"
+2 −1
Original line number Diff line number Diff line
@@ -46,7 +46,8 @@ fn main() {
        .clang_args(clang_args)
        .enable_cxx_namespaces()
        .size_t_is_usize(true)
        .allowlist_type("(bt_|bthh_|btgatt_|btsdp|bluetooth_sdp).*")
        .allowlist_type("(bt_|bthh_|btgatt_|btsdp|bluetooth_sdp|btsock_).*")
        .allowlist_type("sock_connect_signal_t")
        .allowlist_function("(bt_|bthh_|btgatt_|btsdp).*")
        .allowlist_function("hal_util_.*")
        // We must opaque out std:: in order to prevent bindgen from choking
+2 −0
Original line number Diff line number Diff line
@@ -553,6 +553,7 @@ pub enum SupportedProfiles {
    A2dp,
    Gatt,
    Sdp,
    Socket,
}

impl From<SupportedProfiles> for Vec<u8> {
@@ -563,6 +564,7 @@ impl From<SupportedProfiles> for Vec<u8> {
            SupportedProfiles::A2dp => "a2dp",
            SupportedProfiles::Gatt => "gatt",
            SupportedProfiles::Sdp => "sdp",
            SupportedProfiles::Socket => "socket",
        }
        .bytes()
        .chain("\0".bytes())
+1 −0
Original line number Diff line number Diff line
@@ -6,3 +6,4 @@ pub mod gatt;
pub mod hfp;
pub mod hid_host;
pub mod sdp;
pub mod socket;
Loading