frameworks_bluetooth/framework/include/bt_config.h

136 lines
4.8 KiB
C

#ifndef __INCLUDE_BT_CONFIG_H
#define __INCLUDE_BT_CONFIG_H
// Configuration of Bluetooth Framework/Service/Stack
#if defined(__NuttX__)
#include <nuttx/config.h>
#elif defined(ANDROID)
#define CONFIG_LIB_BLUELET 1
#define CONFIG_QBUF_COUNT 20
#define CONFIG_BREDR 1
#define CONFIG_RFCOMM 1
#define CONFIG_LE 1
#define CONFIG_A2DP 1
#define CONFIG_BLUELET_A2DP_SBC_MAX_BIT_POOL 32
#define CONFIG_BLUELET_AVRCP_TG_ABSVOL_SUPPORT 1
#define CONFIG_BLUELET_AVRCP_MAX_CONNECTIONS 1
#define CONFIG_HFP 1
#define CONFIG_HFP_HF 1
#define CONFIG_HFP_AG 1
#define CONFIG_HID 1
#define CONFIG_BLUELET_HCI_H4 1
#define CONFIG_BLUELET_HCI_UART_NAME "/dev/ttyBT0"
#define CONFIG_BLUELET_HCI_RX_STACKSIZE 4096
#define CONFIG_BLUELET_DEBUG 1
#define CONFIG_BLUELET_DBG_HCI 1
#define CONFIG_BLUELET_DBG_HCIRAW 1
#define CONFIG_BLUELET_HCI_SNOOP_LOG_EN 1
#define CONFIG_BLUELET_HCI_SNOOP_CREATE_NEW 1
#define CONFIG_BLUELET_HCI_SNOOP_LOG_PATH "/data/misc/bt/snoop/"
#define CONFIG_BLUETOOTH 1
#define CONFIG_BLUETOOTH_BREDR_SUPPORT 1
#define CONFIG_BLUETOOTH_BLE_SUPPORT 1
#define CONFIG_BLUETOOTH_BLE_ADV 1
#define CONFIG_BLUETOOTH_BLE_SCAN 1
#define CONFIG_BLUETOOTH_GATT_CLIENT 1
#define CONFIG_BLUETOOTH_GATT_SERVER 1
#define CONFIG_BLUETOOTH_SERVICE_LOOP_THREAD_STACK_SIZE 8192
#define CONFIG_BLUETOOTH_SERVICE_LOOP_THREAD_PRIORITY 103
#define CONFIG_BLUETOOTH_AUDIO_TRANS_RPSMG_SERVER 1
#define CONFIG_BLUETOOTH_AUDIO_TRANS_ID_SOURCE_CTRL 0
#define CONFIG_BLUETOOTH_AUDIO_TRANS_ID_SOURCE_AUDIO 1
#define CONFIG_BLUETOOTH_AUDIO_TRANS_ID_SINK_CTRL 2
#define CONFIG_BLUETOOTH_AUDIO_TRANS_ID_SINK_AUDIO 3
#define CONFIG_BLUETOOTH_AUDIO_TRANS_ID_HFP_CTRL 4
#define CONFIG_BLUETOOTH_A2DP_SINK_CTRL_PATH "a2dp_sink_ctrl"
#define CONFIG_BLUETOOTH_A2DP_SINK_DATA_PATH "a2dp_sink_data"
#define CONFIG_BLUETOOTH_A2DP_SOURCE_CTRL_PATH "a2dp_source_ctrl"
#define CONFIG_BLUETOOTH_A2DP_SOURCE_DATA_PATH "a2dp_source_data"
#define CONFIG_BLUETOOTH_LEA_SINK_CTRL_PATH "lea_sink_ctrl"
#define CONFIG_BLUETOOTH_LEA_SINK_DATA_PATH "lea_sink_data"
#define CONFIG_BLUETOOTH_LEA_SOURCE_CTRL_PATH "lea_source_ctrl"
#define CONFIG_BLUETOOTH_LEA_SOURCE_DATA_PATH "lea_source_data"
#define CONFIG_BLUETOOTH_MAX_SAVED_REMOTE_UUIDS_LEN 80
#define CONFIG_BLUETOOTH_SCO_CTRL_PATH "sco_ctrl"
#define CONFIG_BLUETOOTH_L2CAP 1
#define CONFIG_BLUETOOTH_L2CAP_OUTGOING_MTU 2048
#define CONFIG_BLUETOOTH_GATTC_MAX_CONNECTIONS 8
#define CONFIG_BLUETOOTH_GATTS_MAX_ATTRIBUTE_NUM 10
#define CONFIG_BLUETOOTH_AVRCP_TARGET 1
#define CONFIG_BLUETOOTH_AVRCP_CONTROL 1
#define CONFIG_BLUETOOTH_A2DP_MAX_CONNECTIONS 1
#define CONFIG_HFP_HF_MAX_CONNECTIONS 1
#define CONFIG_HFP_HF_WEBCHAT_BLOCKER 1
#define CONFIG_BLUETOOTH_HFP_HF 1
#define CONFIG_HFP_AG_MAX_CONNECTIONS 1
#define CONFIG_BLUETOOTH_HFP_AG_PRIMARY_SLOT 0
#define CONFIG_BLUETOOTH_SPP 1
#define CONFIG_BLUETOOTH_SPP_MAX_CONNECTIONS 1
#define CONFIG_BLUETOOTH_SPP_SERVER_MAX_CONNECTIONS 8
#define CONFIG_BLUETOOTH_MAX_REGISTER_NUM 4
#define CONFIG_BLUETOOTH_FRAMEWORK 1
// #define CONFIG_BLUETOOTH_FRAMEWORK_LOCAL 1
#define CONFIG_BLUETOOTH_FRAMEWORK_SOCKET_IPC 1
#define CONFIG_BLUETOOTH_SOCKET_PORT 6001
#define CONFIG_BLUETOOTH_SERVICE 1
// #define CONFIG_BLUETOOTH_SERVER 1
#define CONFIG_BLUETOOTH_SERVER_NAME "bluetoothd"
#define CONFIG_BLUETOOTH_IPC_JOIN_LOOP 1
// #define CONFIG_BLUETOOTH_SERVICE_LOG_LEVEL 7
#define CONFIG_BLUETOOTH_SERVICE_HCI_UART_NAME "/dev/ttyHCI0"
#define CONFIG_BLUETOOTH_STACK_BREDR_BLUELET 1
#define CONFIG_BLUETOOTH_STACK_LE_BLUELET 1
#define CONFIG_BLUETOOTH_LE_SCANNER_MAX_NUM 2
#define CONFIG_BLUETOOTH_LE_ADVERTISER_MAX_NUM 2
#define CONFIG_BLUETOOTH_TOOLS 1
#define CONFIG_BLUETOOTH_VENDOR_BES 1
// Socket: via RPMsg
#define CONFIG_NET_RPMSG 1
// Socket: via IPv4
// #define CONFIG_NET_IPv4 1
// #define CONFIG_BLUETOOTH_NET_IPv4 1
#define CONFIG_INADDR_LOOPBACK 0x0A000202
// SPP
#define CONFIG_RPMSG_UART 1
// SPP via RPMsg UART "/dev/ttyDROID"
// #define CONFIG_RPMSG_UART 1
/********************* O95 Project Only *********************/
#if defined(ANDROID_12)
// Socket: RPMsg
#define CONFIG_BLUETOOTH_RPMSG_CPUNAME "ap"
/********************* O61 Project Only *********************/
#elif defined(ANDROID_14) || defined(ANDROID_15)
// Socket: RPMsg
#define CONFIG_BLUETOOTH_RPMSG_CPUNAME "cp"
// A2DP
#define CONFIG_BLUETOOTH_A2DP 1
#define CONFIG_BLUETOOTH_A2DP_SOURCE 1
// HFP
#define CONFIG_BLUETOOTH_HFP_AG 1
// HID
#define CONFIG_BLUETOOTH_HID_DEVICE 1
#endif
#endif
// Platform: 32-bit or 64-bit
#if defined(CONFIG_ARCH_ARM64) || defined(ARCH_X86_64) || defined(ANDROID) || (!defined(CONFIG_SIM_M32) && defined(CONFIG_ARCH_SIM)) || defined(CONFIG_ARCH_X86_64)
#define CONFIG_CPU_BIT64 1
#elif defined(ARCH_ARM) || defined(ARCH_X86)
#define CONFIG_CPU_BIT32 1
#endif
// ############################################################################
#define CONFIG_y 1
#define CONFIG_m 2
#endif //__INCLUDE_BT_CONFIG_H