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>
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>
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>
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>