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