• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2* Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
3* Licensed under the Apache License, Version 2.0 (the "License");
4* you may not use this file except in compliance with the License.
5* You may obtain a copy of the License at
6*
7* http://www.apache.org/licenses/LICENSE-2.0
8*
9* Unless required by applicable law or agreed to in writing, software
10* distributed under the License is distributed on an "AS IS" BASIS,
11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12* See the License for the specific language governing permissions and
13* limitations under the License.
14*/
15
16import { DirTemp } from "../../gen/datatype"
17import { hcsConfigTemplate } from "./hdf_hcsconfig_template"
18import { peripheralBuildGn } from "./hdf_buildgn_template"
19import { peripheralBundleJson4_1 } from "./hdf_bundlejson_template41"
20import { driverInterfaceDriver } from "./hdf_driver_template"
21import { peripheralDumpC } from "./hdf_dumpc_template"
22import { peripheralDumpGn4_1 } from "./hdf_dumpgn_template41"
23import { peripheralDumpH } from "./hdf_dumph_template"
24import { idlBundleJson4_1 } from "./hdf_idlbundlejson_template41"
25import { idlBuildGn } from "./hdf_idlgn_template"
26import { idlTemplate } from "./hdf_idl_template"
27import { driverInterfaceServiceCpp } from "./hdf_servicecpp_template"
28import { driverInterfaceGn4_1 } from "./hdf_servicegn_template41"
29import { driverInterfaceServiceH } from "./hdf_serviceh_template"
30import { hdfReadmeTemplate } from "./hdf_readme_template41"
31
32// interface/hello/v1_0
33export let hdf_idl1_0_dir: DirTemp = {
34  name: 'v1_0',
35  files: [idlBuildGn, idlTemplate],
36  dirs: []
37}
38
39// interface/hello
40export let hdf_driver_interface: DirTemp = {
41  name: '[driverName]',
42  files: [idlBundleJson4_1],
43  dirs: [hdf_idl1_0_dir]
44}
45
46// interface
47export let hdf_interface: DirTemp = {
48  name: 'IdlInterface',
49  files: [],
50  dirs: [hdf_driver_interface]
51}
52
53// drivers/HcsConfig
54export let hdf_hcsconfig: DirTemp = {
55  name: 'HcsConfig',
56  files: [hcsConfigTemplate],
57  dirs: []
58}
59
60// drivers/peripheral
61
62export let hdf_hal_include: DirTemp = {
63  name: 'include',
64  files: [peripheralDumpH],
65  dirs: []
66}
67
68export let hdf_hal: DirTemp = {
69  name: 'hal',
70  files: [peripheralDumpGn4_1, peripheralDumpC],
71  dirs: [hdf_hal_include]
72}
73
74export let hdf_hdi_service: DirTemp = {
75  name: 'hdi_service',
76  files: [driverInterfaceGn4_1, driverInterfaceDriver, driverInterfaceServiceCpp, driverInterfaceServiceH],
77  dirs: []
78}
79
80export let hdf_driver_peripheral: DirTemp = {
81  name: '[driverName]',
82  files: [peripheralBuildGn, peripheralBundleJson4_1],
83  dirs: [hdf_hal, hdf_hdi_service]
84}
85
86export let hdf_peripheral: DirTemp = {
87  name: 'Peripheral',
88  files: [],
89  dirs: [hdf_driver_peripheral]
90}
91
92export let hdf4_1dir: DirTemp = {
93  name: '[driverName]hdf',
94  files: [hdfReadmeTemplate],
95  dirs: [hdf_interface, hdf_peripheral, hdf_hcsconfig]
96}
97
98// ʹ��map����汾
99export const hdf_version_map = new Map([['4.1', hdf4_1dir]]);