1# Copyright (c) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13import("//build/ohos.gni") 14import("//build/ohos/ndk/ndk.gni") 15 16config("bt_warnings") { 17 cflags = [ 18 "-Wall", 19 "-Werror", 20 "-Wno-switch", 21 "-Wno-unused-function", 22 "-Wno-unused-parameter", 23 "-Wno-unused-variable", 24 "-Wno-implicit-function-declaration", 25 "-Wno-incompatible-pointer-types", 26 "-Wno-unused-but-set-variable", 27 ] 28} 29 30ohos_prebuilt_etc("BCM4362A2.hcd") { 31 source = "//vendor/${product_company}/${product_name}/bluetooth/BCM4362A2.hcd" 32 install_images = [ chipset_base_dir ] 33 relative_install_dir = "firmware" 34 part_name = "rockchip_products" 35 install_enable = true 36} 37 38ohos_shared_library("libbt_vendor") { 39 output_name = "libbt_vendor" 40 sources = [ 41 "src/bt_vendor_brcm.c", 42 "src/conf.c", 43 "src/hardware.c", 44 "src/upio.c", 45 "src/userial_vendor.c", 46 ] 47 48 include_dirs = [ 49 "include", 50 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 51 ] 52 53 cflags = [ 54 "-DUSE_CONTROLLER_BDADDR=TRUE", 55 "-DFW_AUTO_DETECTION=TRUE", 56 "-DBT_WAKE_VIA_PROC=FALSE", 57 "-DSCO_PCM_ROUTING=0", 58 "-DSCO_PCM_IF_CLOCK_RATE=1", 59 "-DSCO_PCM_IF_FRAME_TYPE=0", 60 "-DSCO_PCM_IF_SYNC_MODE=0", 61 "-DSCO_PCM_IF_CLOCK_MODE=0", 62 "-DPCM_DATA_FMT_SHIFT_MODE=0", 63 "-DPCM_DATA_FMT_FILL_BITS=0x03", 64 "-DPCM_DATA_FMT_FILL_METHOD=0", 65 "-DPCM_DATA_FMT_FILL_NUM=0", 66 "-DPCM_DATA_FMT_JUSTIFY_MODE=0", 67 ] 68 69 configs = [ ":bt_warnings" ] 70 71 external_deps = [ 72 "c_utils:utils", 73 "hilog:libhilog", 74 ] 75 76 install_enable = true 77 install_images = [ chipset_base_dir ] 78 79 part_name = "rockchip_products" 80 subsystem_name = "rockchip_products" 81} 82