10b966c5eSopenharmony_ci# Copyright (C) 2022 HiHope Open Source Organization . 20b966c5eSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 30b966c5eSopenharmony_ci# you may not use this file except in compliance with the License. 40b966c5eSopenharmony_ci# You may obtain a copy of the License at 50b966c5eSopenharmony_ci# 60b966c5eSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 70b966c5eSopenharmony_ci# 80b966c5eSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 90b966c5eSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 100b966c5eSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 110b966c5eSopenharmony_ci# See the License for the specific language governing permissions and 120b966c5eSopenharmony_ci# limitations under the License. 130b966c5eSopenharmony_ciimport("//build/ohos.gni") 140b966c5eSopenharmony_ciimport("//build/ohos/ndk/ndk.gni") 150b966c5eSopenharmony_ci 160b966c5eSopenharmony_ciconfig("bt_warnings") { 170b966c5eSopenharmony_ci cflags = [ 180b966c5eSopenharmony_ci "-Wall", 190b966c5eSopenharmony_ci "-Werror", 200b966c5eSopenharmony_ci "-Wno-switch", 210b966c5eSopenharmony_ci "-Wno-unused-function", 220b966c5eSopenharmony_ci "-Wno-unused-parameter", 230b966c5eSopenharmony_ci "-Wno-unused-variable", 240b966c5eSopenharmony_ci "-Wno-implicit-function-declaration", 250b966c5eSopenharmony_ci "-Wno-incompatible-pointer-types", 260b966c5eSopenharmony_ci ] 270b966c5eSopenharmony_ci} 280b966c5eSopenharmony_ci 290b966c5eSopenharmony_ciohos_prebuilt_etc("BCM4362A2.hcd") { 300b966c5eSopenharmony_ci source = "//vendor/${product_company}/${product_name}/bluetooth/BCM4362A2.hcd" 310b966c5eSopenharmony_ci install_images = [ chipset_base_dir ] 320b966c5eSopenharmony_ci relative_install_dir = "firmware" 330b966c5eSopenharmony_ci part_name = "device_rk3588" 340b966c5eSopenharmony_ci install_enable = true 350b966c5eSopenharmony_ci} 360b966c5eSopenharmony_ci 370b966c5eSopenharmony_ciohos_shared_library("libbt_vendor") { 380b966c5eSopenharmony_ci output_name = "libbt_vendor" 390b966c5eSopenharmony_ci sources = [ 400b966c5eSopenharmony_ci "src/bt_vendor_brcm.c", 410b966c5eSopenharmony_ci "src/conf.c", 420b966c5eSopenharmony_ci "src/hardware.c", 430b966c5eSopenharmony_ci "src/upio.c", 440b966c5eSopenharmony_ci "src/userial_vendor.c", 450b966c5eSopenharmony_ci ] 460b966c5eSopenharmony_ci 470b966c5eSopenharmony_ci include_dirs = [ 480b966c5eSopenharmony_ci "include", 490b966c5eSopenharmony_ci "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 500b966c5eSopenharmony_ci "//foundation/communication/bluetooth/services/bluetooth/hardware/include", 510b966c5eSopenharmony_ci ] 520b966c5eSopenharmony_ci 530b966c5eSopenharmony_ci cflags = [ 540b966c5eSopenharmony_ci "-DUSE_CONTROLLER_BDADDR=TRUE", 550b966c5eSopenharmony_ci "-DFW_AUTO_DETECTION=TRUE", 560b966c5eSopenharmony_ci "-DBT_WAKE_VIA_PROC=FALSE", 570b966c5eSopenharmony_ci "-DSCO_PCM_ROUTING=0", 580b966c5eSopenharmony_ci "-DSCO_PCM_IF_CLOCK_RATE=1", 590b966c5eSopenharmony_ci "-DSCO_PCM_IF_FRAME_TYPE=0", 600b966c5eSopenharmony_ci "-DSCO_PCM_IF_SYNC_MODE=0", 610b966c5eSopenharmony_ci "-DSCO_PCM_IF_CLOCK_MODE=0", 620b966c5eSopenharmony_ci "-DPCM_DATA_FMT_SHIFT_MODE=0", 630b966c5eSopenharmony_ci "-DPCM_DATA_FMT_FILL_BITS=0x03", 640b966c5eSopenharmony_ci "-DPCM_DATA_FMT_FILL_METHOD=0", 650b966c5eSopenharmony_ci "-DPCM_DATA_FMT_FILL_NUM=0", 660b966c5eSopenharmony_ci "-DPCM_DATA_FMT_JUSTIFY_MODE=0", 670b966c5eSopenharmony_ci ] 680b966c5eSopenharmony_ci 690b966c5eSopenharmony_ci configs = [ ":bt_warnings" ] 700b966c5eSopenharmony_ci 710b966c5eSopenharmony_ci external_deps = [ 720b966c5eSopenharmony_ci "c_utils:utils", 730b966c5eSopenharmony_ci "hilog:libhilog", 740b966c5eSopenharmony_ci ] 750b966c5eSopenharmony_ci 760b966c5eSopenharmony_ci install_enable = true 770b966c5eSopenharmony_ci install_images = [ chipset_base_dir ] 780b966c5eSopenharmony_ci 790b966c5eSopenharmony_ci part_name = "device_rk3588" 800b966c5eSopenharmony_ci subsystem_name = "device_rk3588" 810b966c5eSopenharmony_ci} 82