1c5e268c6Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
2c5e268c6Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3c5e268c6Sopenharmony_ci# you may not use this file except in compliance with the License.
4c5e268c6Sopenharmony_ci# You may obtain a copy of the License at
5c5e268c6Sopenharmony_ci#
6c5e268c6Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7c5e268c6Sopenharmony_ci#
8c5e268c6Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9c5e268c6Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10c5e268c6Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11c5e268c6Sopenharmony_ci# See the License for the specific language governing permissions and
12c5e268c6Sopenharmony_ci# limitations under the License..
13c5e268c6Sopenharmony_ci
14c5e268c6Sopenharmony_citemplate("interface") {
15c5e268c6Sopenharmony_ci  if (is_standard_system) {
16c5e268c6Sopenharmony_ci    import("//drivers/hdf_core/adapter/uhdf2/hdi.gni")
17c5e268c6Sopenharmony_ci    hdi(target_name) {
18c5e268c6Sopenharmony_ci      # the default value of system is "full"
19c5e268c6Sopenharmony_ci      # the default value generator mode is "ipc", the optional values are "ipc" or "passthrough"
20c5e268c6Sopenharmony_ci      # the default value of language is "cpp", the optional values are "c" or "cpp"
21c5e268c6Sopenharmony_ci      forward_variables_from(invoker, "*")
22c5e268c6Sopenharmony_ci    }
23c5e268c6Sopenharmony_ci  } else if (is_small_system) {
24c5e268c6Sopenharmony_ci    import("//drivers/hdf_core/adapter/uhdf/hdi_small.gni")
25c5e268c6Sopenharmony_ci    hdi_small(target_name) {
26c5e268c6Sopenharmony_ci      # the default value of system is "lite"
27c5e268c6Sopenharmony_ci      # the default value generator mode is "passthrough", the optional values is "passthrough"
28c5e268c6Sopenharmony_ci      # the default value of language is "c", the optional values are "c" or "cpp"
29c5e268c6Sopenharmony_ci      forward_variables_from(invoker, "*")
30c5e268c6Sopenharmony_ci    }
31c5e268c6Sopenharmony_ci  } else if (is_mini_system) {
32c5e268c6Sopenharmony_ci    import("//drivers/hdf_core/adapter/khdf/liteos_m/hdi_mini.gni")
33c5e268c6Sopenharmony_ci    hdi_mini(target_name) {
34c5e268c6Sopenharmony_ci      # the default value of system is "mini"
35c5e268c6Sopenharmony_ci      # the default value generator mode is "low", the optional values is "low"
36c5e268c6Sopenharmony_ci      # the default value of language is "c", the optional values are "c"
37c5e268c6Sopenharmony_ci      forward_variables_from(invoker,
38c5e268c6Sopenharmony_ci                             "*",
39c5e268c6Sopenharmony_ci                             [
40c5e268c6Sopenharmony_ci                               "subsystem_name",
41c5e268c6Sopenharmony_ci                               "part_name",
42c5e268c6Sopenharmony_ci                             ])
43c5e268c6Sopenharmony_ci    }
44c5e268c6Sopenharmony_ci  }
45c5e268c6Sopenharmony_ci}
46