#
# Copyright (c) 2021-2023 Huawei Device Co., Ltd.
#
# This file is dual licensed: you can use it either under the terms of
# the GPL, or the BSD license, at your option.
# See the LICENSE file in the root of this repository for complete details.
#

import("../../khdf/liteos_m/hdf.gni")

module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_GPIO)
module_name = get_path_info(rebase_path("."), "name")

hdf_driver(module_name) {
  sources = []
  if (defined(LOSCFG_SOC_COMPANY_BESTECHNIC)) {
    sources += [ "gpio_bes.c" ]
  }
  if (defined(LOSCFG_SOC_COMPANY_GOODIX)) {
    sources += [ "gpio_gr5xx.c" ]
  }
  if (defined(LOSCFG_SOC_COMPANY_ASRMICRO)) {
    sources += [ "gpio_asr.c" ]
  }
  if (defined(LOSCFG_SOC_COMPANY_WINNERMICRO)) {
    sources += [ "gpio_wm.c" ]
  }
  if (defined(LOSCFG_SOC_SERIES_STM32F4xx)) {
    sources += [ "gpio_stm32f4xx.c" ]
  }

  include_dirs = [ "." ]
}