Commit Graph

7 Commits

Author SHA1 Message Date
zhongzhijie1 d79629bfa4 Rename helper func get_os_timestamp_xx to bt_get_os_timestamp_xx avoid
naming confict.

bug: v/59638

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2026-04-27 23:14:51 +08:00
zhongzhijie1 fe21f0767d [feat] Implement easy insertion of timeval measurements.
bug: V/43595

Changes:
1. Enabled Kconfig option BLUETOOTH_DEBUG_TIMEVAL, choice BLUETOOTH_DEBUG_TIME_UNIT_US enable or not.
2. Included 'bt_debug.h' in Bluetooth service or Bluetooth stack (bluelet).
3. Usage instructions:
   - In any function, first define the timeval structure by calling BT_DEBUG_MKTIMEVAL_S(name_s); at the global scope of the .c file.
   - Then, within the function, call BT_DEBUG_ENTER_TIME_SECTION(name_s); to record the entry time.
   - Finally, call BT_DEBUG_EXIT_TIME_SECTION(name_s); to record the exit time.

Example:

BT_DEBUG_MKTIMEVAL_S(hci_poll_recv);  // Suggest using the function name; since '__func__' cannot be used in precompile state, you need to input it manually.

static void hci_poll_recv(service_poll_t* poll, int revent, void* userdata)
{
    (void)poll;
    (void)userdata;

    if (revent & (POLL_ERROR | POLL_DISCONNECT))
        hci_remove_recv(NULL);

    if (revent & POLL_READABLE) {
        BT_DEBUG_ENTER_TIME_SECTION(hci_poll_recv); // Record entry time.
        bt_sal_hci_transport_recv();
        BT_DEBUG_EXIT_TIME_SECTION(hci_poll_recv);  // Record exit time.
    }
}

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2026-04-27 23:14:50 +08:00
openvela-robot 9d0c825cbb Merge commit
Change-Id: If26995eebd18a82ac4cd827e6801458e57a6ead3
2026-04-27 23:14:50 +08:00
zhongzhijie1 6a6ed8c170 Rename helper func get_os_timestamp_xx to bt_get_os_timestamp_xx avoid
naming confict.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2026-04-20 14:51:29 +08:00
zhongzhijie1 800d25625c [feat] Implement easy insertion of timeval measurements.
Changes:
1. Enabled Kconfig option BLUETOOTH_DEBUG_TIMEVAL, choice BLUETOOTH_DEBUG_TIME_UNIT_US enable or not.
2. Included 'bt_debug.h' in Bluetooth service or Bluetooth stack (bluelet).
3. Usage instructions:
   - In any function, first define the timeval structure by calling BT_DEBUG_MKTIMEVAL_S(name_s); at the global scope of the .c file.
   - Then, within the function, call BT_DEBUG_ENTER_TIME_SECTION(name_s); to record the entry time.
   - Finally, call BT_DEBUG_EXIT_TIME_SECTION(name_s); to record the exit time.

Example:

BT_DEBUG_MKTIMEVAL_S(hci_poll_recv);  // Suggest using the function name; since '__func__' cannot be used in precompile state, you need to input it manually.

static void hci_poll_recv(service_poll_t* poll, int revent, void* userdata)
{
    (void)poll;
    (void)userdata;

    if (revent & (POLL_ERROR | POLL_DISCONNECT))
        hci_remove_recv(NULL);

    if (revent & POLL_READABLE) {
        BT_DEBUG_ENTER_TIME_SECTION(hci_poll_recv); // Record entry time.
        bt_sal_hci_transport_recv();
        BT_DEBUG_EXIT_TIME_SECTION(hci_poll_recv);  // Record exit time.
    }
}

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2026-04-20 14:51:26 +08:00
Haishen Zhang a0e4fc05f1 Android-Vela: Add support to RPMsg UART
1. Add support to RPMsg UART
2. Enable SPP over PRMsg UART
   Before, we need "mount -t rpmsgfs -o cpu=cp,fs=/dev/pts /dev/cp/pts".
   But, it's NOT supported any more for wrong POLL behaviors which might block the system.
3. Add Android LOGD to print debug logs
4. Android.bp(Need to add a Go file to check whether it's Android 12 or Android 14)

Signed-off-by: Haishen Zhang <zhanghaishen@xiaomi.com>
2026-04-20 14:51:16 +08:00
Haishen Zhang 6ed1e5e080 Vela-Android: Porting Vela Bluetooth Framework Socket Client to Android x86_64
1. Port Vela Bluetooth Framework Socket Client onto Android.
2. For Socket Server, Service, SAL, we didn't port them onto Android.
3. For bttool, the function is not ready yet.
4. With this libbt-framework-client.so, we can start working on BTIF wrapper over Vela BT Framework Socket Client API.
5. And, we can also start working on bttool over Vela BT Framework Socket Client API later.

Signed-off-by: Haishen Zhang <zhanghaishen@xiaomi.com>
2026-04-20 14:51:00 +08:00